Gateway dashboard reference
The gateway dashboard provides real-time visibility into LLM API gateway traffic. It shows request volumes, cost, PII detections, policy enforcement, tool governance, and budget utilization — all from a single embedded HTML page with no external dependencies.
Enabling the dashboard
The dashboard is available when Talon runs in gateway mode. No extra flags are needed:
talon serve --gateway --gateway-config talon.config.yaml
The dashboard is served on the same port as the API (default :8080).
Configuration
Set the server admin key so dashboard and metrics endpoints are protected:
export TALON_ADMIN_KEY="your-secret-admin-key"
talon serve --gateway --gateway-config talon.config.yaml
If TALON_ADMIN_KEY is unset, admin endpoints are unrestricted (dev only).
Endpoints
All dashboard endpoints are served on the main server port (same as /health, /v1/evidence, etc.).
GET /gateway/dashboard
Returns the single-file HTML dashboard. The page auto-connects to the SSE stream for live updates, with a polling fallback.
Authentication: Requires admin auth. Any of:
- Header (recommended):
X-Talon-Admin-Key: <key> - Bearer:
Authorization: Bearer <key> - Query (GET only, for browser bookmarks):
?talon_admin_key=<key>(legacy?token=<key>is still accepted)
Use the query parameter when opening either dashboard in a browser (browsers cannot send custom headers on navigation). Same pattern for both:
- Governance dashboard:
http://localhost:8080/dashboard?talon_admin_key=YOUR_TALON_ADMIN_KEY - Gateway dashboard:
http://localhost:8080/gateway/dashboard?talon_admin_key=YOUR_TALON_ADMIN_KEY
Each page reads talon_admin_key (or legacy token), sets window.TALON_ADMIN_KEY, and removes the query from the URL so the key is not left in the address bar. API calls then use the header. Ensure the server was started with TALON_ADMIN_KEY set to the same value.
curl -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" http://localhost:8080/gateway/dashboard
GET /api/v1/metrics
Returns the current metrics snapshot as JSON.
Authentication: Same as above.
curl -s -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" http://localhost:8080/api/v1/metrics | jq .
Response:
{
"generated_at": "2026-03-09T14:32:00Z",
"enforcement_mode": "enforce",
"uptime": "2h15m",
"summary": {
"total_requests": 1247,
"blocked_requests": 23,
"pii_detections": 89,
"pii_redactions": 67,
"tools_filtered": 12,
"total_cost_eur": 4.82,
"avg_latency_ms": 340,
"p99_latency_ms": 1200,
"error_rate": 0.018,
"active_runs": 2,
"pending_plans": 4,
"approved_plans": 11,
"rejected_plans": 2,
"modified_plans": 1,
"dispatched_plans": 8,
"plan_dispatch_errors": 1
},
"requests_timeline": [
{"time": "14:25", "count": 42},
{"time": "14:30", "count": 38}
],
"pii_timeline": [
{"time": "14:25", "count": 3},
{"time": "14:30", "count": 1}
],
"cost_timeline": [
{"time": "14:25", "cost_eur": 0.15},
{"time": "14:30", "cost_eur": 0.12}
],
"caller_stats": [
{
"caller": "openclaw-main",
"requests": 820,
"pii_detected": 45,
"blocked": 8,
"cost_eur": 3.10,
"avg_latency_ms": 320
}
],
"pii_breakdown": [
{"type": "email", "count": 42},
{"type": "iban", "count": 18}
],
"model_breakdown": [
{"model": "gpt-4o-mini", "requests": 900, "cost_eur": 2.1}
],
"provider_breakdown": [
{"provider": "openai", "requests": 900, "cost_eur": 2.1}
],
"tool_governance": {
"total_requested": 150,
"total_filtered": 12,
"top_filtered": [
{"tool": "file_write", "count": 8}
],
"by_risk_level": [
{"level": "high", "count": 5}
],
"bulk_operations": 2,
"irreversible_blocked": 3,
"anomalous_agents": []
},
"shadow_summary": {
"total_violations": 15,
"by_type": [
{"type": "pii_would_block", "count": 10}
]
},
"budget_status": {
"daily_used": 4.82,
"daily_limit": 50.0,
"daily_percent": 9.64,
"monthly_used": 142.50,
"monthly_limit": 500.0,
"monthly_percent": 28.5
},
"cache_stats": {
"hits": 312,
"hit_rate": 0.25,
"cost_saved": 1.20
},
"plan_stats": {
"pending": 4,
"approved": 11,
"rejected": 2,
"modified": 1,
"dispatched": 8,
"dispatch_failures": 1
}
}
GET /api/v1/metrics/stream
Server-Sent Events stream. Pushes one JSON snapshot every 5 seconds.
Authentication: Same as above.
curl -N -H "X-Talon-Admin-Key: $TALON_ADMIN_KEY" http://localhost:8080/api/v1/metrics/stream
Each event has the format:
data: {"generated_at":"2026-03-09T14:32:05Z","enforcement_mode":"enforce",...}
data: {"generated_at":"2026-03-09T14:32:10Z","enforcement_mode":"enforce",...}
The HTML dashboard connects to this endpoint automatically for live updates. If SSE fails, it falls back to polling /api/v1/metrics every 10 seconds.