What is VAC?
Agents today often get broad, long-lived API keys with no real context or fast revocation. VAC gives them task-scoped credentials instead: policies (Datalog) define what’s allowed; receipts prove what was done; a sidecar enforces both and injects the real API key. Revocation is heartbeat-based (seconds, not days).
In short: the agent never sees the API key. It gets a signed Biscuit and, after each allowed call, a signed Receipt. The next call can only be allowed if policy says so and the right receipts are present.
Quick Start
Prerequisites: Rust 1.70+, a Control Plane (use the mock in control-plane/ for testing).
- Generate a root key and create config:
# Edit config.toml: set root_public_key and api_key
- Run sidecar and Control Plane:
# Terminal 1
# Terminal 2
&&
Sidecar listens on 0.0.0.0:3000, Control Plane on 0.0.0.0:8081. Optional: run the demo API (demo-api/ or demo-api-python/) on 8080.
- Get a test Biscuit and send a request:
Response will include X-VAC-Receipt for use in follow-up requests. More options (CLI, env): Deployment.
Docs
| Doc | Description |
|---|---|
| Architecture | Components, request flow, state |
| API | HTTP API, headers, Datalog policy |
| Deployment | Config, Docker, Kubernetes |
| Observability | Tracing, OpenTelemetry |
| LangChain integration | Using VAC with LangChain / LangGraph |
| Python SDK | Client library and examples |
How it works
- Control Plane (trusted): issues Root Biscuits, runs heartbeats, revocation, kill switch.
- Sidecar (semi-trusted): verifies Biscuits and receipts, evaluates Datalog policy, mints receipts, forwards to upstream with API key. Can be compromised; we use short-lived session keys and heartbeat revocation to limit impact.
- Agent (untrusted): never sees the API key; sends Biscuit + receipts; all traffic goes through the sidecar.
Receipts are signed proofs of completed actions (e.g. “search” done). Policies can require them (e.g. “allow charge only if receipt(search)”). Same workflow is tied together by a correlation ID. Receipts expire in ~5 minutes; session keys rotate on the same order.
| Term | Meaning |
|---|---|
| Root Biscuit | Signed credential from Control Plane; embeds policy |
| Receipt | Signed proof of one completed action; short-lived |
| Correlation ID | Ties a chain of requests (e.g. search → charge) |
| Datalog | Policy language (allow/deny); deterministic |
| Lockdown | Mode where only read-only is allowed (e.g. after heartbeat failures) |
Repo layout
vac/
├── sidecar/ # Main proxy: biscuit, receipt, policy, proxy, heartbeat, revocation, etc.
├── control-plane/ # Mock server (heartbeat, revoke, kill)
├── demo-api/ # Rust demo upstream API
├── demo-api-python/ # FastAPI demo upstream
├── sdks/python/ # Python client (vac_client, example)
├── docs/ # Architecture, API, deployment, observability, LangChain
├── examples/ # langgraph_vac.py, biscuit_spike.rs
├── mcp-server/ # MCP server (vac_request, vac_receipts_count)
└── k8s/ # Kubernetes sidecar deployment
Tech stack
Rust (Axum, Tokio, Reqwest), Biscuit Auth, Ed25519, Clap + config + env, tracing, Wasmtime (WASM adapters), token-bucket rate limiting, optional replay cache. See Architecture.
Testing
Contributing
See CONTRIBUTING.md. For design and layout, Architecture.
License
MIT. See LICENSE.