← プロジェクト一覧に戻る

agentgateway

MCP・A2A・LLMの通信に認証とポリシーと追跡を挟むプロキシ

公式Apache-2.0
スター
4.4k
フォーク
730
オープンIssue
343
最終コミット
2026年8月14日

概要

エージェントと、その呼び出し先——モデルプロバイダ、MCPサーバー、他のエージェント——の間に置くRust製のデータプレーンです。認証、RBAC、レート制限、OpenTelemetryへの送出をエージェントごとに実装せず、ここで一度だけ設定します。Solo.ioが2025年8月にLinux Foundationへ寄贈し、2026年6月にはMCPやgooseと同じAgentic AI Foundationの傘下へ移りました。ただしリクエスト経路上に置く基盤としては歴史が浅く、下流のMCPサーバーへ利用者ごとの識別情報を引き渡す仕組みは未対応の課題として残っているため、必要な認証方式を先に確認してください。

agentgatewayで何ができますか?

  • 複数のMCPサーバーを1つのポートにまとめる1つのmcpバックエンドに名前付きのターゲットを並べる構成で、リポジトリのmultiplexの例ではmcp-server-timeuvxserver-everythingnpxで起動して同じbindに束ねています。stdio、SSE、streamable HTTPのいずれもゲートウェイで終端するため、クライアントからは単一のエンドポイントに見えます。
  • ツール呼び出し単位の認可をCELで書くmcpAuthorizationのルールは、検証済みJWTと呼び出し内容に対するCEL式です。mcp.tool.name == "echo"なら誰でも呼べる一方、jwt.sub == "test-user" && mcp.tool.name == "get-sum"のように特定の主体だけに限定できます。ツール単位のポリシーは、MCPの仕様自身が「プロトコルでは強制しない」と明言している領域です。
  • モデル名ではなくコストで振り分ける仮想モデルが条件式で実バックエンドへ振り分けます。コストルーティングの例ではmax_tokensが1024以下の要求をgpt-4o-miniへ、それを超えるものを上位のモデルへ送り、最後のターゲットが必須のフォールバックとして機能します。予算と支出の制御、プロンプトの補強、フェイルオーバーも同じOpenAI互換の面に載ります。
  • 単体でもGateway APIコントローラーとしても動かす平坦なYAMLを読む単一バイナリでローカルやKubernetes以外の環境をまかなえます。内蔵コントローラーはGateway APIとInference Gateway拡張に対応し、GPU使用率、KVキャッシュの状態、LoRAアダプタ、キュー長を見てセルフホストのモデルへ振り分けます。ガードレールは正規表現、OpenAIのモデレーション、Bedrock Guardrails、Model Armor、独自Webhookから選べます。
  • 採用前に識別情報の扱いを確認する下流のMCPサービスへ利用者ごとの資格情報を渡すエンタープライズSSO、アプリ間アクセス向けのOAuth Identity Assertion、独自スコープの付与は、いずれも未解決のIssueとして残っています。現在のバージョニング方針が自動のパッチ更新を壊すという報告もあります。プロキシとしての形は本番向けでも、権限委譲まわりはまだ途上です。

ドキュメント

agentgateway/agentgateway のREADMEより転載(Apache-2.0)。 原文を読む ↗


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.

Intro to Agentgateway Video

Key Features

  • LLM Gateway Route traffic to major LLM providers (OpenAI, Anthropic, Gemini, Bedrock, and more) through a unified OpenAI-compatible API with budget and spend controls, prompt enrichment, load balancing, and failover.

  • MCP Gateway Connect LLMs to tools and external data sources via MCP with tool federation, stdio/HTTP/SSE/Streamable HTTP transports, OpenAPI integration, and OAuth authentication.

  • A2A Gateway Enable secure agent-to-agent communication using A2A, with capability discovery, modality negotiation, and task collaboration.

  • Inference Routing Intelligent routing to self-hosted models using Kubernetes Inference Gateway extensions, with decisions based on GPU utilization, KV cache, LoRA adapters, and queue depth.

  • Guardrails Multi-layered content filtering with regex, OpenAI moderation, AWS Bedrock Guardrails, Google Model Armor, and custom webhooks.

  • Security & Observability Auth (JWT, API keys, OAuth), fine-grained RBAC with CEL policy engine, rate limiting, TLS, and OpenTelemetry metrics/logs/tracing.

Getting Started

Documentation

Depending on your deployment environment, check out the following docs:

Agentgateway has a built-in UI for you to explore agentgateway connecting agent-to-agent or agent-to-tool:

Community Meetings

To join a community meeting, add the agentgateway calendar to your Google account. Then, you can find event details on the calendar.

Recordings of the community meetings will be published on our google drive.

Roadmap

agentgateway is currently in active development. If you’d like a feature that’s missing, open an issue in our GitHub repo.