Get Agent Metrics
GET /api/v1/accountability/metrics/{agent_role}
Get performance metrics for a single agent.
Validates the agent role against the canonical C-suite list and returns computed metrics for the given period. Best-effort syncs results to Firestore for real-time dashboard display.
Args: agent_role: The agent role to query (e.g. ‘ceo’). period_days: Number of days to look back. user: The authenticated user context. svc: The agent metrics service (injected).
Returns: Performance metrics for the specified agent.
Raises: HTTPException: 404 if agent_role is not a valid C-suite role.
Authorizations
Parameters
Path Parameters
Query Parameters
Number of days to look back
Number of days to look back
Responses
200
Successful Response
Performance metrics for a single agent over a time period.
Attributes: agent_role: The agent role these metrics describe. total_tasks: Total tasks assigned in the period. completed_tasks: Tasks completed successfully. failed_tasks: Tasks that failed. success_rate: Ratio of completed to total (0.0-1.0). avg_completion_time_ms: Average task completion time in ms. escalation_count: Number of escalations (input-required). quality_gate_pass_rate: Ratio of quality gate passes (0.0-1.0). period_start: Start of the measurement period. period_end: End of the measurement period.
object
422
Validation Error