This feature is currently in beta and requires the
parallel-beta: events-sse-2025-07-24
header when using the Task API.Overview
Task Runs support Server-Sent Events (SSE) at the run level, allowing you to receive real-time updates on ongoing research conducted by our processors during execution. For streaming events related to Task Groups, see the streaming endpoints on the Task Group API. Task Group events provide aggregate updates at the group level, while Task Run events represent updates for individual task runs. For a more comprehensive list of differences, see here.Enabling Events Streaming
To enable periodic event publishing for a task run, set theenable_events
flag to true
when creating the task run. If not specified, events may still be available, but frequent updates are not guaranteed.
Create a Task Run with events aggregation enabled explicitly:
/v1beta/tasks/runs/{run_id}/events
endpoint:
- All Task API processors starting from
pro
and above have event streaming enabled by default. - Event streams remain open for 570 seconds. After this period, the stream is closed.
Supported Events
Currently, three types of events are supported:- Progress Statistics Events: Provide updates on the number of sources considered and other aggregate statistics at a given point in time.
- Run Status Events: Indicate the status of the run. These are also sent every 10 seconds.
- Error Events: Report errors that occur during execution.
-
Message Events: Communicate reasoning at various stages of task run execution. Note that this might not be available for
lite
andbase
processors
- Event streams always start and end with status events.
- Events are not sequenced, and the stream is not resumable. If you disconnect and reconnect, a status event will be sent first, and any subsequent progress statistics event will represent the point-in-time aggregate state.
Differences Between Task Group Events and Task Run Events
Currently, the events returned by Task Groups is not a strict superset of events returned by Task Runs. See the list of differences below:Task Run Events | Task Group Events | |
---|---|---|
Purpose | Events for a single Task Run. | Events for an entire Task Group. |
Run-level events | Progress updates, messages, status changes. | Only run status changes. |
Resumable streams | No | Yes, using event_id . |
Events supported | Progress updates, messages, status changes for an individual run. | Group status and run terminations. |