vs Infrastructure & Token Formats

LiteLLM, Kong, Traefik, TOON — they solve routing or serialization. AgentCTX solves cognition.

Comparison of AgentCTX vs Generic Infrastructure APIs vs TOON Format
Capability Generic Infra API TOON Format AgentCTX Gateway
Architectural Foundation
Primary Focus Routing (TCP/HTTP) Data Serialization Cognition & Semantics
Payload Size per Op ~40-100 Tokens ~20-40 Tokens (-60%) ~8 Tokens (-91%)
Agent Native Language JSON-RPC TOON notation CTX Syntax
Compilation Target N/A (pass-through) N/A (format only) 6 targets (SurrealQL, REST, MCP, etc.)
Memory & Context Routing
Memory Engine Bring your own DB None SurrealQL Hybrid DB
Recall Method RAG Pipeline N/A Structured Direct Recall
Lookup Latency Variable (~150ms+) N/A < 1ms (< 50k keys)
Session Persistence Client managed Stateless Automatic & Tagged
Security & Observability
Payload Receipts Plaintext Logs None Ed25519 Cryptographic
Validation Layer JSON Schema Schema-Aware Headers WASM Parse Time
Audit Trailing Splunk / ELK None Response Ledger
Token Economics
Reduction vs JSON 0% (uses JSON) 30-60% 82-91%
Nested Data Handling Verbose payloads Gains diminish Flat compiled output
Static Content Re-sent per call Re-sent per call CAS deduplication (99.9%)

vs MCP (Model Context Protocol)

MCP is a transport — it defines how agents connect to tools. CTX is a protocol layer on top, adding compression, memory, orchestration, and trust.

MCP gives you

  • Tool discovery and invocation
  • stdio / SSE transport
  • JSON-RPC message format
  • Server lifecycle management

CTX adds on top

  • Up to 91% compression — CTX grammar vs verbose JSON
  • Scoped persistent memory — 5 sharing scopes × 12 typed kinds, agents remember across sessions
  • Unified routing — one gateway to N MCP backends
  • RBAC + Ed25519 signing — every action is verified
  • Orchestration — lifecycle, budgets, coherence monitoring
  • Knowledge plane — vector + graph search, not just tools

AgentCTX doesn't replace MCP — it enhances it. Your existing MCP servers work unchanged.

The Core Difference

Standard API gateways assume their client is a deterministic script that doesn't "think." They rely on heavy, nested JSON payloads that obliterate an LLM's context window. AgentCTX reverses this: it allows the agent to think in a tiny, expressive DSL, and places the burden of translation (compiling that DSL into verbose JSON for upstream APIs) entirely onto the Rust sidecar.

Pro and Team coming soon