Skip to main content

Observe agents, traffic and cost

Everything the gateway and your other sources record is readable through the Portal API. These calls need the view_security permission (observability) or view_cost (cost figures).

Agent observability​

CallReturns
GET /api/observability/agentsAgents to select from
GET /api/observability/agents/summaryExecutions, success rate, latency, tokens, policy decisions and coverage for a window
GET /api/observability/agents/executionsOne row per execution, paged
GET /api/observability/tracesA trace list, filterable by status (ok, error, blocked, gated, unknown)
GET /api/observability/traces/{trace_id}The ordered spans of one trace
GET /api/observability/modelsUsage by model

Windows are half-open [since, until), at most 90 days. Defaults to the last 24 hours.

An execution is one gateway request. executions = succeeded + failed + blocked + gated. Blocked and gated calls are not counted as failures, and success_rate is succeeded / (succeeded + failed).

Unknown is not zero​

Where something was not recorded, you get null and an explicit marker, never a zero:

  • Token totals are summed only over completed calls that reported usage; the summary says how many (recorded of of). Streamed responses report none.
  • Latency covers calls with a measured latency. A latency of 0 means not measured.
  • cost_usd is null with cost_recorded: false where no price data exists.

Trace attributes are an allow-list of masked scalars. Prompts, responses, tool arguments and reasoning are never returned.

Traffic and cost​

CallReturns
GET /api/traffic/summaryTotals for a window
GET /api/traffic/requests, /requests/{id}Governed requests
GET /api/traffic/spikesUnusual volume
GET /api/traffic/export.csvCSV export
GET /api/gateway/requests, /metricsThe gateway request log and KPIs

Realtime​

The console receives hints over a WebSocket and refetches. The socket is for the console; integrate with the REST calls above.