The streaming endpoint runs an agent and returns the response as a continuous Server-Sent Events (SSE) stream. Instead of waiting for the full response, your client receives typed events — reasoning traces, content tokens, and tool call notifications — as they are produced. This is the recommended integration for any user-facing chat interface. All requests require a valid bearer token in theDocumentation Index
Fetch the complete documentation index at: https://operativusai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header.
Start a streaming run
RunRequest body as the synchronous endpoint and returns a text/event-stream response. Each event is a JSON-encoded AgentStreamEvent object.
Path parameters
The unique identifier of the agent to run. Retrieve valid IDs from
GET /api/agents.Request body
The user’s input or query.
A UUID identifying an existing conversation session. Enables multi-turn conversations. Omit to start a fresh session.
Associates the run with a specific user for memory scoping and audit logs.
Tenant identifier for multi-tenant deployments.
When
true, the agent appends suggested follow-up questions to the final STOP event payload.Array of multimodal inputs. Each object has a
type (MIME type string) and data (base64 or URL).Optional model overrides (
model, temperature, maxTokens).Response: AgentStreamEvent schema
The response is atext/event-stream. Each line prefixed with data: contains a JSON-encoded AgentStreamEvent:
The event type discriminator. See the EventType reference below.
The payload for this event. Its meaning depends on the
event type — a text delta for CONTENT_DELTA, a JSON string for tool events, or an error message for ERROR.Unix epoch milliseconds at the time the event was emitted by the server.
EventType values
| Event | Description |
|---|---|
START | Stream initialized. The data field contains the runId and sessionId as a JSON string. |
REASONING_DELTA | A fragment of the agent’s inner thought process. Aggregate these to show a “thinking…” indicator in your UI. |
CONTENT_DELTA | A token or short text chunk of the final answer. Concatenate all deltas to build the complete response. |
TOOL_START | The agent is about to call a tool. The data field contains the tool name and its arguments as JSON. |
TOOL_END | A tool call has completed. The data field contains the tool result. |
STOP | The stream is complete. All content has been delivered. No further events follow. |
ERROR | An error occurred during execution. The data field contains the error message. The stream closes after this event. |
Raw SSE stream example
TypeScript example
Check run status
AgentRun entity, including timestamps and final output.
The agent that owns the run.
The run identifier, returned in the
START event’s data payload.AgentRun entity with status (RUNNING, COMPLETED, FAILED, PAUSED, or CANCELLED) and associated timestamps.
Batch status check
404 is returned for missing IDs.
The agent that owns the runs.
A comma-separated list of run IDs to check. Maximum 100 IDs per request.
The batch status endpoint significantly reduces polling overhead. For 10 concurrent runs polled every 3 seconds, one batched call replaces 10 individual requests — dropping from ~200 requests/minute to ~20.