system/activity-logging.md
Every significant agent action should be logged as an Activity record. This provides:
- Audit trail for debugging
- Performance monitoring
- Inter-agent visibility
POST /api/v1/activities
{
"agent_slug": "mack",
"activity_type": "task_completed",
"description": "Scraped 48 team records from FIFA API",
"task_slug": "task-abc123",
"metadata": { "records_count": 48, "source": "fifa-api" }
}
| Type | When to Use |
|---|---|
task_started |
Agent begins work on a task |
task_completed |
Task finished successfully |
task_failed |
Task encountered an error |
task_assigned |
Orchestrator assigns a task |
deployment |
Code deployed to an environment |
data_sync |
Data synchronized between systems |
system_check |
Health check or monitoring sweep |
error |
Unexpected error occurred |
heartbeat |
Agent reporting it's alive and idle |
GET /api/v1/activities — All recent activityGET /api/v1/activities?agent_slug=mack — Filter by agentGET /api/v1/activities?activity_type=deployment — Filter by type