Agent Runtime Metrics
Track agent runs from startup through completion and identify tasks waiting for attention.
Metrics
| Metric | Type | Labels | Measures |
|---|---|---|---|
agent_ | Counter | Agent Runtime runs that reached a running backend | |
agent_ | Counter | outcome | Finished runs: completed, failed, stopped_, expired_, or expired_ |
agent_ | Histogram | Startup time, including scheduling and image pulls | |
agent_ | Counter | steer_ | Steering messages delivered into running sessions |
agent_ | Counter | interface, outcome | Final replies delivered to chatops or email |
agent_ | Counter | reason | Runtime tool calls Guardrails refused or held at the runtime boundary |
agent_ | Counter | outcome | Pending runtime file exports and their outcomes: pinned, admitted, held, or discard_ |
agent_ | Counter | outcome | Runtime reads a governed session made while Guardrails enforcement was off: signed so they pass once it is back on, or unsigned because the call could not be recorded |
agent_ | Gauge | agent_, backend, condition | Current task counts per condition |
agent_ | Gauge | agent_, backend, condition | Age of the oldest task per condition |
agent_ | Gauge | Time of the last health snapshot |
Boundary Refusal Reasons
Filter agent_ by reason to identify missing session proofs, rejected clients, refused launches, or held runtime output.
Health Conditions
agent_ conditions are working, submitted, input_, auth_, failed_ (the last 15 minutes), and completion_. Conditions overlap: a task waiting for authentication also counts as working. agent_ conditions are heartbeat, submitted, and completion_.
Replica Aggregation and Freshness
Every replica reports the same health gauge values, so aggregate them with max, not sum. Alert on failed scrapes too, because missing samples do not mean healthy runs. A fresh heartbeat shows the orchestration is alive, not that the agent is making progress.
This alert finds runs whose heartbeat is more than two minutes old:
max by (agent_id, backend) (
agent_runtime_health_age_seconds{condition="heartbeat"}
) > 120
Add a pending period (for: 5m) to skip transient spikes.
Kubernetes Collection
Pod and cluster resource metrics come from Kubernetes collectors, separately from Archestra's runtime metrics:
| Collector | Signals |
|---|---|
kubelet /metrics/cadvisor | Container CPU usage and memory working set |
| kube-state-metrics | Pod phase, readiness, restart counts, termination reasons, and node allocatable capacity |
Scrape both sources and preserve cluster, namespace, pod, and container labels so resource series can be scoped to runtime workloads. Missing collectors produce no resource samples; they do not imply zero resource use.