?agent_version=staging in the query parameters to chat with the staging version of the agent.agent_id: ID of the agent for which the response is to be created.start, status, token, ping, error, end) culminating in the final result or an error message.ping event ({"step":"ping"}) is emitted only after a silent gap with no other event, to keep the connection alive during long steps. It carries no data — clients should ignore it.keep_generating: true can be resumed.id. To pick up where you left off, pass the last id you received to the /resume-events as last_event_id.id can't be resumed from; the last id you received stays valid.id to every event you can resume from /resume-events. Existing clients can ignore it. Added keep_generating: set it to true and the response keeps generating when the connection drops, so you can resume it later. Use /stop-requests to end it early.param_override field inside overrides. Pass {"effort": "high"} to select a reasoning effort by label.created_by and caching_enabled from request body. The requesting user is logged automatically based on the token whereas caching_enabled can be toggled using 'Update an Agent' endpoint.curl --location --globoff 'https:///response-service/api/v2/agents//responses/stream?agent_version=undefined' \
--header 'Ocp-Apim-Subscription-Key: ' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data '{
"attachment_metadata": {
"corpus_id": 1,
"doc_ids": [
1
]
},
"chat_thread_id": 1,
"history": [
{
"bot": "Paris is the capital of France.",
"user": "What is the capital of France?"
}
],
"is_file_attached": false,
"keep_generating": false,
"overrides": {
"param_override": {
"effort": "high"
},
"thinking_mode": "instant"
},
"query_source": "web",
"share_token": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"user_query": "and what about the weather?"
}'event: start
data: {"message": "Thinking...", "step": "start", "run_id": "5f0c6a1e-8a2b-4c3d-9e4f-1a2b3c4d5e6f", "trace_id": "2c1f6e0a9b8d7c6e5f4a3b2c1d0e9f8a"}
event: status
id: 1789768688301-1
data: {"message": "", "step": "reasoning", "output": {"title": "Searching documentation", "description": "Retrieving relevant entries from the knowledge base.", "source": "supervisor"}}
event: status
id: 1789768688301-2
data: {"message": "Todos written.", "step": "tools_write_todos_on_tool_end_end", "output": {"todos": [{"id": "1", "content": "Summarise the travel policy", "status": "pending"}]}}
event: token
id: 1789768688301-3
data: {"delta": "Checking the travel policy for per-diem limits.", "step": "subagent_stream"}
event: ping
data: {"step": "ping"}
event: token
id: 1789768688301-4
data: {"delta": "Here is a summary", "step": "model_stream"}
event: end
id: 1789768688301-5
data: {"message": "Finished", "step": "end", "output": {"answer": "Here is a summary of the travel policy...", "thread_id": 1, "agent_response_id": 1, "corpus_id": null, "fork": null, "references": [], "artifacts": [], "chat_thread_name": "Travel policy summary", "blocked": false, "cache_hit": false, "data_points": [], "citations": [], "trace_id": "2c1f6e0a9b8d7c6e5f4a3b2c1d0e9f8a", "attached_file_metadata": [], "status": "completed"}, "success": true}