Skip to content

feat: add remaining activity event types (task_started, tool_used, delegation, cost_incurred) #812

@Aureliolo

Description

@Aureliolo

Context

PR #811 implements GET /api/v1/agents/{agent_name}/activity with support for lifecycle events (hired, fired, promoted, demoted, onboarded, offboarded, status_changed) and task completion events (task_completed).

Issue #772 originally specified 10 event types. The following 5 are not yet implemented because their underlying data sources are not persisted/accessible as queryable records:

Missing Event Types

  • task_started -- requires a task lifecycle event or start timestamp in TaskMetricRecord
  • tool_used -- requires persisted tool invocation records
  • delegation_sent -- requires persisted delegation event records
  • delegation_received -- requires persisted delegation event records
  • cost_incurred -- requires granular cost event records (beyond task-level cost in TaskMetricRecord)

Approach

Each event type needs:

  1. A persisted data source (new repository or extended existing one)
  2. A converter function in hr/activity.py (like _lifecycle_to_activity and _task_metric_to_activity)
  3. Integration into merge_activity_timeline to accept the new data source
  4. Controller update to fetch and pass the new data
  5. Unit tests for the converter and merged timeline

Parent

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:mediumShould do, but not blockingscope:medium1-3 days of workspec:apispec:hrDESIGN_SPEC Section 8 - HR & Workforce Managementtype:featureNew feature implementationv0.5Minor version v0.5

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions