# Jayesh Ranjan Kesari > I build the plumbing that lets language models do real work: the agent loop that runs every question, the tool server it calls, the switchboard that picks a model, and the ledger that counts what each call cost. Right now that's the LLM platform behind an enterprise AI workspace at Netision Technology. I write down why things are the way they are, mostly so I can't fool myself later. - Email: jrkesari@gmail.com - GitHub: https://github.com/Jrkesari - LinkedIn: https://www.linkedin.com/in/jayesh-ranjan-kesari-2573b3252/ - X: https://x.com/me_jayeshrkesar - Site: https://jayesh.cv - Résumé: https://jayesh.cv/resume (also /resume.md, /resume.json, /resume.pdf) ## Selected work - [The query backend](https://jayesh.cv/work/query-backend): The service that answers every question in an enterprise AI workspace: one capped agent loop, tools by contract, approval in the host, every token metered. (Netision · 2025–26; Primary author, about 87% of 1,620 commits) - [One library, not four copies](https://jayesh.cv/work/llm-library): The shared LLM layer every backend installs: 17 models behind one interface, a Stop that actually stops, and a billing-grade ledger. (Netision · 2026; Created and sole maintainer, 100 of 100 commits) - [The MCP tool server](https://jayesh.cv/work/tool-server): The shared hands of an agent platform: 49 tools in 20 packages, where tools declare what they are and credentials never become arguments. (Netision · 2026; Architect and main author, ~98% of current lines) - [Analytics agents, router to picker](https://jayesh.cv/work/analytics-agents): Text-to-SQL analysts and a root-cause agent for multi-brand retail, and what was left when the LLM router went. (Netision · 2025–26; Primary author, 478 of 515 commits on these paths) - [Observability, outbound only](https://jayesh.cv/work/observability): Telemetry from machines inside a customer's network, where exactly one process is allowed to talk to the internet. (Netision · 2026; Designed and built the backends: Go agent, collector, probe, control plane) - [A coworker on your own machine](https://jayesh.cv/work/local-agent): A local agent designed to work on your real files through the web app you already use, and to never do anything destructive without a yes. (Netision · 2026; Prototype: the local agent and the cloud bridge (9 of 9 commits); the product UI was never wired) ## Rules I work by - Unmeasured is not zero. Numbers come only from the provider's own usage payload. A token is never estimated. A payload nobody could read is flagged usage_missing; a model with no rate is flagged pricing_missing; unpriced models are named at boot, before the first invoice. - The model never holds authority. Identity, credentials, hosts, approvals and SQL scope are enforced by code and headers, not by sentences in a prompt. A model that could set its own model could pick anyone's. - Fail at the door, degrade inside. Unknown model, unknown agent, empty prompt: refused synchronously, before anything is promised. Inside the turn, the opposite: a tool server that's down means answering without tools, not dying. - Two defences, each enough on its own. A connection that is locked down before it's used, and a statement check: one read-only statement, only this conversation's tables, no file functions. Refusals are worded for the model, so it fixes the query next round. - A stop is not an error. Cancellation is a BaseException, so it sails past the except Exception blocks that turn failures into error messages. The model proxy checks before every call. But a cached response skips that check, so each pipeline also checks right before anything reaches the user. - Measure the lever. Keep the rejected numbers. Every lever gets measured on the real thing before it's trusted, and a rejected option is written down with its numbers next to the decision, so nobody re-runs the experiment by accident. - Cost grows with the square of the loop. A hard cap on rounds. Results truncated at one choke point, not per tool. Files by reference (~30 tokens). Tools offered only when this request can use them. Prefixes kept stable so the cache can do its job. - Where a sentence sits in the prompt is architecture. The model writes its answer from the bottom of the message list up. So notes go directly under the results they're about, and standing instructions go after the history, because above it they lose. - If two files must agree, one of them is a bug. One library, published by tag. Registries that answer the question instead of lists that drift. Contract tests that read the TypeScript frontend from the Python backend, so the two can't disagree quietly. - A root cause is something you can switch on and off. Until the symptom has been flipped in both directions, it's a hypothesis, and it gets labelled one: confirmed, probable or hypothesis, never “should work”. - Delete with evidence. Measure first (anti-joins, blank rates, row-by-row comparisons), then drop. A column that reads 0 everywhere says “none happened”, when the truth was “not counted”. A module nobody could call was speculation, so it goes. - A test name is a specification. Tests are named as behaviours: a stop during the final call does not publish, an unpriced model is flagged, not free. Paired failures get paired tests. Snapshots get replaced by properties: a recording only says “unchanged since someone recorded it”. ## Notes - [Unmeasured is not zero](https://jayesh.cv/notes/unmeasured-is-not-zero) (2026-10-09): What I learned building a per-user ledger for every token, page and image an AI service pays for, and why “we don't know” has to be a value. - [Spreadsheets are not documents](https://jayesh.cv/notes/spreadsheets-are-not-documents) (2026-10-09): Why chunk-and-embed fails on spreadsheets, what replaced it, and the two independent locks on SQL a model writes. - [Never hand the model the keys](https://jayesh.cv/notes/never-hand-the-model-the-keys) (2026-10-09): How an agent can work in someone's mailbox without the model ever holding their credentials, and the four-times “send it?” bug that moved approval out of the tool.