GAP Documentation Hub
Graph Agent Protocol (GAP) is an open-source, typed GraphQL-profile gateway and zero-trust governance runtime built in Rust across 32 layered crates. Unify OpenAPI REST services, SQL databases, GraphQL subgraphs, gRPC services, CLI tools, codebases, MCP servers, and A2A peers behind one progressive interface.
What you'll learn
- Connect heterogeneous tools without dumping 200k+ schema tokens into every LLM prompt.
- Eliminate agent N+1 round-trips using DataLoader join batching and wait-free ArcSwap snapshots.
- Enforce default-deny Cedar authorization, rug-pull description pinning, and SSRF egress guards.
On this page
Choose Your Starting Path
Pick the path that fits your goal today. Each guide explains one focused concept cleanly before showing real commands from the repository.
New to GraphQL or GAP? Start Here
Zero-jargon foundations: Supergraph analogy, Types & Scalars, ! guarantees, and interactive Query-to-JSON Builder.
GAP Academy (16 Lessons)
Hands-on Odyssey-style courses: Lift-Off Supergraph, MCP/AG-UI Assistants, REST/SQL Batching, and Enterprise Zero-Trust.
Tutorial · 10 min10-Minute Quickstart
Validate gap.toml, run the Walking Skeleton REST + MCP fixtures, and execute your first federated query.
Interactive Lab & Calculator
Test real GAP-Bench token tradeoffs, send live GraphQL/MCP requests via serve.py, and take the 6-question quiz.
Explore Core Platform Capabilities
Three-Plane Architecture
Zero-ML hot execution (15 ns ArcSwap pinning, own pure-Rust AVL OrdMap) separated cleanly from discovery and control.
Progressive Disclosure (651 Tokens)
Replace linear schema growth (203,421 tokens at N=1,000) with constant 5-tool MCP discovery (L0 -> L1 -> L2).
6 Native Graph Connectors
Declarative OpenAPI, SQL, GraphQL, gRPC, sandboxed CLI, and tree-sitter Code AST adapters gated by Propose-Not-Activate.
MCP, A2A & AG-UI Facades
Serve MCP 2026-07-28, A2A v1.0 durable tasks, and AG-UI v1.0 /ag-ui SSE approval interrupts from one binary.
Zero-Trust Agent Governance
Cedar policies, T0/T1/T2 isolation, <gap:untrusted> escaping, DriftMonitor rug-pull freeze, EgressGuard SSRF, and BLAKE3 audits.
HTTP/3 QUIC & System-1 Routing
5,013 req/s multiplexed QUIC (2.36 ms p95, 0-RTT off) alongside 95.24% top-1 baseline routing and INV-17 fallback.
Measured Performance & Security Highlights
Per ADR-021, every metric below comes directly from committed workspace test suites, bench/results/gapbench/baseline.json, and bench/results/ga_local/report.json.
tools/list schema from N=10 to 1,000 tools (vs. 203,421 Direct-MCP)./target/dist/gap init my-gateway
./target/dist/gap config check my-gateway/gap.toml
./target/dist/gap doctor --config my-gateway/gap.toml