Read pre-aggregated session, usage, and environment analytics
Returns totals, a time series, and default breakdowns for one metric family over a time window. Figures are kept up to date as work happens rather than recomputed from session events, so the cost of a request depends on the window rather than on how much history the organization has, and every response reports its own freshness through as_of and lag_seconds. Percentiles are approximate. scope defaults to the caller’s own organization, which is the scope an organization member reads; tenant and global need a tenant-administrator identity and answer 403 otherwise.
Authorizations
A Recursion API key, created in the console under API keys.
Path Parameters
Metric family to read: managed_agent_usage for tool, token, and cost figures, managed_agent_turn for turn counts and turn duration percentiles, managed_agent_environment for sandbox startup latency, managed_agent_completion for first successful root-session completions, and managed_agent_quality for immutable evaluation and criterion verdicts.
managed_agent_usage, managed_agent_turn, managed_agent_environment, managed_agent_completion, managed_agent_quality Query Parameters
Read locality. workspace is the caller's own organization; tenant aggregates every workspace in the parent tenant organization and requires a Tenant Admin role.
workspace, tenant With scope=tenant, narrow to one workspace of the tenant. Ignored at workspace scope, where the authenticated organization is authoritative.
RFC 3339 start of the window. Defaults to seven days before to. Widened outward to a bucket boundary.
RFC 3339 exclusive end of the window. Defaults to now.
Series bucket width. Defaults to hourly for windows up to two days and daily beyond that.
hour, day Filter to work under sessions launched from this agent, including its subagents.
Filter to work performed by this agent, whether it was launched directly or delegated to.
Filter to one immutable agent version.
Filter to one provider model id.
Filter to one tool. Note that token and cost figures are model spend and are not attributable to a tool, so filtering by one reports only that tool's own direct cost.
Filter by outcome: tool call state for usage, startup result for environments, or immutable verdict for quality.
in_flight, completed, failed, ready, pending, pass, fail, not_applicable Filter environment analytics to one sandbox provider, e.g. runs or docker. self_hosted is accepted for historical queries.
Filter environment analytics to one environment.
Filter environment analytics by compute kind: cpu, or an accelerator type and name such as gpu:a100.
Filter environment analytics to one machine type, or to the requested CPU and memory shape when the provider names none.
Filter quality analytics to evaluations of one target agent.
Filter quality analytics to one immutable target-agent version.
Filter quality analytics to verdicts produced by one evaluator agent.
Filter quality analytics to one immutable evaluator-agent version.
Filter quality analytics to one stable rubric criterion key.
Filter quality analytics by the target task archetype frozen on the evaluation.
Filter quality analytics by the target size bucket frozen on the evaluation.
Return the series split into one line per value of this dimension, for a stacked chart, alongside the combined series. Capped at the top eight groups by the family's ranking measure. Omit for the combined series only.
Rows per breakdown.
x <= 100Response
Pre-aggregated analytics for one metric family, scope, and time window. Figures are kept up to date as work happens rather than recomputed from session events, so a response is fast regardless of how much history the organization has, and states its own freshness through as_of and lag_seconds.
Pre-aggregated analytics for one metric family, scope, and time window. Figures are kept up to date as work happens rather than recomputed from session events, so a response is fast regardless of how much history the organization has, and states its own freshness through as_of and lag_seconds.
How current these figures are. Activity after this instant is counted in a later read.
The family's default groupings, each capped by limit.
Metric family these figures come from.
Version of the family's definition. A change here means how the figures are derived changed.
Inclusive start actually aggregated, widened outward to a bucket boundary.
Width of each series bucket. Chosen from the window: hourly up to two days, daily beyond that.
hour, day Seconds between as_of and now. A steady value under a minute is normal; a growing one means the figures are catching up.
Read locality the figures were aggregated at, after authorization. This may be narrower than the scope requested.
workspace, tenant, global One point per time bucket, ascending. Buckets with no activity are omitted rather than zero-filled.
Exclusive end actually aggregated, widened outward to a bucket boundary.
The whole window aggregated into one figure set.
Dimension series_groups is split by, echoing the request. Absent when no stacked series was asked for.
One band per dimension value, for a stacked chart. Present only when series_group_by was requested.