SSE Event Types
The stream-run endpoint returns Server-Sent Events (SSE) with the following event types. Each event contains atype, data object, and timestamp.
Examples
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
A unique identifier for the agent. This key must be unique within the same workspace and cannot be reused. When executing the agent, this key determines if the agent already exists. If the agent version differs, a new version is created at the end of the execution, except for the task. All agent parameters are evaluated to decide if a new version is needed.
1The language model that powers the agent. The model must support tool calling capabilities.
Specifies the agent's function and area of expertise.
1Provides context and purpose for the agent. Combined with the system prompt template to generate the agent's instructions.
1The A2A format message containing the task for the agent to perform.
Entity storage path in the format: project/folder/subfolder/...
The first element identifies the project, followed by nested folders (auto-created as needed).
With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
"Default"
Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
Optional array of fallback model IDs to use when the primary model fails. Models are tried in order. All models must support tool calling capabilities.
Optional variables for template replacement in system prompt, instructions, and messages
Information about the contact making the request. If the contact does not exist, it will be created automatically.
Thread information to group related requests
Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
A brief summary of the agent's purpose.
1A custom system prompt template for the agent. If omitted, the default template is used.
1The list of keys of the memory stores that are accessible to the agent.
Knowledge base configurations for the agent to access
The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
Optional metadata for the agent run as key-value pairs that will be included in traces
Stream timeout in seconds (1-3600). Default: 1800 (30 minutes)
1 <= x <= 3600Response
SSE stream of agent events
JSON-encoded event data