v1

latestOpenAPI 3.1.02026-08-04151221521.2 KB
Agents

Get Agent Metrics

Get aggregated metrics for an agent over the last 24 hours. Includes task success rate, task count, error log count, and average task duration.

get/agents/{agent_id}/metrics

Path parameters

agent_idstring required

Query parameters

branch_idstring nullable

Optional branch ID filter

Optional branch ID filter

Response

Successful Response

avg_task_duration_secondsnumber nullable

Average duration of completed/failed tasks in seconds. None if no tasks have finished in the time window.

error_log_count_24hinteger required

Number of ERROR/CRITICAL level logs in the last 24 hours

task_count_24hinteger required

Total number of tasks created in the last 24 hours

task_success_rate_pctnumber nullable

Percentage of successful tasks (COMPLETED) vs failed tasks. None if no tasks have finished in the time window.

Example response

{
  "avg_task_duration_seconds": 12.5,
  "error_log_count_24h": 3,
  "task_count_24h": 142,
  "task_success_rate_pct": 95.5
}