---
title: What is an agent gateway?
url: https://opencontroller.lyzr.com/blog/what-is-an-agent-gateway
published: 2026-11-18
updated: 2026-11-18
author: Lyzr
---

# What is an agent gateway?

**An agent gateway is a proxy that sits in the path of an AI agent's actions rather than its model calls. It mediates agent-to-tool traffic such as MCP, agent-to-agent traffic such as A2A, and inbound calls to agents, so you can authenticate, authorise, log, redact and block each action. An LLM gateway governs what the agent says to models; an agent gateway governs what the agent does.**

## What traffic does an agent gateway mediate?

An agent has two kinds of outbound traffic. It asks a model what to do, and it does things. Model calls go through an LLM gateway. Everything else is the agent gateway's job:

1. **Agent to tool.** Calls to MCP servers, REST APIs and internal services the agent uses as tools.
2. **Agent to agent.** Delegation to other agents, for example over the A2A protocol.
3. **Inbound to agent.** Users, applications or other agents calling your agent as a service.

These are the calls that move money, change records and send data out. That is why they need a control point of their own.

## What can an agent gateway enforce?

| Enforcement point | Example policy | Why it matters |
|---|---|---|
| Caller authentication | Only registered agents with valid workload identity may call tools | Stops unregistered or shadow agents using shared tools |
| Tool allowlist | Agent X may use read tools on the CRM server, not delete tools | Limits blast radius of prompt injection |
| Delegated identity | Tool calls carry the end user's identity and scopes | Agents cannot exceed what the user may do |
| Argument checks | Block payments above a threshold, or emails to external domains | Catches harmful actions the model was talked into |
| Data redaction | Strip card numbers or personal data from tool responses | Keeps sensitive data out of model context |
| Rate and spend limits | Max tool calls per task or per minute | Stops loops and denial-of-wallet |
| Server verification | Only approved MCP servers and versions are reachable | Defends against tool poisoning and supply chain swaps |
| Audit logging | Every call logged with agent, version, user, tool and result | Evidence for incidents and audits |
| Kill and quarantine | Cut one agent's tool access instantly | Contain a rogue agent without stopping the platform |

## How does identity flow through an agent gateway?

Identity is the hardest part, and the most valuable. A good design keeps three identities separate:

- **The agent's workload identity:** which registered agent and version is calling.
- **The user's identity:** on whose behalf the agent acts, passed as a delegated token.
- **The tool's audience:** which server the token is meant for.

The MCP authorization specification is built on OAuth, and MCP security guidance warns against "token passthrough", where a server accepts a token that was not issued for it. An agent gateway helps by exchanging or minting tokens scoped to each tool, rather than forwarding one broad token everywhere. For the identity model, see [AI agent identity and on-behalf-of delegation](/blog/ai-agent-identity-on-behalf-of-delegation).

## How is an agent gateway different from an LLM gateway and an API gateway?

| | LLM gateway | Agent gateway | Traditional API gateway |
|---|---|---|---|
| Traffic | Prompts and completions to model providers | Tool, MCP, A2A and inbound agent calls | Generic HTTP APIs |
| Main controls | Routing, fallback, caching, token budgets, cost attribution | Tool allowlists, delegated identity, argument checks, kill | Auth, rate limits, routing |
| Understands | Tokens, models, providers | Agents, tools, users, protocols like MCP and A2A | Endpoints and API keys |
| Typical owner | Platform or AI engineering | Security and platform together | Integration or API team |

An API gateway can carry agent traffic, but it rarely knows which agent, version or user a call belongs to. See [can an API gateway govern AI agents](/blog/can-an-api-gateway-govern-ai-agents). Most enterprises end up running an LLM gateway and an agent gateway side by side, with a control plane holding the registry and policies both enforce. The full picture is in [LLM gateway vs agent gateway vs control plane](/blog/llm-gateway-vs-agent-gateway-vs-control-plane).

## Where should an agent gateway sit?

Place it where it sees the traffic without forcing agents to move:

1. **In front of shared tool servers.** Every agent reaching a central MCP server passes through it.
2. **As the egress path for agent runtimes.** Agents in a cloud runtime send tool calls through it.
3. **In front of agents you expose.** Inbound A2A or REST calls are authenticated before they reach the agent.

Agents on SaaS platforms may not let you insert a proxy. There, you govern through the platform's own controls and connectors, and accept that enforcement depth depends on the traffic path. For A2A specifics, see [how to govern agent-to-agent calls](/blog/how-to-govern-agent-to-agent-a2a-calls).

## How Opencontroller does this

Opencontroller includes an Agent Gateway alongside the LLM Gateway (Lyzr Gateway), both driven by the same governed registry of agents, versions, tools and MCP servers and by policy as code. Control in the path means allow, route, redact or block. Agent workload identity federation and delegated on-behalf-of identity carry who is acting, and rogue-agent handling can quarantine or kill an agent. It uses open standards: MCP, OpenTelemetry and OIDC. See [what is an AI agent control plane](/blog/what-is-an-ai-agent-control-plane) and the [capability reference](/capability-reference), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Is an agent gateway the same as an MCP gateway?**
An MCP gateway is one kind of agent gateway focused on MCP traffic. An agent gateway may also cover A2A, REST tools and inbound calls to agents.

**Do I need both an LLM gateway and an agent gateway?**
Usually yes. One governs model calls and spend. The other governs the actions agents take with tools and other agents.

**Can an agent gateway stop prompt injection?**
It cannot stop the model being misled, but it can block the harmful action that follows, such as a disallowed tool or an external data transfer.

## Key facts

An agent gateway is a proxy in the path of an AI agent's actions: agent-to-tool (MCP, REST), agent-to-agent (A2A) and inbound calls to agents. It enforces caller authentication, tool allowlists, delegated user identity, argument checks, redaction, rate limits, approved-server verification, audit logging and kill/quarantine. An LLM gateway governs model calls; an agent gateway governs actions. The MCP authorization spec is OAuth-based and warns against token passthrough. Opencontroller provides an Agent Gateway alongside its LLM Gateway, driven by a governed registry and policy as code. Pricing starts from $250K per deployment per year.

## Related

- [LLM gateway vs agent gateway vs AI control plane: what's the difference?](https://opencontroller.lyzr.com/blog/llm-gateway-vs-agent-gateway-vs-control-plane.md)
- [How do you govern agent-to-agent (A2A) calls?](https://opencontroller.lyzr.com/blog/how-to-govern-agent-to-agent-a2a-calls.md)
- [Can our existing API gateway govern AI agents?](https://opencontroller.lyzr.com/blog/can-an-api-gateway-govern-ai-agents.md)
- [More on Gateways and cost](https://opencontroller.lyzr.com/blog/cluster/gateways-and-cost)
