Events
Stream and query swarm lifecycle events — task transitions, agent state changes, and audit log
/api/eventsAuthorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Query Parameters
"tool" | "skill" | "session" | "api" | "task" | "workflow" | "system""tool.start" | "tool.end" | "skill.invoke" | "skill.complete" | "session.start" | "session.end" | "session.resume" | "session.cost" | "api.request" | "api.error" | "task.poll" | "task.assign" | "task.timeout" | "workflow.step.start" | "workflow.step.end" | "workflow.run.start" | "workflow.run.end" | "system.boot" | "system.migration" | "system.error" | "system.profile_sync_rejected" | "system.profile_sync_reconciled" | "system.profile_sync_conflict" | "script.global_upsert" | "schedule.deleted""ok" | "error" | "timeout" | "skipped""worker" | "api" | "hook" | "scheduler" | "cli"1 <= value <= 1000Comma-separated event names; matches any of them (ANDed with event)
Comma-separated data.field values, used with latestPerDataField
When true, return only the newest event per (event, data.field) pair for every name in event/events and every value in dataFields
"true" | "false"Response Body
application/json
application/json
curl -X GET "http://localhost:3013/api/events"{
"events": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"category": "tool",
"event": "tool.start",
"status": "ok",
"source": "worker",
"agentId": "string",
"taskId": "string",
"sessionId": "string",
"parentEventId": "string",
"numericValue": 0,
"durationMs": 0,
"data": {
"property1": null,
"property2": null
},
"createdAt": "2019-08-24T14:15:22Z"
}
],
"latestPerDataField": true
}{
"error": "string",
"property1": null,
"property2": null
}/api/eventsAuthorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "http://localhost:3013/api/events" \ -H "Content-Type: application/json" \ -d '{ "category": "tool", "event": "tool.start", "source": "worker" }'{
"success": true,
"event": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"category": "tool",
"event": "tool.start",
"status": "ok",
"source": "worker",
"agentId": "string",
"taskId": "string",
"sessionId": "string",
"parentEventId": "string",
"numericValue": 0,
"durationMs": 0,
"data": {
"property1": null,
"property2": null
},
"createdAt": "2019-08-24T14:15:22Z"
}
}{
"error": "string",
"property1": null,
"property2": null
}/api/events/batchAuthorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "http://localhost:3013/api/events/batch" \ -H "Content-Type: application/json" \ -d '{ "events": [ { "category": "tool", "event": "tool.start", "source": "worker" } ] }'{
"success": true,
"count": 0
}{
"error": "string",
"property1": null,
"property2": null
}/api/events/countsAuthorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Query Parameters
"tool" | "skill" | "session" | "api" | "task" | "workflow" | "system""worker" | "api" | "hook" | "scheduler" | "cli"Response Body
application/json
curl -X GET "http://localhost:3013/api/events/counts"{
"counts": [
{
"event": "string",
"count": 0
}
]
}