Skip to content

feat: agent performance metrics and activity timeline endpoints #772

@Aureliolo

Description

@Aureliolo

Phase 3.2 -- Agent Performance & Activity

Parent: #762

Context

The new dashboard shows agent biographies with performance metrics and activity timelines. The domain models exist (TaskMetricRecord, AgentLifecycleEvent, CollaborationScoreResult) but are not exposed via API.

Scope

GET /api/v1/agents/{agent_name}/performance

  • Response: tasks_completed (total/7d/30d), avg_completion_time_seconds, success_rate_percent, cost_per_task_usd, quality_score, collaboration_score, trend_direction
  • Data sources: TaskMetricRecord, CollaborationScoreResult from PerformanceTracker

GET /api/v1/agents/{agent_name}/activity (paginated)

  • Response: paginated list of {event_type, timestamp, description, related_ids}
  • Event types: hired, fired, promoted, demoted, task_started, task_completed, tool_used, delegation_sent, delegation_received, cost_incurred
  • Data sources: AgentLifecycleEvent + inferred events from TaskMetricRecord

GET /api/v1/agents/{agent_name}/history

  • Response: career events (hire date, role changes, promotions, milestones)
  • Data source: AgentLifecycleEvent (already persisted via LifecycleEventRepository)

Deliverables

  • Performance metrics endpoint
  • Paginated activity timeline endpoint
  • Career history endpoint
  • Unit tests
  • OpenAPI schema updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:highImportant, should be prioritizedscope:medium1-3 days of workspec:apispec:hrDESIGN_SPEC Section 8 - HR & Workforce Managementtype:featureNew feature implementationv0.5Minor version v0.5v0.5.0Patch release v0.5.0

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions