---
title: "Get Agent Stats"
method: GET
path: "/api/v1/agents/{agent_id}/stats"
tags: ["stats"]
---

# Get Agent Stats

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

## Request

- Base URL: `https://api.badgeia.com`
- URL: `https://api.badgeia.com/api/v1/agents/{agent_id}/stats`
- Auth: none declared

Get comprehensive stats for an agent including:
- total_runs, successful_runs, failed_runs
- avg_latency_ms, avg_cost_usd
- best_task (highest success rate)
- worst_task (lowest success rate)
- recent_runs (last 10)

NOTE: stats are publicly accessible for leaderboard agents

## Path parameters

- `agent_id` string, uuid, required

## Response `200`

Successful Response

- AgentStatsResponse
  - `agent_id` string, uuid, required
  - `total_runs` integer, required
  - `successful_runs` integer, required
  - `failed_runs` integer, required
  - `avg_latency_ms` number, nullable, required
  - `avg_cost_usd` number, nullable, required
  - `reliability_score` number, required
  - `completion_rate` number
  - `cost_score` number
  - `composite_score` number
  - `best_task` TaskStats, required
    - `task_id` string, uuid, required
    - `task_title` string, nullable, required
    - `success_rate` number, required
    - `total_runs` integer, required
    - `successful_runs` integer, required
  - `worst_task` TaskStats, required
    - `task_id` string, uuid, required
    - `task_title` string, nullable, required
    - `success_rate` number, required
    - `total_runs` integer, required
    - `successful_runs` integer, required
  - `recent_runs` object[], required
  - `verified_state` string
  - `cost_basis` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/badgeia/apis/badge.md) · [All operations](https://skmtc.dev/badgeia/apis/badge/llms.txt) · [OpenAPI document](https://skmtc.dev/badgeia/apis/badge/revisions/7e7f7fee8b77?raw)
