Appearance
Runtime Metrics
GET /runtime/metrics returns operational metrics computed fresh on every request from existing session/decision/policy state — nothing is cached or separately persisted. Every field is traceable back to a real session, decision, or policy record.
Scope
Scoped to Runtime Sessions created via the v0.2+ API and to the resolved tenant (see Security for what tenant scoping does and doesn't guarantee today). A decision created via the raw legacy /runtime/requests path (no session) is not included.
Filters
| Query param | Effect |
|---|---|
agent_id | Narrow to one agent |
task_type | Narrow to one workflow |
from / to | ISO 8601 timestamp range on started_at |
X-Tenant-ID always scopes the result — it is not a query parameter.
Response shape (summary)
summary— aggregate counts: sessions by state, human reviews required, approved/rejected/retried, risk distribution, evidence failures, policy hits, Agent Run counts (total_agent_runs,internal_agent_runs,external_agent_runs,average_runs_per_session,retry_rate)agents— per-agent breakdown, including zero-session registered agentsworkflows— per-task-type breakdownpolicies— per-policy hit/block/review/pause/flag countsrecent_interventions— the most recent 10–20 meaningful interventions (human review, block, unsupported claim, medication intervention, high risk, pause, retry, rejection), newest firsttop_agents_by_volume,top_model_providers,top_model_versions
SDK usage
ts
const metrics = await runtime.getMetrics({ agent_id: "acme-radiology-copilot" });
console.log(metrics.summary.human_reviews_required);
console.log(metrics.recent_interventions);Known limitation
Because metrics are computed on read rather than pre-aggregated, very large session volumes will make this endpoint slower over time. That tradeoff is intentional for v1 — see the root README's production roadmap for the pre-aggregation plan.