Agentic Interception, API Discovery, and AI Gateway Architecture
Caber governs agentic workloads through a defense in depth interception architecture combining an in process Python and Rust SDK (pycaber / pycaber.auto) with out of process AI and MCP Gateways (caber-core, LiteLLM, Envoy ext_authz, and MCP proxy). Both layers converge on the same Rust streaming_core::intercept pipeline so that HTTP calls, WebSocket frames, gRPC streams, in process agent tool invocations, MCP tool calls, and Agent to Agent (A2A) messages receive identical characterization, W3C trace propagation, and Contract v3 policy enforcement.
Figure 1: End to end agentic interception, protocol normalization, wire redaction, and single writer API discovery pipeline.
For polyglot microservices (TypeScript, Go, Java, Rust) or third party SaaS agents where installing pycaber in process is not possible, Caber deploys as an inline AI Gateway and MCP Proxy:
- LiteLLM & OpenAI Compatible Proxy: Agents point
OPENAI_BASE_URLorANTHROPIC_BASE_URLat the Caber Gateway (or run the Caber callback handler inside LiteLLM Proxy). Caber extracts W3Ctraceparentandbaggage(caber.user,caber.email), fingerprints prompt messages ($.messages[*].content), enforces Contract v3 policies, and scrubs completion chunks before returning them to the caller. - Envoy
ext_authz& Kong Gateway: Enterprise ingress controllers delegate request and response body inspection over gRPCext_authztocaber-core, enforcing identical Regorus WASM policies at the perimeter. - MCP Gateway Mediation (
stdioand Streamable HTTP / SSE):tools/listDynamic Filtering: Filters out tools the initiating human principal (caber.user) is prohibited from invoking underdata.caber.policy_set.tools/callArgument & Output Scrubbing: Normalizes the wire path tomcp/<tool>, stampsapi.resource_type: "mcp", evaluates tool arguments before execution, and redacts unauthorized spans or PII from the tool's response content before the LLM context window ingests it.