How it works
Quick start
Identifying the calling agent
The proxy reads theX-Drako-Agent request header to identify which agent is making the call. This is required for per-agent ODD rules and magnitude limits.
agent=unknown and agent-specific ODD checks are skipped.
What gets enforced
The proxy runs a subset of the full SDK enforcement pipeline:ODD — Operational Design Domain
ODD — Operational Design Domain
Checks whether the tool being called is permitted for this agent:The tool name is extracted from the request body (
function_call, tool_choice, or tool_calls in the last assistant message).Magnitude — rate limiting
Magnitude — rate limiting
Tracks actions per agent per minute:
DLP — Data Loss Prevention
DLP — Data Loss Prevention
Scans the full request payload (all messages) for PII patterns:
| Pattern | What it detects |
|---|---|
SSN | \d{3}-\d{2}-\d{4} |
credit_card | 16-digit card numbers (with spaces/dashes) |
email_pii | Email addresses |
HITL — Human-in-the-Loop
HITL — Human-in-the-Loop
Holds specific tool calls for human approval before forwarding to the upstream API:When a matching tool call arrives, the proxy returns HTTP 202 with an
approval_id. The agent must poll the approval endpoint or implement a callback.Blocked request responses
| HTTP status | Cause |
|---|---|
403 | ODD violation (tool forbidden) or DLP violation (PII/PCI detected) |
429 | Magnitude limit exceeded |
202 | HITL pending — request held for human approval |
Monitoring endpoints
The proxy exposes three read-only HTTP endpoints:GET /status returns detailed proxy status including per-agent cost totals and action counts. Decisions are allowed, rejected, or pending_approval.
Every proxied response also includes governance headers:
| Header | Value |
|---|---|
X-Drako-Proxy | true |
X-Drako-Latency-Ms | Round-trip latency in milliseconds |
X-Drako-Cost-USD | Estimated cost (when model pricing is known) |
Deployment
- Docker
- Docker Compose
- Helm
Proxy vs SDK integration
| Proxy mode | SDK (govern()) | |
|---|---|---|
| Code changes required | None | One line |
| Agent can bypass | No | No (middleware wraps every call) |
| Intent verification | Not available | Available |
| HITL approval UI | Bring your own callback | Built-in webhook + UI |
| Persistent audit trail | In-memory only (reset on restart) | Persistent, exportable |
| Multi-agent topology | Not available | Available |
| Best for | Quick adoption, legacy codebases | Full governance, compliance requirements |