# Agent Monitoring API

Agent Monitoring

 - [GET /agent-monitoring/api/v1/monitoring/agents/by-name](https://docs.businessai.uniphorecloud.com/api-reference/api/agent-monitoring-api/list_agents_by_name_metrics_api_v1_monitoring_agents_by_name_get.md): Return statistical metrics for every distinct agent_name found in Opik. `page_size` controls how many **agents** are returned per page (not traces). `trace_size` caps the number of traces fetched per
 - [GET /agent-monitoring/api/v1/monitoring/agents/by-name/{agent_name}](https://docs.businessai.uniphorecloud.com/api-reference/api/agent-monitoring-api/get_agent_metrics_by_name_api_v1_monitoring_agents_by_name__agent_name__get.md): Return statistical metrics for all traces belonging to a given agent_name. Filters Opik traces by `metadata.agent_name` and aggregates them into a single statistical summary. Each metric field exposes
 - [GET /agent-monitoring/api/v1/monitoring/agents/executions](https://docs.businessai.uniphorecloud.com/api-reference/api/agent-monitoring-api/get_agent_executions_api_v1_monitoring_agents_executions_get.md): Return a paginated list of individual executions, optionally filtered. At least one of `agent_id` or `agent_name` is required. `start_date_time` and `end_date_time` are required unless `last_n`, `agen
 - [GET /agent-monitoring/api/v1/monitoring/agents/{agent_id}](https://docs.businessai.uniphorecloud.com/api-reference/api/agent-monitoring-api/get_agent_metrics_api_v1_monitoring_agents__agent_id__get.md): Return aggregated monitoring metrics for a single agent. Queries Opik traces where `metadata.agent_id` matches the given UUID and aggregates metrics over all collected traces. Use **start_date**/**end
 - [GET /agent-monitoring/api/v1/monitoring/agents](https://docs.businessai.uniphorecloud.com/api-reference/api/agent-monitoring-api/list_agents_metrics_api_v1_monitoring_agents_get.md): Return aggregated monitoring metrics for every agent found in Opik. Groups traces by `metadata.agent_id` and returns one summary per agent, ordered by most recently active first. Use **start_date**/**
 - [GET /agent-monitoring/api/v1/monitoring/system/health](https://docs.businessai.uniphorecloud.com/api-reference/api/agent-monitoring-api/get_system_health_api_v1_monitoring_system_health_get.md): Return overall system-level health metrics. Aggregates across all agents found in Opik (or the specified agents): - **total_agents**, **total_agents_by_name** - **total_executions**, **total_cost_usd*
 - [GET /agent-monitoring/api/v1/monitoring/system/health/timeseries](https://docs.businessai.uniphorecloud.com/api-reference/api/agent-monitoring-api/get_system_health_timeseries_api_v1_monitoring_system_health_timeseries_get.md): Return a time-series of system-health snapshots for charting. For `interval` in `hourly`/`daily`/`weekly` each entry in `buckets` is the same shape as `GET /system/health` but computed only over trace
 - [GET /agent-monitoring/api/v1/monitoring/system/status](https://docs.businessai.uniphorecloud.com/api-reference/api/agent-monitoring-api/get_status_summary_api_v1_monitoring_system_status_get.md): Return a status summary based on Opik traces. - **trace_statuses**: count of traces per derived status (`{"completed": 120, "failed": 5, "in_progress": 2}`). Derived from `error_info` (failed) / `end_
