Choose an AI agent gateway by the controls it enforces in the request path, not by how many models it lists. Write down what you must enforce on agent to model and agent to tool traffic: workload identity, MCP tool authorization, spend caps that return HTTP 429, egress control, secretless provider keys, plane ownership and exportable audit. Then require a working demo of each in your own environment. This page grades agentgateway, open source, against those seven controls in both of its modes, standalone and Kubernetes, against the current release, v1.7.0.
Every capability claim links to the agentgateway docs or release notes. Hands-on results link to the public demo that produced them, with the version it ran on.
If you need the definition first, start with what an AI agent gateway is. The architecture word for the whole system is an agentic mesh, and the wiring of these seven controls onto one hop is the control-plane path. This page is the evaluation, not a rewrite of either.
What is the decision rule for choosing an AI agent gateway?
Write down the controls you must enforce: identity, tool authorization, spend, egress, credentials, plane ownership and audit. Then require a demo of each in your environment. A row you cannot demo is a row you do not have.
Do not start from provider count or a “best LLM gateway” list. Provider count tells you how many APIs a proxy can translate. It says nothing about whether an agent can call a tool it was never granted.
How is an AI agent gateway different from an LLM proxy?
An LLM proxy unifies providers, routes and fails over, and counts tokens. An agent gateway still does those jobs, and also understands tool and agent protocols, binds policy to caller identity, injects provider credentials, and assumes the agent may try to reach the network some other way. The agentgateway introduction describes one proxy for LLM inference, MCP tool servers and A2A agent traffic, plus ordinary APIs, so you do not run separate “regular” and “AI” gateways.
If your whiteboard only says “OpenAI-compatible API, virtual keys, a log UI,” you are describing an LLM proxy, not an agent platform hop. For the tool side on its own, see what an MCP gateway is.
What are the signs you do not need a gateway yet?
One or two providers, no shared MCP servers, no multi-team agents, and spend small enough that the provider dashboard is the budget. Build the test harness first. When you are ready, the smallest agentgateway footprint is the standalone binary.
What are the signs you need agent-aware enforcement?
Multi-team agents, shared tools, an audit question about which tool was called as which identity, runaway spend, or agents that can dial out. Those are platform problems. A chat-completions proxy will not fail them closed.
Should agentgateway run standalone or on Kubernetes?
The introduction names two deployment modes. Same Rust proxy, different install and different operating model.
- Standalone. Runs anywhere: the binary, a Docker container, or a Helm chart for a single Kubernetes Deployment, configured with YAML and an optional UI. The docs pitch it at single developers, small teams and non-Kubernetes infrastructure. Per-API-key budgets in US dollars or tokens are documented here.
- Kubernetes. A Gateway API implementation (
HTTPRoute,GRPCRoute,TCPRoute,TLSRoute) with a controller that manages the proxy. The docs pitch it at larger teams with shared clusters and GitOps. Budgets are token based, through global rate limiting withunit: Tokens, and return 429.
Do not assume a feature documented for one mode exists in the other. The scorecard grades each control in both.
What does the seven-control scorecard look like?
Seven rows. “MCP: yes” and “budgets: yes” are the usual false positives. Every agentgateway cell says Tested (with the version it ran on) or Documented (in the v1.7 docs or a release note). Nothing here was re-run on v1.7.0 unless it says so, and none of it says so.
| Criterion | What good looks like | Common false positive | Standalone | Kubernetes | Proof |
|---|---|---|---|---|---|
| 1. Identity | Policy binds to a cryptographic workload identity (SPIFFE or equivalent), not a header the agent can set | API keys, virtual keys, or JWT claims the workload minted for itself | Tested on v1.5.0. Workload API, source.spiffeId in CEL | Documented. spiffe on AgentgatewayParameters | SPIFFE identity |
| 2. MCP tool authorization | Per-tool allowlists; unentitled tools hidden from tools/list and refused on call | “Supports MCP” or a registry screenshot | Tested on v1.5.0. CEL mcpAuthorization | Documented. CEL tool access on JWT claims | AGENTS.md is not a control |
| 3. Spend caps that return 429 | Hard cap that refuses the next call with HTTP 429 before the provider | A spend dashboard, an alert, or a status code nobody wrote into the runbook | Tested on v1.5.0. Per-key USD or tokens | Documented. Token budgets, unit: Tokens | Per-key budgets |
| 4. Egress control | Destination authorized at CONNECT time; default deny; no route around it | An HTTP proxy the agent can skip with NO_PROXY or /etc/hosts | Tested on v1.6.0. CONNECT hostname allowlist | Documented. Ambient mesh egress and dynamic forward proxy recipes | Egress proxy |
| 5. Secretless keys | Agent calls a local endpoint; gateway attaches the provider credential | Vault to env var, then the process still holds sk- | Tested on v1.5.0. backendAuth | Documented. RFC 8693 token exchange | Secretless agents |
| 6. Plane ownership | You can say who runs the request path and point at the config | “Self-hosted vs SaaS” with no mention of the binary or Gateway API | Documented. Binary or container plus YAML | Documented. Gateway API plus controller | Introduction |
| 7. Exportable audit | Logs, metrics and traces you can ship: who, which model or tool, why denied | A vendor UI you cannot export for a SOC 2 style review | Documented. OTLP access log export, metrics, tracing | Documented. Access logs, Prometheus metrics, cost in logs | Agent sessions in logs |
1. How do you test workload identity?
Ask one question: can policy bind to a cryptographic workload identity, not only an API key or a JWT the agent can mint or copy?
A bearer token is a thing that can be copied. In my SPIFFE identity demo on agentgateway v1.5.0 standalone, with no certificate file on disk for the agent, the gateway or the model, agent-alpha got HTTP 200 and agent-beta presented a valid SVID from the same trust domain and got HTTP 403. A valid identity is not the same as an allowed one. MCP’s own auth still authenticates the employee more than the agent (the MCP identity gap), so do not grade “SSO for the admin UI” as this row.
Standalone sources its mTLS identity and trust bundle from the SPIFFE Workload API and exposes source.spiffeId to CEL (v1.5.0 release notes, CEL context reference). Startup fails closed if SPIFFE is enabled and no identity can be obtained. On Kubernetes, the API reference has a spiffe block on AgentgatewayParameters: the gateway takes its X.509-SVID from the local Workload API and the controller mounts the socket into the pod. For the choice between this and OAuth, see SPIFFE vs OAuth for AI agents.
2. How do you test MCP tool authorization?
Per-tool and per-server allowlists, evaluated on every list and every call. “MCP supported” is not tool authorization.
Standalone MCP authorization runs CEL against MCP method calls and filters any tool that is not allowed out of the list response, so an unauthorized client never sees it. Kubernetes tool access applies CEL rules over validated JWT claims and filters the list the same way. By default all tool access is allowed, so the allowlist is something you have to write.
I ran this on v1.5.0 in AGENTS.md is not a security control: a prompt-injected agent with a policy file telling it not to delete records deleted all five of them, and then the same agent behind an mcpAuthorization allowlist could not. Its tool count dropped from five to two, and a direct call to a denied tool returned JSON-RPC -32602 Unknown tool. The agent is told the tool does not exist, not that it is forbidden. Prompt policy is not this control. For the wider pattern, see what an MCP gateway is.
3. How do you test spend caps that return 429?
A budget that only increments a dashboard is accounting. The test is whether the next call gets HTTP 429 and never reaches the provider.
Standalone per-key budgets cap one API key in US dollars or tokens. Block rejects with a 429 once the limit is passed and Audit records the overage and lets the request through. Three details in the v1.7 docs matter for a PoC:
- A database is required. The budget counts live in SQLite or PostgreSQL through
config.database.url, and agentgateway refuses to start a budget without it. - A dollar budget needs a price. A USD budget charges nothing for a model the cost catalog does not price, and no error is reported. Confirm the access log records a cost for your traffic before you rely on it. Since v1.6.0 a built-in catalog prices common public models.
- A budget can be lifetime. Since v1.7.0 a budget with no
windowaccumulates for its lifetime, which gives a fixed spending limit.
I ran the per-key path on v1.5.0 against a mock model: a 5,000-token key refused its sixth call with a 429 and a $0.01 key refused its fourth (per-key LLM budgets).
The caveat to put in the runbook: the gateway charges a request after the response, so the request that crosses the cap still completes and recorded spend ends above the limit. The 429 starts with the next request. The v1.7 docs show the same thing: a $0.008 key is charged $0.00903 before its first 429. The overshoot is bounded by one request.
On Kubernetes, budget limits are token buckets through global rate limiting with unit: Tokens, keyed by header, JWT claim or address, and an exhausted bucket returns 429. Two documented traps: rate limiting runs before prompt guards, so a request a guardrail rejects with 403 still spends tokens from the budget, and local rate limiting counts requests, not LLM tokens. Token counts are not dollars until a catalog prices the model. For the wider design, see LLM cost controls at the gateway.
4. How do you test egress control?
Does the design assume all agent traffic hits the gateway, and what happens when an agent tries to go around it?
The standalone egress proxy docs describe agentgateway as an HTTP CONNECT proxy with two modes: tunnel mode, which matches the TLS SNI hostname and keeps traffic encrypted, and route mode, which matches the CONNECT authority and applies HTTP policy, including client authentication. My agentgateway egress proxy walkthrough ran on v1.6.0 standalone: hostname allowlist, default deny, with the config, curls and logs.
A proxy setting is not the control. HTTPS_PROXY is configuration the workload can change. In a separate pattern lab, I reproduced four bypasses of an in-band egress policy and watched all four fail behind a CONNECT-time gateway (egress control bypasses). That lab’s gateway is a small Python CONNECT gateway, not agentgateway, so it proves the pattern, not the product. The network has to leave no other route: default-deny egress for MCP on Kubernetes is the NetworkPolicy side.
On Kubernetes, the docs cover agentgateway as the egress gateway for an ambient mesh and a dynamic forward proxy with route policies. I have not published a Kubernetes egress walkthrough. Rogue-agent Kubernetes controls is the stage map after an agent leaves the path.
5. How do you test secretless provider keys?
Agents call a local endpoint. The gateway attaches the provider credential after identity and policy checks. The agent process never holds the OpenAI, Anthropic or Bedrock key.
I built that split on v1.5.0 standalone: inbound workload identity, outbound backendAuth (secretless AI agents). On Kubernetes, the docs cover RFC 8693 token exchange, which swaps the incoming credential for a backend-scoped token on an AgentgatewayPolicy. A vault changes where the key rests. It does not change the moment the process holds plaintext.
6. How do you test plane ownership?
Who owns the request path? Can you point at the process that served the request and the file or repo that configured it?
Standalone: the binary or container and a YAML file, with a UI that can edit the config. Kubernetes: Gateway API resources and the controller, which fits GitOps. The introduction’s mode table is the fork: run anywhere with click-ops, or a managed control plane on a shared cluster. Write the mode into the ADR.
7. How do you test exportable audit?
Who called which model or tool, as which identity, and why a budget or an authorization rule denied it. The test is whether you can ship that record out of the gateway without a vendor-only UI.
The introduction lists built-in metrics and tracing. Standalone can export access logs over OTLP to an OpenTelemetry Collector, in addition to stdout. Since v1.7.0, agentgateway detects a coding agent’s session id from request headers, and you can add it to every access log line (agent session detection, which also covers the 8-character minimum that fails silently). On Kubernetes, the cost tracking docs record each priced request’s cost in access logs, traces and metrics, and expose it to CEL as llm.cost.
A log is only as good as the thing writing it. Agent audit log integrity covers why an agent’s own transcript is not the audit record, and why the gateway’s view is a better witness. I have not run an observability bake-off, so this row stays Documented.
How do you run the evaluation?
- Write the must-have controls into the ADR: the seven rows, or a subset you can defend.
- Pick the agentgateway mode that matches where agents run: standalone on a laptop, VM or container, or Kubernetes in your cluster.
- Run the PoC tests below in your environment. A lab key that never crosses the hop does not test identity or tool filtering.
- Write the mode into the ADR: standalone or Kubernetes, and why.
- Load test the policy decision path and the audit write. Report a tail percentile, not a single median.
kagent is the runtime next door, not a gateway. Pod versus agent sizing is Agent Substrate.
PoC acceptance tests (copy into the ADR)
- Identity (S, K). An agent outside the allowlist receives 403 before any provider is contacted. A valid SVID that is not in the allowlist is not enough.
- MCP tool authorization (S, K). A tool not on the caller’s allowlist is absent from
tools/listand refused ontools/call. - Budgets. An over-budget key receives HTTP 429 and the provider is not called. Standalone: per-key USD or tokens, with a database configured. Kubernetes: token budget (
unit: Tokens). Record that the request crossing the cap is still served. - Egress (S, K). An agent without the gateway path cannot reach the provider. Unsetting the proxy variable or editing the hosts file does not open a route.
- Secretless (S, K). The agent environment contains no provider key. A completion still returns, which means the gateway attached one.
- Plane ownership. You can point at the process that served the request and the file or repo that configured it: standalone YAML, or Gateway API resources and Helm values. Write which mode.
- Audit (S, K). You can export a record that names the identity, the model or tool, and the deny reason, without opening a vendor-only UI.
When should you not deploy a gateway yet?
A single-provider prototype with no shared tools: build the harness first. When you are ready, start with the agentgateway standalone binary, and move to Kubernetes mode when you standardize on Gateway API.
AGENTS.md and prompt policy are not controls. The deleted-records demo above is the proof (AGENTS.md is not a security control).
Where to go next on webofmike
- Definitions. What is an AI agent gateway, what is an MCP gateway, what is an agentic mesh
- Comparison. agentgateway vs LiteLLM vs Portkey, and self-hosted agentgateway configs for both modes
- Shadow MCP. Stop shadow MCP servers, and why an MCP gateway is not blocking shadow servers
- Path. Agent platform gateway control plane
- Proof rows. SPIFFE, MCP allowlist, budgets, egress proxy, secretless, agent sessions, MCP identity, rogue-agent controls, guardrails
External primaries to keep next to the ADR, not instead of it:
- agentgateway introduction (one proxy, both modes)
- Standalone binary install
- agentgateway on Kubernetes (Gateway API)
- v1.7.0 release notes
The project is agentgateway/agentgateway. This page is how to evaluate a gateway for AI agents, graded on agentgateway in both modes. I have not run a latency or throughput bake-off, and nothing on this page was re-tested on v1.7.0.