Skip to main content
All API endpoints return Server-Sent Events (SSE). This page explains the wire format and how to parse it.

Protocol Overview

SSE is a simple text-based protocol. Events are separated by blank lines, and each event has fields prefixed with event: and data:.

Event Format

Each event consists of:
  1. event: line — The event type (progress, complete, or error)
  2. data: line — JSON payload
  3. Blank line — Event delimiter
The blank line after each event is required.

Event Types

progress

Sent periodically during processing.
Agent-emitted progress events also include agentId, executionId, and iteration identifiers.

complete

Sent once when processing succeeds. Contains the final result.

error

Sent when processing fails.

Python Example


Connection Tips

Disable buffering to receive events in real-time:
Set appropriate timeouts. The initial connection should be quick, but processing may take up to 60 seconds: