{"slug": "agent-gateway-in-60-seconds-governed-llm-traffic-with-trustgate", "title": "Agent Gateway in 60 Seconds: Governed LLM Traffic with TrustGate", "summary": "NeuralTrust has released TrustGate, an open-source, security-first Agent Gateway written in Go that sits between applications and LLM APIs or MCP tool servers. It provides centralized policy enforcement, multi-provider routing, and MCP aggregation through separate Admin, Proxy, and MCP planes, allowing developers to govern LLM traffic without rewriting clients. The gateway supports rate limiting, token limits, semantic caching, and CORS, and can be set up in under a minute using a provided script.", "body_md": "Most teams start with a direct OpenAI (or Anthropic) SDK call. That works until you have three apps, two providers, and a security review asking who can call which model, at what rate, with what audit trail.\n\nAn **AI / Agent Gateway** sits between your apps (and agents) and every upstream model or tool. One place for routing, policy, and observability — without rewriting clients.\n\n**TrustGate** is NeuralTrust’s open-source, security-first Agent Gateway (Go). It fronts LLM APIs and MCP tool servers behind Admin / Proxy / MCP planes, so you change a base URL and two headers instead of scattering keys and rate limits across services.\n\n| Plane | Port | Job |\n|---|---|---|\nAdmin |\n`:8080` |\nGateways, registries, consumers, auth, policies |\nProxy |\n`:8081` |\nOpenAI-compatible LLM traffic + plugins |\nMCP |\n`:8082` |\nAggregated Model Context Protocol endpoint for agents (e.g. Cursor) |\n\nPolicies (rate limit, token rate limit, request size, semantic cache, CORS) run in the data path before traffic hits providers.\n\nRequires Docker (and `git`\n\n). From a clean machine:\n\n```\ncurl -fsSL https://raw.githubusercontent.com/NeuralTrust/TrustGate/main/scripts/install.sh | bash\n```\n\nOr, if you prefer the explicit path:\n\n```\ngit clone https://github.com/NeuralTrust/TrustGate.git && cd TrustGate\ncp .env.example .env\nmake up\n```\n\nHealth checks:\n\n```\ncurl localhost:8080/healthz   # Admin\ncurl localhost:8081/healthz   # Proxy\ncurl localhost:8082/healthz   # MCP\n```\n\nWith TrustGate up and `OPENAI_API_KEY`\n\nset, the repo ships a script that creates a demo gateway, registers OpenAI, mints a consumer key, and sends a chat completion:\n\n```\nexport OPENAI_API_KEY=\"sk-...\"\n./examples/curl-first-request/first-request.sh\n```\n\nFrom an app, keep the OpenAI SDK — point it at the proxy:\n\n``` python\nfrom openai import OpenAI\nimport os\n\nclient = OpenAI(\n    base_url=\"http://localhost:8081/my-app\",  # /{consumer_slug}\n    api_key=\"unused\",  # provider key lives in the gateway registry\n    default_headers={\n        \"X-AG-Gateway-Slug\": \"demo\",\n        \"X-AG-API-Key\": os.environ[\"CONSUMER_API_KEY\"],\n    },\n)\n\nprint(\n    client.chat.completions.create(\n        model=\"gpt-4o-mini\",\n        messages=[{\"role\": \"user\", \"content\": \"Hello through TrustGate\"}],\n    )\n    .choices[0]\n    .message.content\n)\n```\n\nFull example: [ examples/openai-sdk/](https://github.com/NeuralTrust/TrustGate/tree/main/examples/openai-sdk).\n\nAgents shouldn’t each hold a private mesh of tool servers. TrustGate’s MCP plane (`:8082`\n\n) aggregates registered MCP targets behind one endpoint with the same tenancy and policy model. Cursor setup notes live in [ examples/mcp-cursor/](https://github.com/NeuralTrust/TrustGate/tree/main/examples/mcp-cursor).\n\nChoose a gateway when you need **central policy** (who / what / how fast), **multi-provider routing with fallback**, and increasingly **MCP aggregation** for agents — not only request logs.\n\nIf you mainly want a thin multi-provider proxy, LiteLLM is a strong developer default. If you mainly want analytics, Helicone leads with observability. TrustGate’s wedge is **governance and security in the data path**, including MCP.\n\nDocs: [docs.neuraltrust.ai](https://docs.neuraltrust.ai) · Repo: [github.com/NeuralTrust/TrustGate](https://github.com/NeuralTrust/TrustGate)\n\nIf this was useful, the repo is here — stars help others find it.\n\n*Disclosure: TrustGate / NeuralTrust DevRel.*", "url": "https://wpnews.pro/news/agent-gateway-in-60-seconds-governed-llm-traffic-with-trustgate", "canonical_source": "https://dev.to/victor_garca_a9d07ddc486/agent-gateway-in-60-seconds-governed-llm-traffic-with-trustgate-2dac", "published_at": "2026-08-22 17:20:35+00:00", "updated_at": "2026-08-22 17:43:28.092239+00:00", "lang": "en", "topics": ["ai-infrastructure", "ai-agents", "developer-tools", "ai-safety"], "entities": ["NeuralTrust", "TrustGate", "OpenAI", "Anthropic", "LiteLLM", "Helicone", "Cursor"], "alternates": {"html": "https://wpnews.pro/news/agent-gateway-in-60-seconds-governed-llm-traffic-with-trustgate", "markdown": "https://wpnews.pro/news/agent-gateway-in-60-seconds-governed-llm-traffic-with-trustgate.md", "text": "https://wpnews.pro/news/agent-gateway-in-60-seconds-governed-llm-traffic-with-trustgate.txt", "jsonld": "https://wpnews.pro/news/agent-gateway-in-60-seconds-governed-llm-traffic-with-trustgate.jsonld"}}