AI Gateway for
LLMs, MCPs & Agents
Agentgateway is an open source proxy built on AI-native protocols (MCP & A2A) that provides drop-in security, observability, and governance for agent-to-LLM, agent-to-tool, and agent-to-agent communication across any framework and environment.
The Only gateway for the open agentic stack.
agentgateway is hosted by the Agentic AI Foundation, part of the Linux Foundation, with vendor-neutral governance and native support for the foundation's MCP and A2A protocols.
Built in the open by


This is the agentgateway UI, running on sample traffic in your browser. Click around: send a prompt through a guardrail, call an MCP tool, add a virtual key, and watch logs and spend update. Run it yourself →
Connect every model, tool, and agent.
Plug agentgateway in anywhere on the traffic path and reach LLM providers, MCP servers, and other agents through one endpoint. Open any card to see it in the agentgateway UI.
LLM Gateway
One OpenAI-compatible API for every model provider and self-hosted model.
Agent connectivity
MCP servers and agent-to-agent traffic, with auth and per-tool policy.
Service Gateway
HTTP and gRPC, north–south and east–west, with TLS, mTLS, and OIDC.
Drop it in anywhere on the traffic path
The same binary and the same policies wherever you need them. Pick a placement:
Runs on
From
To
At the edge of your cluster, in front of the apps, agents, and MCP servers you expose.
Example: Publish a support agent and its MCP tools on api.acme.com, with JWT auth and rate limits applied before a request reaches the cluster.
Istio ambient mesh · mTLS
From
To
Traffic entering, leaving, or moving through an Istio ambient mesh keeps its mTLS identity and gains AI-aware policy.
Example: Calls from checkout-service to an LLM stay on Istio mTLS, and agentgateway adds token budgets, guardrails, and cost tracking on the way out.
Agent Substrate
From
To
In front of agents running as Agent Substrate actors: requests are routed to the right actor, and what the actor calls is checked against its egress policy.
Example: A request for an agent that is still starting waits at the gateway until the actor is routable, then reaches it. Outbound calls the actor isn't allowed to make are blocked.
Kubernetes · kagent
From
To
kagent runs AI agents as Kubernetes resources. agentgateway sits between those agents and the models, MCP tools, and other agents they call.
Example: Each team's kagent agents reach models and MCP tools through agentgateway, with namespace-aware policy, mTLS and JWT checks, per-namespace token tracking, and OpenTelemetry traces.
Every laptop · agentdesktop
From
To
agentdesktop manages the AI tools on every laptop in your fleet and points them at agentgateway, so desktop agent traffic gets the same policy as everything else.
Example: Claude Code, Codex, and OpenCode on every engineer's laptop reach models through agentgateway with a short-lived, controller-issued identity instead of a long-lived API key in a config file.
Developer machines
From
To
Point Claude Code, Codex, GitHub Copilot, or OpenCode at agentgateway once. Their model calls and their MCP tool calls both go through it, with the same keys, guardrails, logs, and cost tracking.
Example: In Claude Code, export ANTHROPIC_BASE_URL=http://localhost:4000 for models and run claude mcp add --transport http agentgateway http://localhost:3000/mcp for tools.
From
To
On the way out: one exit for every model provider, remote MCP server, and external API your agents call.
Example: Every team calls OpenAI and Anthropic through one exit. Provider keys stay at the gateway, and each call is logged with its cost.
From
To
A single binary next to one agent, on a laptop, a VM, or a bare-metal host. No Kubernetes needed.
Example: Point Claude Code at localhost and get virtual keys, guardrails, request logs, and cost tracking on your own machine in a few minutes.
One API, every model, automatic failover
Apps call a model name. Virtual models split traffic by weight, fail over when a provider is down, and route to self-hosted models on vLLM, TGI, or Ollama. Speaks chat completions, Messages, Responses, embeddings, rerank, audio, and OpenAI Realtime.
githubgithub_search_issues, …
kuberneteskubernetes_pods_list, …
figmafigma_get_file, …
context7context7_query_docs, …
Every MCP server and agent behind one endpoint
Federate remote and local MCP servers into one namespaced tool catalog, serve MCP Apps across them, and route agent-to-agent (A2A) calls, including to Bedrock AgentCore runtimes.
Secure and govern every call.
Guardrails, identity, and per-tool policy for LLM, MCP, and A2A traffic, enforced before a request reaches a model, a tool, or another agent.
Realtime guardrails
Request and response guards on every model and every MCP tool call. Stack regex and built-in PII detectors with OpenAI moderation, AWS Bedrock Guardrails, Google Model Armor, Azure AI Content Safety, or your own webhook.
{ "iss": "https://acme.okta.com", "sub": "maria.chen", "team": "platform", "scope": "mcp:github llm:smart" }
Identity at the edge
JWT, OIDC, API keys, and external authorization. Claims flow into routing, rate limits, and per-tool policy, and token exchange with Okta, Keycloak, or Google means agents never hold backend credentials.
- github_search_issuesallow
- github_create_issueallow
- kubernetes_pods_listallow
- kubernetes_pods_logallow
- kubernetes_pods_deletedeny
Tool access policies
Decide which tools on which MCP servers each caller can see and call. Everything else is filtered out of the tool list.
See every call and what it costs.
Traces, logs, analytics, and budgets come from the gateway itself, and plug into the observability stack you already run.
Every call, traced end to end
See each step from prompt to policy to model to tool, with latency, tokens, cache hits, and the realized cost of every call. Debug live with the agctl CLI.
Plug into your stack
OpenTelemetry traces with GenAI semantics for Jaeger, Honeycomb, or Grafana Cloud, Prometheus metrics with Grafana dashboards, and access logs over OTLP or in a database.
Spend and usage, sliced any way
Tokens, requests, and spend over time, grouped by model, user, team, key, provider, or the agent harness that sent the call. Carry caller identity into AWS and Google Cloud billing so spend shows up per team on the provider's own bill.
Budgets, keys, and rate limits
A virtual key per team or agent, with token and dollar caps and rate limits enforced in-line, so a runaway loop hits a 429 instead of your invoice.
Getting started
Run agentgateway as a single binary or on Kubernetes, and route your first request in minutes.
MCP connectivity guide
Connect agentgateway to MCP servers with built-in discovery and auth.
Latest updates
Releases, guides, and news from the agentgateway project.
Agentgateway v1.8.1: Native Bedrock, Decisions Everywhere, and MCP Skills
agentgateway v1.8.1 is here. It brings native Bedrock endpoints, Decisions and SystemOne on more backends, MCP Skills, response compression, and a fix for Flux users installing the CRD chart.
Credential Injection Patterns for AI Agents: Part 4, Eliminating Plaintext
The gateway in a credential brokering setup sees the same bearer tokens any intercepting egress proxy already sees. The controller didn't need to see them too, so let the gateway do the final unwrap, and then look at what it would take to close the one gap brokering adds at the gateway.
Add Entra ID Sign-In to Codex CLI Through agentgateway (Part 2)
Make Codex CLI sign in with Microsoft Entra ID before it can reach a model or an MCP server through open source agentgateway. Only members of one Entra group get in, and every prompt is logged with the name of the person who sent it. Includes the Entra app registration, the gateway policies, the Codex profile, and the errors I hit on the way.
Works with your stack.
Model providers, agent frameworks, coding tools, and the platforms you already run.
Build it with us.
agentgateway is developed in the open. Join the community on Discord, star the repo, and come to the community meetings.
What could be improved?
Your feedback helps us improve assistant answers and identify docs gaps we should fix.
Need more help? Join us on Discord: https://discord.gg/y9efgEmppm
Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.