v47

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-075441165.7 KB
Stateless Runs

Stateless Stream Run

Create a stateless run and stream its execution.

Generates an ephemeral thread, delegates to the threaded create_and_stream_run endpoint, and deletes the thread after the stream finishes (unless on_completion="keep").

post/runs/stream

Request body

assistant_idstring required

Assistant to execute

inputobject nullable

Input data for the run. Optional when resuming from a checkpoint.

configobject nullable

Execution config

contextobject nullable

Execution context

checkpointobject nullable

Checkpoint configuration (e.g., {'checkpoint_id': '...', 'checkpoint_ns': ''})

streamboolean

Enable streaming response

on_disconnectstring nullable

Behavior on client disconnect: 'cancel' (default) or 'continue'.

on_completion'delete' | 'keep' nullable

Behavior after stateless run completes: 'delete' (default) removes the ephemeral thread, 'keep' preserves it.

multitask_strategystring nullable

Strategy for handling concurrent runs on same thread: 'reject', 'interrupt', 'rollback', or 'enqueue'.

commandobject nullable

Command for resuming interrupted runs with state updates or navigation

stream_subgraphsboolean nullable

Whether to include subgraph events in streaming. When True, includes events from all subgraphs. When False (default when None), excludes subgraph events. Defaults to False for backwards compatibility.

metadataobject nullable

Request metadata propagated to OTEL trace attributes (langfuse.trace.metadata.<key>). Keys must match [A-Za-z0-9_-]{1,64}. Values must be primitive (str, int, float, bool); string values are capped at 512 characters. Maximum 32 keys. Use this for filterable attributes (tenant, feature flag, environment, sub-agent type) rather than payload data.

Response

Server-Sent Events stream

{"stackTrail":"paths:/runs/stream:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}