Streaming Integration (SSE)
Consume progressive compliance results via Server-Sent Events. Each agent fires events as it completes, so clients can show early warnings immediately.Endpoint
SSE Event Stream
The response isContent-Type: text/event-stream. Events arrive as agents complete:
Reconnecting After Disconnect
If the SSE connection drops, resume from the last completed agent:jobId is returned in the initial response headers as X-Job-Id.
Partial results are persisted server-side. The stream resumes from the next uncompleted agent.
Client Implementation Notes
- Parse each
event:+data:pair as a discrete event - On
agent.completed— update UI with partial checks and annotations - On
score— show the compliance score immediately - On
complete— fetch the full report if needed viaGET /reports/{reportId} - On disconnect — reconnect using
resumeFromwith the last completed agentId
When to Use Streaming
- Full mode checks (4 phases, takes 20-60 seconds)
- When the client wants to show progressive status: “Checking jurisdiction… Checking ad law… 2 issues found so far…”
- When the client wants to display annotations as they arrive