v1
latestOpenAPI 3.1.02026-07-265094114.0 KBTasks
Run an agent task with streaming response
Execute an agent task by ID to generate AI output with Server-Sent Events (SSE) streaming. Provides real-time content as it is generated.
post/v1/tasks/{id}/run/stream
Path parameters
idstring required
Example:agt_0190f3a1b2c34d5e6f7a8b9c0d1e2f3a
The external ID (agt_…) or internal UUID of the agent task to run
Request body
Example request
{
"contextItems": [
{
"id": "70346737-878b-4329-a4d6-9a054efef508",
"value": [
"Registration reminder email",
"Confirmation email"
]
},
{
"name": "Greeting",
"question": "Who is the person that you want me to greet in the registration reminder email?",
"answer": "John Doe"
}
],
"version": 1,
"toLanguage": "EN-US",
"knowledgeIds": [
"kno_123",
"kno_456"
],
"attachmentIds": [
"tmp_2ee766eaa4ef48e59da1d9602bfecf2d"
],
"toneId": "ton_2ee766eaa4ef48e59da1d9602bfecf2d",
"audienceId": "aud_123",
"additionalAudienceIds": [
"aud_456",
"aud_789"
],
"styleGuideId": "sty_123",
"tools": [
"WEB_SEARCH",
"KNOWLEDGE_SEARCH"
]
}Response
Stream of events containing step updates and content chunks
Example response
{
"step": {
"id": "f1d3b309-67bd-4054-a852-8806bc1a5344",
"status": "loading",
"label": "Generating content"
}
}