For the complete documentation index, see llms.txt. This page is also available as Markdown.

Streaming

Streaming evaluation results and trace progress — SSE and WebSocket patterns.

Async evaluations and trace evaluations queue and run in the background. The default consumption pattern is polling (wait_for_completion() in the SDK). For responsive UIs, Stratix supports server-sent events (SSE).

When to use polling

  • CI / batch jobs — runs to completion, then exits

  • Single-shot scripts

  • Anywhere the caller is comfortable blocking for seconds-to-minutes

When to use streaming

  • Dashboards showing live progress to a user

  • Long-running evaluations (large datasets, GEPA optimizations)

  • Multi-eval runs where you want incremental results as each completes

SSE endpoint

GET /api/v1/evaluations/{id}/stream
X-API-Key: ll_...
Accept: text/event-stream

Events emitted:

Event
Payload

status

Current status (queued, running, completed, failed)

progress

{rows_complete: N, rows_total: M}

row_complete

Row-level result (one per scored example)

final

Final result object on completion

error

Error object on failure

Streaming from your backend to the browser

Your backend consumes the SSE from Stratix; pipe events to the browser via your own SSE or WebSocket connection. See calling Stratix from a backend for the proxy shape.

SDK helpers

The Python SDK exposes async iteration:

Limits

  • One concurrent stream per eval per consumer

  • Streams close after 60 minutes of inactivity (use polling for very long jobs)

  • Server-side reconnect is supported; client should resume with Last-Event-ID header

See also

Last updated

Was this helpful?