← Back to Leaderboard
TNeuralTrust

NeuralTrust/TrustGate

Self-hosted Go gateway for routing and governing LLM, MCP and agent traffic.

Engineering Health (Methodology)
A+ · 88/100
Maintenance Activity
● Updated today
Latest Release
v1.2.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption13/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedMCPAPI1 README badge views (30d)
Total Stars
★ 32
24h Growth
+1
7d Growth
+24
Forks
7

GitHub Star History

Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.

NeuralTrust/TrustGate Star History (2026-11-23 - 2026-12-03) DAILY STAR HISTORY (11-DAY D1 TELEMETRY) +31 in 10d · avg +3/day 36 18 0 2026-11-23: ★ 12026-11-24: ★ 12026-11-25: ★ 22026-11-26: ★ 142026-11-27: ★ 272026-11-28: ★ 272026-11-29: ★ 292026-11-30: ★ 292026-12-01: ★ 302026-12-02: ★ 312026-12-03: ★ 32 ★ 32 11-23 11-28 12-03

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

TrustGate builds one Go binary from cmd/trustgate/; the supplied go.mod declares Go 1.27.4. The default process serves the LLM proxy on 8081. The admin, mcp and agent modes serve ports 8080, 8082 and 8084 respectively, while run combines only admin and proxy for a single node. Separate processes let teams scale model, tool and agent traffic independently. The admin plane owns migrations and configuration and can sync that configuration to data planes without giving them direct PostgreSQL access. The proxy uses Redis.

Incoming traffic is resolved to an application and caller before the gateway applies policies and dispatches upstream. The LLM proxy handles dialect conversion and streaming, the MCP plane aggregates tools, and the agent plane forwards A2A traffic. pkg/api/ contains handlers and middleware, pkg/app/ contains routing, authorization and protocol services, and pkg/infra/ contains provider and policy adapters, persistence, config sync and telemetry. Policy stages run before requests, before responses and on streams.

Key Capabilities & Differentiators

The LLM plane targets 17 provider options, including OpenAI, Anthropic, Azure OpenAI, Bedrock and Google Vertex AI, plus OpenAI-compatible backends such as vLLM and Ollama. Clients can use OpenAI Chat Completions or Responses, Anthropic Messages, Gemini or Vertex AI, Cohere Chat or native Bedrock dialects. Routing includes trigger-based fallback with an attempt budget, smart routing across two or three ordered models, and round-robin, weighted, least-connections, random or semantic balancing. A provider failure mid-stream is surfaced as an error event in the client dialect instead of a seemingly complete result.

MCP aggregates MCP servers and OpenAPI services behind one endpoint with per-user upstream credentials. A2A 0.3 and 1.0 support pinned agent cards, task ownership and delegated identity. Application keys, OIDC claim rules and mTLS feed application- or caller-level rate limits, token or dollar budgets and model or tool allowlists. Policies can enforce or observe, with throttling available for rate limits. Semantic caching, external guardrails and per-gateway OTLP exports round out the shared policy and telemetry layer.

Trade-offs & Limitations

Compared with calling the OpenAI API directly, TrustGate trades a shorter request path and direct access to native provider behavior for centrally enforced identity, budgets, failover and tool policy. A familiar API dialect lowers migration effort, but is not a guarantee of cross-provider feature parity. Test tool-call semantics, stream events and endpoint-specific fields before switching a route. Retries on the same provider are disabled by default; when enabling retries or fallback, budget for additional upstream attempts, latency and potential charges.

The shared gateway also becomes a service that teams must monitor and operate. Private-network egress is allowed by default; set OUTBOUND_ALLOW_PRIVATE_NETWORKS=false when untrusted users can configure upstreams, and review network controls independently. Raw OTLP exporters can carry payloads, and cloud models or guardrails can still receive data from a self-hosted gateway. The gateway and admin API are Apache-2.0; evaluate paid NeuralTrust platform features such as SSO, RBAC and longer retention separately from the gateway's application-level OIDC support.

Hardware & Deployment Guide

For evaluation, start from a checkout with make up, then verify /healthz on the admin, proxy and MCP ports and use examples/curl-first-request/first-request.sh with a valid OpenAI credential. The supplied docker-compose.yaml itself defines PostgreSQL 16 Alpine and Redis 7 Alpine; the full quick-start workflow also launches the TrustGate planes. .env.example covers the DB_* and REDIS_* settings, and admin JWT signing requires a SERVER_SECRET_KEY of at least 32 bytes. Bind or network-restrict the admin API, configure its TLS or put it behind a controlled TLS ingress, and replace the sample database credentials rather than exposing the Compose database and Redis ports as-is.

For separate plane deployment, k8s/ contains Kustomize bases and overlays. Go gateway capacity should be tested against concurrency, streaming duration, policy stages and telemetry volume; model-serving GPU requirements are separate. Release v1.1.0 added per-dimension rate limiting, Retry-After support and caps on parallel requests. v1.2.0 added client addresses to request spans; review collection, access and retention rules for those traces.

Process isolation: One Go binary exposes admin, LLM proxy, MCP and A2A modes on ports 8080, 8081, 8082 and 8084.
API compatibility: The proxy translates supported OpenAI, Anthropic, Gemini, Vertex AI, Cohere and Bedrock dialects, including streaming.
Routing controls: Fallback chains use triggers and an attempt budget; smart routing keeps a conversation on one model until a turn warrants an upgrade.
Tool and agent governance: MCP aggregates native servers and OpenAPI tools with per-user upstream credentials; A2A tracks task ownership.
Identity and policy: OIDC claim rules and mTLS complement application keys, caller-scoped quotas and model or tool allowlists.
Telemetry: Per-gateway OTLP exports report caller, model, token usage, cost and latency; raw-class exports can include payloads.
Best For

Platform teams governing multiple model providers and agent tools, with a need for shared identity, per-caller budgets, failover and traceability.

Skip If

A single provider's native API meets your needs, you cannot operate an additional gateway and its backing services, or you need an inference engine rather than a proxy.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedMCPAPI
curl -fsSL https://raw.githubusercontent.com/NeuralTrust/TrustGate/main/scripts/install.sh | bash

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
TrustGate ★32+24GoApache-2.0Self-hosted Go gateway for routing and governing LLM, MCP and agent traffic.
pentagi35.7k+489GoMITSelf-hosted multi-agent penetration testing with logs and reports for human revi
langfuse38.2k+282TypeScript—OpenTelemetry platform for agent tracing and evals, with an AI gateway
hermes-agent268.1k+1.5kPythonMITSelf-hosted Python agent with persistent memory and automation across chat and C

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/NeuralTrust/TrustGate.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

NeuralTrust/TrustGate Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about TrustGate

How do I put TrustGate in front of an existing OpenAI SDK client?

Create a gateway, register an upstream provider, and attach that registry and an application API key to the application. Point the OpenAI SDK at the application-scoped proxy URL, such as http://localhost:8081/my-app/v1, and select the gateway with X-AG-Gateway-Slug if using header-based selection. Before switching providers, test the features your client uses, particularly tool calls and streaming events.

Does TrustGate need a GPU, and what should I size for?

TrustGate does not run model inference, so the gateway itself has no model VRAM requirement. The Docker Compose stack uses a Go service, PostgreSQL 16 and Redis 7. Size the gateway against concurrent streams, payload sizes, policy work and telemetry volume; size any separately hosted inference backend against its own model and workload. No fixed CPU or RAM capacity has been established.

Can we self-host it commercially and keep regulated data inside our network?

The Apache-2.0 gateway and admin API can be self-hosted for commercial use, subject to the license terms. NeuralTrust's paid platform is separate and adds capabilities such as a console and longer retention. Self-hosting controls where the gateway runs, not where its upstream requests go. Review model, tool, guardrail and telemetry destinations before treating the deployment as suitable for restricted data.

When is TrustGate a better fit than calling the OpenAI API directly?

Call OpenAI directly if one provider meets your needs and you want its native features without running another service in the request path. Choose TrustGate when multiple applications or providers justify shared identity, quotas, failover and audit controls, or when MCP and A2A governance belong at the same boundary. TrustGate does not replace the upstream model API or eliminate its charges.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining NeuralTrust/TrustGate? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature NeuralTrust/TrustGate on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare