---
title: "How an agent's model requests were routed"
method: GET
path: "/api/v1/agents/{agent_id}/routing-stats"
tags: ["agents"]
---

# How an agent's model requests were routed

`GET /api/v1/agents/{agent_id}/routing-stats`

## Request

- Base URL: `https://cp.xenovia.io` (the document declares no server; this is the origin it was published from)
- URL: `https://cp.xenovia.io/api/v1/agents/{agent_id}/routing-stats`
- Auth: none declared

The agent's model requests over the window, from telemetry: how many
a fallback served, how many every provider failed (``exhausted``), per
provider connection the requests it served and its failed attempts
(``position`` 0 = the primary, 1..3 = its fallback position now, null =
no longer in the route), and the failure classes the runtime moved on
for. ``available: false`` with zeros when telemetry cannot be read.

## Path parameters

- `agent_id` string, uuid, required

## Query parameters

- `window` '1h' | '24h' | '7d': 1h, 24h or 7d

## Headers

- `Authorization` string, nullable

## Response `200`

Successful Response

- AgentRoutingStats: GET /agents/{agent_id}/routing-stats: an agent's model requests over a window, from telemetry. ``available`` is false (and every number zero) when the telemetry store cannot be read.
  - `window` '1h' | '24h' | '7d', required
  - `available` boolean
  - `requests` integer
  - `served_by_fallback` integer
  - `fallback_rate` number
  - `exhausted` integer
  - `by_provider` RoutingStatsProvider[]
    - `provider_id` string, uuid, required
    - `position` integer, nullable, required
    - `served` integer, required
    - `failed_attempts` integer, required
  - `reasons` RoutingStatsReason[]
    - `reason` string, required
    - `count` integer, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-04** `b475b750a0b7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/xenovia/apis/controlplane/changes/api/v1/agents/:agent_id/routing-stats/get.md)

---

[API](https://skmtc.dev/xenovia/apis/controlplane.md) - [All operations](https://skmtc.dev/xenovia/apis/controlplane/llms.txt) - [OpenAPI document](https://skmtc.dev/xenovia/apis/controlplane/revisions/3e25bef24f8f?raw)
