Agentic AI observability and control
See what your agents did. Control what they can reach.
Agents make many model and tool calls per task, across providers and MCP servers. Leanroute sits on all of them: a control layer that records every run and enforces your limits on agents, LLMs and MCP servers in one place, without taking over your agent framework.
Observe
Every run, with its cost
Send X-Agent-Name and X-Agent-Session-Id and each run appears with its requests, total cost, models used, duration and errors. Subagents can be tagged within a run.
Every tool call
Tools the gateway ran over MCP, with server, outcome and timing, and tools the model asked your agent to run. Names only: arguments and results are never stored.
Which integration sent it
Requests from our SDK packages and the n8n node are tagged with the client, so you can tell a LangGraph run from an n8n workflow.
Agent runs docs and framework recipes → · How to track agent costs per run →
Control
Which MCP servers agents can use
The gateway only connects to MCP servers on your allowlist, and runs their tools on any model. Agents can discover the allowed list themselves.
MCP gateway →How much each agent can spend
Give each agent its own key with daily and monthly caps and rate limits. A looping agent stops at its own ceiling.
Cost control →What data agents can send
Guardrails redact or block PII, secrets and prompt injection in prompts and responses, on every model call an agent makes.
Governance →Agents can check on themselves
A hosted MCP server and admin API let an agent read its own runs and spend, with scoped keys that can't move money or touch provider keys.
MCP server →Not there yet
A control layer, not a full control plane. On the roadmap, not shipped:
- Per-key tool allowlists, so one agent can use a tool another can't
- Budgets per run with a hard stop
- Policy over the agent's own function tools, not only MCP servers
- Short-lived credentials for subagents
- Human approval steps before a tool runs
For the checklist we hold ourselves to, see what an agent-native AI gateway is.
Questions
- How do I monitor AI agents in production?
- Route the agent's model calls through Leanroute and send two headers: X-Agent-Name for the agent and X-Agent-Session-Id for the run. Each run then shows its cost, models and tool calls on the Agent runs page and through the /platform/v1/runs API.
- Is Leanroute an AI control plane?
- It's a control layer between agents and the models and MCP servers they call: it enforces allowlists, limits and guardrails and records what happened. It doesn't orchestrate agents or store their state; that stays in your framework.
- Which agent frameworks does it work with?
- Anything that can call an OpenAI-compatible API: the OpenAI SDKs, LangChain and LangGraph, the Vercel AI SDK, n8n and Claude Code, among others. Our packages for LangChain, the Vercel AI SDK and n8n set the agent headers for you.
Two headers and your first run shows up. New accounts get 100 free requests, no card needed.