Create conversation with streaming response
Start a new conversation and stream the AI response over Server-Sent Events (SSE). Behaves like POST /conversations but emits tokens, tool activity, and status updates incrementally instead of returning a single JSON response at the end.
Lifecycle
- The server validates query, persists an in-progress conversation, then opens the SSE stream with HTTP 200.
- A CUSTOM event named conversation_created is emitted immediately with the new conversationId so the client can link the stream (sidebar, parallel tabs, deep links) without an extra request.
- AI-backend events stream through (token chunks, tool calls, status, etc.).
- On success a single root RUN_FINISHED event is emitted carrying the full persisted conversation in result.
- On failure a root RUN_ERROR event is emitted and the conversation is marked FAILED before the stream closes.
Event vocabulary
AG-UI is the sole wire protocol. See ConversationStreamSSEEvent for the full event enum and payload guidance.
Clients should ignore unknown event names rather than treating them as errors.
Agent mode
When chatMode is agent, the optional tools list restricts which tools the agent may invoke for this turn. Outside agent modes the tools field is ignored.
Request body
Example request
{
"query": "What are the key findings from our Q4 financial report?",
"recordIds": [
"507f1f77bcf86cd799439011",
"507f1f77bcf86cd799439012"
],
"modelKey": "gpt-4-turbo",
"modelName": "GPT-4 Turbo",
"modelFriendlyName": "GPT-4 Turbo",
"chatMode": "internal_search",
"timezone": "America/New_York",
"currentTime": "2026-04-12T16:00:00+05:30",
"tools": [
"jira.create_issue",
"confluence.search_content"
]
}Response
SSE stream established. The body is a sequence of text/event-stream frames using the event vocabulary described above.
Changes
Changed in 1 of the 15 revisions of this API.23310
- ▲
added
CreateConversationRequestsubschema #2to the request bodyallOflistrequest-body-all-of-added
- ▲
the request's body type/format changed from
object/to/request-body-type-changed
- ●
removed the request property
appliedFiltersrequest-property-removed
- ●
removed the request property
attachmentsrequest-property-removed
- ●
removed the request property
chatModerequest-property-removed
- ●
removed the request property
currentTimerequest-property-removed
- ●
removed the request property
filtersrequest-property-removed
- ●
removed the request property
modelFriendlyNamerequest-property-removed
- ●
removed the request property
modelKeyrequest-property-removed
- ●
removed the request property
modelNamerequest-property-removed
- ●
removed the request property
queryrequest-property-removed
- ●
removed the request property
recordIdsrequest-property-removed
- ●
removed the request property
timezonerequest-property-removed
- ●
removed the request property
toolsrequest-property-removed
- ●
added the new
CUSTOMenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
HEARTBEATenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
REASONING_ENDenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
REASONING_MESSAGE_CONTENTenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
REASONING_MESSAGE_ENDenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
REASONING_MESSAGE_STARTenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
REASONING_STARTenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
RUN_ERRORenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
RUN_FINISHEDenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
RUN_STARTEDenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
STATE_DELTAenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
STATE_SNAPSHOTenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
STEP_FINISHEDenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
STEP_STARTEDenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
TEXT_MESSAGE_CONTENTenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
TEXT_MESSAGE_ENDenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
TEXT_MESSAGE_STARTenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
TOOL_CALL_ARGSenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
TOOL_CALL_ENDenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
TOOL_CALL_RESULTenum value to theeventresponse property for the response status200response-property-enum-value-added
- ●
added the new
TOOL_CALL_STARTenum value to theeventresponse property for the response status200response-property-enum-value-added
- ○
removed the
answer_chunkenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
completeenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
connectedenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
errorenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
restreamingenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
statusenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
tool_callenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
tool_callsenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
tool_errorenum value from theeventresponse property for the response status200response-property-enum-value-removed
- ○
removed the
tool_successenum value from theeventresponse property for the response status200response-property-enum-value-removed
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲