Docs navigation
Events

List Events

List Events

GET/v2/tasks/{task_id}/events

List events, one page per call. Events are ordered by ts unless order_by_received is true. To read a complete transcript longer than one page, page in arrival order: pass order_by_received=true, then repeat with after_received_at and after_id set to the last event of the previous page until a page comes back shorter than limit. A ts cursor can skip events that are written at turn end with an earlier ts. Sort by ts for display.

Path Parameters

task_idstring · uuidrequired

Query Parameters

limitintegeroptional
descbooleanoptional
turn_idstring · uuidoptional

Only events from this turn.

order_by_receivedbooleanoptional

Order by arrival (received_at, then id) instead of ts. Required for after_received_at and after_id paging.

after_received_atstring · date-timeoptional

Arrival cursor: the received_at of the last event on the previous page. Pass with after_id, order_by_received=true and desc=false.

after_idstring · uuidoptional

Arrival cursor: the id of the last event on the previous page. Pass with after_received_at.

Request
curl --request GET \
  --url https://api.brainbaselabs.com/v2/tasks/{task_id}/events \
  --header 'Authorization: Bearer YOUR_API_KEY'
Response
json
{
  "items": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "received_at": "2019-08-24T14:15:22Z",
      "event_id": "string",
      "ts": "2019-08-24T14:15:22Z",
      "started_at": "2019-08-24T14:15:22Z",
      "ended_at": "2019-08-24T14:15:22Z",
      "type": "string",
      "tool_id": "string",
      "subagent_id": "string",
      "session_id": "string",
      "turn_id": "2df5d97e-1e68-4315-ace5-61a464d94d93",
      "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
      "task_id": "736fde4d-9029-4915-8189-01353d6982cb",
      "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
      "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",
      "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f",
      "orchestration_id": "9dd89140-c482-4cac-a9ef-d3fd3f520018",
      "data": {}
    }
  ]
}