Architecture overview
Connecting agents
There are two ways to route agent traffic through the gateway:
Both paths use the same gateway, secrets, and policy rules.
Rust gateway
The gateway (apps/proxy) is an HTTP gateway built in Rust that intercepts outbound requests, enforces rules, and injects credentials. Agents authenticate with access tokens via Proxy-Authorization headers.
How it works:
- Your agent makes a normal HTTP request (e.g.,
GET https://www.googleapis.com/calendar/v3/events) - The request goes through the gateway instead of directly to the internet
- The gateway evaluates rules. If a rule blocks or rate-limits the request, the agent receives a 403 or 429 response immediately
- If allowed, the gateway matches the target host and path against stored secrets, decrypts the matching credentials, and injects them as HTTP headers (e.g.
Authorization: Bearer ...) or URL query parameters (e.g.?key=...) - The request is forwarded to the service with credentials attached
- The response passes back through to your agent unchanged
- Runs on port 10255
- Agents authenticate with access tokens (each agent gets its own scoped token)
- Rules are evaluated before credential injection, so blocked requests never touch your secrets
- Host and path pattern matching routes secrets to the right API endpoints
- MITM interception for HTTPS traffic
- Built in Rust for low-latency proxying
Policy engine
The policy engine enforces rules on every request that passes through the gateway. Rules are evaluated top-down, first match wins: each rule pairs identities (which agents or people) with targets (an app and its tools, a connection, a secret, or a network pattern) and applies an action:- Block: Deny the request entirely (403)
- Allow: Permit it, optionally requiring human approval, or rate-limited to N requests per window (429 beyond the cap)
Secret store
The secret store uses AES-256-GCM encryption at rest. Secrets are decrypted only at request time, matched by host and path patterns, and injected by the gateway as HTTP headers or URL query parameters. Credentials are never stored in plain text. The encryption key is auto-generated on first run or can be set via theSECRET_ENCRYPTION_KEY environment variable.
Web dashboard
The dashboard (apps/web) runs on port 10254 and is where you manage everything:
- Create agents with scoped access tokens
- Add, rotate, and revoke secrets for any service
- Configure host and path patterns for credential matching
- Create rules to block or rate-limit specific operations
- See which agent accessed which service and when (audit logs)