The Vane sidecar is a local HTTP proxy that runs alongside any AI agent process. It intercepts outbound HTTP/HTTPS calls, attaches the agent’s Vane passport, and attests every call — all without changing a line of agent code.Documentation Index
Fetch the complete documentation index at: https://docs.vane.build/llms.txt
Use this file to discover all available pages before exploring further.
How it works
Configuration
All configuration is via environment variables. None have defaults exceptSIDECAR_PORT and SIDECAR_CA_CERT_FILE.
| Variable | Required | Default | Description |
|---|---|---|---|
COUNSEL_API_URL | Yes | — | Base URL of the Vane server (e.g., https://vane.build). |
COUNSEL_API_KEY | Yes | — | Company-scoped API key. |
COUNSEL_AGENT_ID | Yes | — | Agent ID pre-registered on the Vane server. |
COUNSEL_COMPANY_ID | Yes | — | Company ID. |
SIDECAR_PORT | No | 8080 | Port to listen on. Always binds to 127.0.0.1. |
SIDECAR_AGENT_TARGET | No | — | Where to forward verified inbound calls (e.g., http://localhost:3001). Required for inbound (reverse proxy) mode. |
SIDECAR_CA_CERT_FILE | No | ./vane-ca.pem | Path to write the MITM CA certificate. |
Starting the sidecar
- Fetches an agent passport from Vane (using
POST /v1/agents/{agentId}/passport) - Generates a MITM CA certificate and writes it to
SIDECAR_CA_CERT_FILE - Starts listening on
127.0.0.1:SIDECAR_PORT - Prints configuration instructions
Using the sidecar — outbound (forward proxy)
Configure your agent process to use the sidecar as its HTTP proxy. Every outbound call will automatically get the agent’sVane-Passport header injected.
HTTP
HTTPS (Node.js agent)
Install the MITM CA cert, then set the proxy:HTTPS (Python agent with requests)
What happens on each outbound call
- The sidecar intercepts the request.
- It fetches the cached passport (refreshed automatically when < 5 minutes remain before expiry).
- It injects
Vane-Passport: <token>into the request headers. - If no
Authorizationheader is already set, it also injectsAuthorization: Bearer <passport>. - It forwards the request to the real destination.
- It sends an attestation record to Vane (fire-and-forget:
actionType: "outbound-http", payload:{ method, url, host, path }).
Using the sidecar — inbound (reverse proxy)
SetSIDECAR_AGENT_TARGET to your agent’s local address. The sidecar will verify incoming Vane-Passport (or Authorization: Bearer <cap-jwt>) headers before forwarding to your agent.
http://127.0.0.1:8080/... — the sidecar verifies the passport locally (no Vane server call) and forwards to http://localhost:3001/....
Requests without a valid passport receive:
Downloading the MITM CA certificate
The CA cert is always available at:Passport caching and refresh
The sidecar caches the agent passport and automatically refreshes it when fewer than 5 minutes remain before expiry. A new passport is fetched fromPOST /v1/agents/{agentId}/passport with scopes: ["tool:*", "attest:write"] and a 3600-second TTL.
If the Vane server is unavailable when a refresh is needed, the sidecar returns 502 on the proxied request.
Notes
- The sidecar always binds to
127.0.0.1— it is not accessible from other machines. - The MITM CA uses ECDSA P-256 (not Ed25519) because the
@peculiar/x509library used to issue certificates uses WebCrypto for CA operations. - Leaf certificates per hostname are cached for 1 hour; the CA cert is valid for 1 year.
- Only HTTP/1.1 is supported for HTTPS MITM. HTTP/2 upstream connections are not implemented.