Uses the AutoRAG agent to answer a question about any data that the user can access.
Returns results as a Server-Sent Events (SSE) stream with incremental updates.
The SSE event name identifies each event. A run that starts emits events in this order:
run-started: The run id and the conversation id.
planningStarted: The agent started to make the plan.
plan: The plan, as a list of step instructions. Not sent if the plan is empty.
For each step: stepStarted, then queryExecuting, then step with the instruction, query and
result data. queryExecuting is sent immediately after stepStarted, before the agent writes
the query. A step that is skipped because a step it depends on produced no value sends
stepStarted and step only.
answerStarted: The agent started to write the final answer.
answer: The final answer.
When the question is outside the scope of the data, the stream has no step events and no
answerStarted, and answer contains the refusal. A plan can still come before it.
When the run fails, an error event replaces the remaining events. If the run cannot start, error
is the only event and run-started is not sent. In rare cases, a failure to record a completed run
sends error after answer.
A conversationId that is unknown, or that the caller cannot continue in this namespace, gets a 404
response before the stream opens.
Steps that do not depend on each other run at the same time. Their events can interleave and
their step events can arrive out of plan order, so use index to match each event to its step.
POST
/
query
/
ask
Run AutoRAG agent with streaming response
curl --request POST \ --url https://api.datalinks.com/api/v1/query/ask \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data @- <<EOF{ "username": "<string>", "namespace": "<string>", "query": "What do llamas drink to cool themselves down?", "helperPrompt": "You're a prophet of the alpacalypse. Your task is to spit the word!", "model": "<string>", "provider": "<string>", "models": { "plan": { "model": "<string>", "provider": "<string>" }, "query": { "model": "<string>", "provider": "<string>" }, "answer": { "model": "<string>", "provider": "<string>" } }, "conversationId": "<string>", "webSearch": true, "callerContext": { "turns": [ { "role": "agent", "text": "Shortlisted: A, B and C", "agentName": "billing-agent" } ], "facts": [ { "label": "tenant", "value": "acme", "source": "<string>" } ] }, "asOf": "2026-03-31T12:00:00.000Z"}EOF
import requests
url = "https://api.datalinks.com/api/v1/query/ask"
payload = {
"username": "<string>",
"namespace": "<string>",
"query": "What do llamas drink to cool themselves down?",
"helperPrompt": "You're a prophet of the alpacalypse. Your task is to spit the word!",
"model": "<string>",
"provider": "<string>",
"models": {
"plan": {
"model": "<string>",
"provider": "<string>"
},
"query": {
"model": "<string>",
"provider": "<string>"
},
"answer": {
"model": "<string>",
"provider": "<string>"
}
},
"conversationId": "<string>",
"webSearch": True,
"callerContext": {
"turns": [
{
"role": "agent",
"text": "Shortlisted: A, B and C",
"agentName": "billing-agent"
}
],
"facts": [
{
"label": "tenant",
"value": "acme",
"source": "<string>"
}
]
},
"asOf": "2026-03-31T12:00:00.000Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
namespace: '<string>',
query: 'What do llamas drink to cool themselves down?',
helperPrompt: 'You\'re a prophet of the alpacalypse. Your task is to spit the word!',
model: '<string>',
provider: '<string>',
models: {
plan: {model: '<string>', provider: '<string>'},
query: {model: '<string>', provider: '<string>'},
answer: {model: '<string>', provider: '<string>'}
},
conversationId: '<string>',
webSearch: true,
callerContext: {
turns: [{role: 'agent', text: 'Shortlisted: A, B and C', agentName: 'billing-agent'}],
facts: [{label: 'tenant', value: 'acme', source: '<string>'}]
},
asOf: '2026-03-31T12:00:00.000Z'
})
};
fetch('https://api.datalinks.com/api/v1/query/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Use a Bearer token for authentication. Submit the token using the Authorization
header: Authorization: Bearer <token>.
Scopes
implicit
Body
application/json
username
string
required
namespace
string
required
query
string
required
Example:
"What do llamas drink to cool themselves down?"
helperPrompt
string
Example:
"You're a prophet of the alpacalypse. Your task is to spit the word!"
model
string
provider
string
models
object
Per-stage model overrides for the AutoRag pipeline.
Show child attributes
conversationId
string
Existing conversation to continue. Omit to start a new conversation; the id is returned on the run-started SSE event.
webSearch
boolean
Override web search for this request: false disables it; omit (or true) to use the deployment default.
callerContext
object
Context established outside this platform — typically by an agent the calling system ran before this one. It is rendered into the planning and answering prompts as caller-asserted background: it never overrides data retrieved from the datasets, and it never widens data access. Applies to the turn it is sent with.
Show child attributes
asOf
string<date-time>
Instant the agent treats as now when resolving relative dates such as "last quarter"; today is its UTC date. Applies to this request only, so resend it on every turn of a conversation. Does not restrict the data or web results to that instant; omit to use the current time.
Example:
"2026-03-31T12:00:00.000Z"
Response
SSE stream of AutoRAG execution events.
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Option 9
SSE event that opens the stream of every run that starts. Event name is "run-started".
runId
string<uuid>
required
Use with /query/runs/{runId} to get the run status, delete or resume the run, or send feedback.
conversationId
string<uuid>
required
Conversation this run belongs to. Send it as conversationId to continue the conversation.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Documentation","colors":{"primary":"#607251","light":"#607251","dark":"#C8D5BB"},"logo":{"light":"https://mintcdn.com/datalinks-d7c3bacc/TPNYzjeK9vJGjQOz/logo/datalinks_logo.svg?fit=max\u0026auto=format\u0026n=TPNYzjeK9vJGjQOz\u0026q=85\u0026s=c04854596e886fee7cd51d303e0bb6e2","dark":"https://mintcdn.com/datalinks-d7c3bacc/TPNYzjeK9vJGjQOz/logo/datalinks_logo_white.svg?fit=max\u0026auto=format\u0026n=TPNYzjeK9vJGjQOz\u0026q=85\u0026s=c051e09f339ab36f11b718d47c67e9cf"},"favicon":"https://mintcdn.com/datalinks-d7c3bacc/NbL6ZZ8Yl0rUuPZD/logo/favicon.svg?fit=max\u0026auto=format\u0026n=NbL6ZZ8Yl0rUuPZD\u0026q=85\u0026s=6685ce7fb23b401e4b2248c8220474cd","api":{"openapi":{"source":"api-reference/openapi.yml"},"playground":{"proxy":false}},"navbar":{"links":[{"href":"https://datalinks.com","label":"Website"}]},"footer":{"socials":{"linkedin":"https://linkedin.com/company/datasetlinks","github":"https://github.com/DataSetLinks","website":"https://datalinks.com/"}},"integrations":{"gtm":{"tagId":"GTM-M2TM5387"}},"contextual":{"options":[],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"datalinks-d7c3bacc","hasAudioNarration":false,"actualSubdomain":"datalinks-d7c3bacc","customDomains":["docs.datalinks.com"],"gitSource":{"type":"github","owner":"datasetlinks","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10aee19ffae5051c3fde46"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0d95f2929f351b8e59e5cc","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"API Reference","count":105},{"language":"default","tag":"Endpoints","count":104},{"language":"default","tag":"Docs","count":28},{"language":"default","tag":"buildspecs","count":22},{"language":"default","tag":"data-assets","count":14},{"language":"default","tag":"How-To Guides","count":12},{"language":"default","tag":"Python SDK","count":7},{"language":"default","tag":"dataset","count":7},{"language":"default","tag":"user","count":7},{"language":"default","tag":"permissions","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"consent-banner.css","content":":root{--color-white: #ffffff;--color-gray-25: #fafafa;--color-gray-50: #f7f7f7;--color-gray-100: #f0f0f1;--color-gray-200: #ececed;--color-gray-300: #cecfd2;--color-gray-400: #94979c;--color-gray-500: #85888e;--color-gray-600: #61656c;--color-gray-700: #373a41;--color-gray-800: #22262f;--color-gray-900: #13161b;--color-gray-950: #0c0e12;--color-blue-50: #b0d8ff;--color-blue-600: #002454;--color-blue-700: #001433;--color-blue-800: #010a17;--color-green-50: #f2ffe5;--color-green-100: #dfeed1;--color-green-200: #c8d5bb;--color-green-300: #859973;--color-green-400: #607251;--color-green-500: #516441;--color-green-700: #213610}.consent-banner-overlay{position:fixed;bottom:1rem;max-width:480px;right:1rem;padding:0.75rem;z-index:9999;border-radius:0.75rem;font-size:1rem;color:var(--color-gray-600);background:var(--color-white);box-shadow:0px 0px 0px 1px rgba(10, 13, 18, 0.18) inset,\n 0px -2px 0px 0px rgba(10, 13, 18, 0.05) inset,\n 0px 1px 2px 0px rgba(10, 13, 18, 0.05)}.dark .consent-banner-overlay{color:var(--color-gray-400);border:1px solid var(--color-gray-700);background:var(--color-gray-900);box-shadow:0px 12px 16px -4px rgba(10, 13, 18, 0.08),\n 0px 4px 6px -2px rgba(10, 13, 18, 0.03),\n 0px 2px 2px -1px rgba(10, 13, 18, 0.04)}.consent-banner-grid{display:flex;flex-direction:column;flex-wrap:wrap}.consent-options{margin-top:1rem;margin-bottom:0.75rem;display:flex;flex-direction:column;gap:0.5rem}.consent-options label{display:flex;gap:0.75rem}.consent-options input[type=\"checkbox\"]{border-radius:6px;border:1px solid var(--color-gray-700)}.consent-options input[type=\"checkbox\"]:checked{background-color:var(--color-green-500);border-color:var(--color-green-500)}.cookie-icon{margin-bottom:1rem;display:inline-flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:10px;font-size:1.5rem;flex:0 0 48px;background-color:var(--color-gray-50);box-shadow:0px 0px 0px 1px rgba(10, 13, 18, 0.18) inset,\n 0px -2px 0px 0px rgba(10, 13, 18, 0.05) inset,\n 0px 1px 2px 0px rgba(10, 13, 18, 0.05)}.dark .cookie-icon{background-color:var(--color-gray-800)}.consent-buttons{display:flex;gap:0.75rem}.cookie-btn{flex:1;white-space:nowrap;padding:0.5rem 1rem;border:none;border-radius:0.5rem;cursor:pointer;font-weight:600;font-size:1rem;line-height:1.5;transition:background-color 0.2s;box-shadow:0px 0px 0px 1px rgba(10, 13, 18, 0.12) inset,\n 0px -2px 0px 0px rgba(10, 13, 18, 0.05) inset,\n 0px 1px 2px 0px rgba(10, 13, 18, 0.05);border:1px solid rgba(255, 255, 255, 0.12);background-color:var(--color-gray-50)}.dark .cookie-btn:not(.cookie-btn-accept):not(.cookie-btn-reject){background-color:var(--color-gray-900);color:var(--color-gray-200);border-color:var(--color-gray-700);box-shadow:none}.cookie-btn-accept{background:var(--color-green-700);color:var(--color-white)}.cookie-btn-accept:hover{background:var(--color-green-400)}.cookie-btn-reject{padding-inline:0;box-shadow:none;border-color:transparent;background:transparent}.cookie-btn-reject:hover{text-decoration:underline}@media (max-width: 768px){.consent-buttons{flex-direction:column;gap:1rem;text-align:center}.cookie-btn-reject{padding-block:0}.cookie-btn{font-size:0.85rem}}"}]}
{"page":{"pagePath":"api-reference/autorag/run-autorag-agent-with-streaming-response","slug":"/api-reference/autorag/run-autorag-agent-with-streaming-response","pageMetadata":{"title":"Run AutoRAG agent with streaming response","description":"Uses the AutoRAG agent to answer a question about any data that the user can access.\nReturns results as a Server-Sent Events (SSE) stream with incremental updates.\n\nThe SSE event name identifies each event. A run that starts emits events in this order:\n1. `run-started`: The run id and the conversation id.\n2. `planningStarted`: The agent started to make the plan.\n3. `plan`: The plan, as a list of step instructions. Not sent if the plan is empty.\n4. For each step: `stepStarted`, then `queryExecuting`, then `step` with the instruction, query and\n result data. `queryExecuting` is sent immediately after `stepStarted`, before the agent writes\n the query. A step that is skipped because a step it depends on produced no value sends\n `stepStarted` and `step` only.\n5. `answerStarted`: The agent started to write the final answer.\n6. `answer`: The final answer.\n\nWhen the question is outside the scope of the data, the stream has no step events and no\n`answerStarted`, and `answer` contains the refusal. A `plan` can still come before it.\n\nWhen the run fails, an `error` event replaces the remaining events. If the run cannot start, `error`\nis the only event and `run-started` is not sent. In rare cases, a failure to record a completed run\nsends `error` after `answer`.\n\nA `conversationId` that is unknown, or that the caller cannot continue in this namespace, gets a 404\nresponse before the stream opens.\n\nSteps that do not depend on each other run at the same time. Their events can interleave and\ntheir `step` events can arrive out of plan order, so use `index` to match each event to its step.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /query/ask","href":"/api-reference/autorag/run-autorag-agent-with-streaming-response","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n ol: \"ol\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Uses the AutoRAG agent to answer a question about any data that the user can access.\\nReturns results as a Server-Sent Events (SSE) stream with incremental updates.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"The SSE event name identifies each event. A run that starts emits events in this order:\"\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"run-started\"\n }), \": The run id and the conversation id.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"planningStarted\"\n }), \": The agent started to make the plan.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"plan\"\n }), \": The plan, as a list of step instructions. Not sent if the plan is empty.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"For each step: \", _jsx(_components.code, {\n children: \"stepStarted\"\n }), \", then \", _jsx(_components.code, {\n children: \"queryExecuting\"\n }), \", then \", _jsx(_components.code, {\n children: \"step\"\n }), \" with the instruction, query and\\nresult data. \", _jsx(_components.code, {\n children: \"queryExecuting\"\n }), \" is sent immediately after \", _jsx(_components.code, {\n children: \"stepStarted\"\n }), \", before the agent writes\\nthe query. A step that is skipped because a step it depends on produced no value sends\\n\", _jsx(_components.code, {\n children: \"stepStarted\"\n }), \" and \", _jsx(_components.code, {\n children: \"step\"\n }), \" only.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"answerStarted\"\n }), \": The agent started to write the final answer.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"answer\"\n }), \": The final answer.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"When the question is outside the scope of the data, the stream has no step events and no\\n\", _jsx(_components.code, {\n children: \"answerStarted\"\n }), \", and \", _jsx(_components.code, {\n children: \"answer\"\n }), \" contains the refusal. A \", _jsx(_components.code, {\n children: \"plan\"\n }), \" can still come before it.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"When the run fails, an \", _jsx(_components.code, {\n children: \"error\"\n }), \" event replaces the remaining events. If the run cannot start, \", _jsx(_components.code, {\n children: \"error\"\n }), \"\\nis the only event and \", _jsx(_components.code, {\n children: \"run-started\"\n }), \" is not sent. In rare cases, a failure to record a completed run\\nsends \", _jsx(_components.code, {\n children: \"error\"\n }), \" after \", _jsx(_components.code, {\n children: \"answer\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"A \", _jsx(_components.code, {\n children: \"conversationId\"\n }), \" that is unknown, or that the caller cannot continue in this namespace, gets a 404\\nresponse before the stream opens.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Steps that do not depend on each other run at the same time. Their events can interleave and\\ntheir \", _jsx(_components.code, {\n children: \"step\"\n }), \" events can arrive out of plan order, so use \", _jsx(_components.code, {\n children: \"index\"\n }), \" to match each event to its step.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Run AutoRAG agent with streaming response","description":"Uses the AutoRAG agent to answer a question about any data that the user can access.\nReturns results as a Server-Sent Events (SSE) stream with incremental updates.\n\nThe SSE event name identifies each event. A run that starts emits events in this order:\n1. `run-started`: The run id and the conversation id.\n2. `planningStarted`: The agent started to make the plan.\n3. `plan`: The plan, as a list of step instructions. Not sent if the plan is empty.\n4. For each step: `stepStarted`, then `queryExecuting`, then `step` with the instruction, query and\n result data. `queryExecuting` is sent immediately after `stepStarted`, before the agent writes\n the query. A step that is skipped because a step it depends on produced no value sends\n `stepStarted` and `step` only.\n5. `answerStarted`: The agent started to write the final answer.\n6. `answer`: The final answer.\n\nWhen the question is outside the scope of the data, the stream has no step events and no\n`answerStarted`, and `answer` contains the refusal. A `plan` can still come before it.\n\nWhen the run fails, an `error` event replaces the remaining events. If the run cannot start, `error`\nis the only event and `run-started` is not sent. In rare cases, a failure to record a completed run\nsends `error` after `answer`.\n\nA `conversationId` that is unknown, or that the caller cannot continue in this namespace, gets a 404\nresponse before the stream opens.\n\nSteps that do not depend on each other run at the same time. Their events can interleave and\ntheir `step` events can arrive out of plan order, so use `index` to match each event to its step.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /query/ask","href":"/api-reference/autorag/run-autorag-agent-with-streaming-response","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/datalinks-d7c3bacc/c24628b788aa4349/gtm-consent-banner.js"],"openApiReferenceData":{"operation":{"tags":["autorag"],"summary":"Run AutoRAG agent with streaming response","description":"Uses the AutoRAG agent to answer a question about any data that the user can access.\nReturns results as a Server-Sent Events (SSE) stream with incremental updates.\n\nThe SSE event name identifies each event. A run that starts emits events in this order:\n1. `run-started`: The run id and the conversation id.\n2. `planningStarted`: The agent started to make the plan.\n3. `plan`: The plan, as a list of step instructions. Not sent if the plan is empty.\n4. For each step: `stepStarted`, then `queryExecuting`, then `step` with the instruction, query and\n result data. `queryExecuting` is sent immediately after `stepStarted`, before the agent writes\n the query. A step that is skipped because a step it depends on produced no value sends\n `stepStarted` and `step` only.\n5. `answerStarted`: The agent started to write the final answer.\n6. `answer`: The final answer.\n\nWhen the question is outside the scope of the data, the stream has no step events and no\n`answerStarted`, and `answer` contains the refusal. A `plan` can still come before it.\n\nWhen the run fails, an `error` event replaces the remaining events. If the run cannot start, `error`\nis the only event and `run-started` is not sent. In rare cases, a failure to record a completed run\nsends `error` after `answer`.\n\nA `conversationId` that is unknown, or that the caller cannot continue in this namespace, gets a 404\nresponse before the stream opens.\n\nSteps that do not depend on each other run at the same time. Their events can interleave and\ntheir `step` events can arrive out of plan order, so use `index` to match each event to its step.\n","operationId":"autoragStream","requestBody":"508a6aad-013c-457b-8e65-a235f3d06242","responses":{"200":"c7295cb7-fc08-4f8e-aecd-4ac775e0c573","400":"935d497e-401a-452b-b487-85f38f5f050b","401":"7201ba40-163e-47e4-9f44-f13f77d0b7ba","404":"7c66ac6c-dfa3-44d0-b3af-7f7b941fd453"},"method":"post","type":"path","servers":["e5189070-0fb4-4cf0-8fea-39217fc8f1f3"],"security":["258cbcff-9453-4f9d-b3de-b88302926f92","00d2af1e-1344-42a1-b82a-f4a055033f6c"],"path":"/query/ask","baseUrlOptions":["https://api.datalinks.com/api/v1"],"title":"Run AutoRAG agent with streaming response","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"required":["namespace","query","username"],"type":"object","properties":{"username":{"type":"string","isRequired":true,"uniqueKey":"username","typeLabel":"string"},"namespace":{"type":"string","isRequired":true,"uniqueKey":"namespace","typeLabel":"string"},"query":{"type":"string","example":"What do llamas drink to cool themselves down?","isRequired":true,"uniqueKey":"query","typeLabel":"string"},"helperPrompt":{"type":"string","example":"You're a prophet of the alpacalypse. Your task is to spit the word!","uniqueKey":"helperPrompt","typeLabel":"string"},"model":{"type":"string","uniqueKey":"model","typeLabel":"string"},"provider":{"type":"string","uniqueKey":"provider","typeLabel":"string"},"models":{"type":"object","properties":{"plan":{"type":"object","properties":{"model":{"type":"string","uniqueKey":"models.plan.model","typeLabel":"string"},"provider":{"type":"string","uniqueKey":"models.plan.provider","typeLabel":"string"}},"description":"Model selection for a single agent stage, applied as a (model, provider) pair. Precedence is resolved per stage — this override, then the run-wide model/provider, then the configured stage default — and the highest-precedence level that sets either field wins as a whole: its unset field is not merged from a lower level but resolves to the provider default (default provider, then that provider's default model). So sending only the run-wide model with no provider routes every stage to the default provider.","uniqueKey":"models.plan","typeLabel":"object"},"query":{"type":"object","properties":{"model":{"type":"string","uniqueKey":"models.query.model","typeLabel":"string"},"provider":{"type":"string","uniqueKey":"models.query.provider","typeLabel":"string"}},"description":"Model selection for a single agent stage, applied as a (model, provider) pair. Precedence is resolved per stage — this override, then the run-wide model/provider, then the configured stage default — and the highest-precedence level that sets either field wins as a whole: its unset field is not merged from a lower level but resolves to the provider default (default provider, then that provider's default model). So sending only the run-wide model with no provider routes every stage to the default provider.","uniqueKey":"models.query","typeLabel":"object"},"answer":{"type":"object","properties":{"model":{"type":"string","uniqueKey":"models.answer.model","typeLabel":"string"},"provider":{"type":"string","uniqueKey":"models.answer.provider","typeLabel":"string"}},"description":"Model selection for a single agent stage, applied as a (model, provider) pair. Precedence is resolved per stage — this override, then the run-wide model/provider, then the configured stage default — and the highest-precedence level that sets either field wins as a whole: its unset field is not merged from a lower level but resolves to the provider default (default provider, then that provider's default model). So sending only the run-wide model with no provider routes every stage to the default provider.","uniqueKey":"models.answer","typeLabel":"object"}},"description":"Per-stage model overrides for the AutoRag pipeline.","uniqueKey":"models","typeLabel":"object"},"conversationId":{"type":"string","description":"Existing conversation to continue. Omit to start a new conversation; the id is returned on the run-started SSE event.","uniqueKey":"conversationId","typeLabel":"string"},"webSearch":{"type":"boolean","description":"Override web search for this request: false disables it; omit (or true) to use the deployment default.","uniqueKey":"webSearch","typeLabel":"boolean"},"callerContext":{"type":"object","properties":{"turns":{"type":"array","description":"Prior exchange in the calling system, oldest first.","items":{"required":["role","text"],"type":"object","properties":{"role":{"title":"CallerRole","type":"string","example":"agent","enum":["user","agent"],"isRequired":true,"uniqueKey":"callerContext.turns.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"text":{"type":"string","example":"Shortlisted: A, B and C","isRequired":true,"uniqueKey":"callerContext.turns.items.[INDEX].text","typeLabel":"string"},"agentName":{"type":"string","description":"Which upstream agent produced this turn. Shown to the model in place of the bare role.","example":"billing-agent","uniqueKey":"callerContext.turns.items.[INDEX].agentName","typeLabel":"string"}},"uniqueKey":"callerContext.turns.items.[INDEX]","typeLabel":"object"},"uniqueKey":"callerContext.turns","typeLabel":"object[]"},"facts":{"type":"array","description":"Values the calling system asserts. Where a label repeats, the later entry supersedes the earlier one.","items":{"required":["label","value"],"type":"object","properties":{"label":{"type":"string","example":"tenant","isRequired":true,"uniqueKey":"callerContext.facts.items.[INDEX].label","typeLabel":"string"},"value":{"type":"string","example":"acme","isRequired":true,"uniqueKey":"callerContext.facts.items.[INDEX].value","typeLabel":"string"},"source":{"type":"string","description":"Which upstream agent asserted this fact.","uniqueKey":"callerContext.facts.items.[INDEX].source","typeLabel":"string"}},"uniqueKey":"callerContext.facts.items.[INDEX]","typeLabel":"object"},"uniqueKey":"callerContext.facts","typeLabel":"object[]"}},"description":"Context established outside this platform — typically by an agent the calling system ran before this one. It is rendered into the planning and answering prompts as caller-asserted background: it never overrides data retrieved from the datasets, and it never widens data access. Applies to the turn it is sent with.","uniqueKey":"callerContext","typeLabel":"object"},"asOf":{"type":"string","description":"Instant the agent treats as now when resolving relative dates such as \"last quarter\"; today is its UTC date. Applies to this request only, so resend it on every turn of a conversation. Does not restrict the data or web results to that instant; omit to use the current time.","format":"date-time","example":"2026-03-31T12:00:00.000Z","uniqueKey":"asOf","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"username":"\u003cstring>","namespace":"\u003cstring>","query":"What do llamas drink to cool themselves down?","helperPrompt":"You're a prophet of the alpacalypse. Your task is to spit the word!","model":"\u003cstring>","provider":"\u003cstring>","models":{"plan":{"model":"\u003cstring>","provider":"\u003cstring>"},"query":{"model":"\u003cstring>","provider":"\u003cstring>"},"answer":{"model":"\u003cstring>","provider":"\u003cstring>"}},"conversationId":"\u003cstring>","webSearch":true,"callerContext":{"turns":[{"role":"agent","text":"Shortlisted: A, B and C","agentName":"billing-agent"}],"facts":[{"label":"tenant","value":"acme","source":"\u003cstring>"}]},"asOf":"2026-03-31T12:00:00.000Z"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"c7295cb7-fc08-4f8e-aecd-4ac775e0c573":{"description":"SSE stream of AutoRAG execution events.","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","description":"SSE event that opens the stream of every run that starts. Event name is \"run-started\".","required":["conversationId","runId"],"properties":{"runId":{"type":"string","description":"Use with `/query/runs/{runId}` to get the run status, delete or resume the run, or send feedback.","format":"uuid","isRequired":true,"uniqueKey":"oneOf.0.runId","typeLabel":"string\u003cuuid>"},"conversationId":{"type":"string","description":"Conversation this run belongs to. Send it as `conversationId` to continue the conversation.","format":"uuid","isRequired":true,"uniqueKey":"oneOf.0.conversationId","typeLabel":"string\u003cuuid>"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"SSE event containing the execution plan. Event name is \"plan\".","required":["reasoning","steps"],"properties":{"steps":{"type":"array","description":"List of step descriptions that will be executed.","items":{"type":"string","uniqueKey":"oneOf.1.steps.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.1.steps","typeLabel":"string[]"},"reasoning":{"type":"string","description":"The reasoning produced by the LLM when generating the plan.","isRequired":true,"uniqueKey":"oneOf.1.reasoning","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"object","description":"SSE event containing the result of a single execution step. Event name is \"step\".","required":["data","index","instruction","query","reasoning"],"properties":{"index":{"type":"integer","description":"Zero-based index of this step in the plan.","isRequired":true,"uniqueKey":"oneOf.2.index","typeLabel":"integer"},"instruction":{"type":"string","description":"The instruction generated and executed for this step.","isRequired":true,"uniqueKey":"oneOf.2.instruction","typeLabel":"string"},"query":{"type":"string","description":"The query derived from the instruction.","isRequired":true,"uniqueKey":"oneOf.2.query","typeLabel":"string"},"reasoning":{"type":"string","description":"The reasoning produced by the LLM when generating the query for this step.","isRequired":true,"uniqueKey":"oneOf.2.reasoning","typeLabel":"string"},"data":{"type":"array","description":"Array of ontology data objects retrieved from queries.","items":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.2.data.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.2.data","typeLabel":"object[]"}},"uniqueKey":"oneOf.2","typeLabel":"object"},{"type":"object","description":"SSE event containing the final answer. Event name is \"answer\".","required":["response"],"properties":{"response":{"type":"string","description":"The final synthesized answer to the user's question.","isRequired":true,"uniqueKey":"oneOf.3.response","typeLabel":"string"}},"uniqueKey":"oneOf.3","typeLabel":"object"},{"type":"object","description":"SSE event emitted when an error occurs. Event name is \"error\".","required":["message"],"properties":{"message":{"type":"string","description":"Error message describing what went wrong.","isRequired":true,"uniqueKey":"oneOf.4.message","typeLabel":"string"}},"uniqueKey":"oneOf.4","typeLabel":"object"},{"type":"object","description":"SSE lifecycle event signalling that the agent has started planning. Event name is \"planningStarted\". The event name carries the meaning; the body is an empty object.","uniqueKey":"oneOf.5","typeLabel":"object"},{"type":"object","description":"SSE lifecycle event signalling that a plan step has started. Event name is \"stepStarted\".","required":["index","instruction"],"properties":{"index":{"type":"integer","description":"Zero-based index of the step that just started.","isRequired":true,"uniqueKey":"oneOf.6.index","typeLabel":"integer"},"instruction":{"type":"string","description":"The plan instruction for this step.","isRequired":true,"uniqueKey":"oneOf.6.instruction","typeLabel":"string"}},"uniqueKey":"oneOf.6","typeLabel":"object"},{"type":"object","description":"SSE lifecycle event sent immediately after \"stepStarted\", before the agent writes the step query. Event name is \"queryExecuting\".","required":["index"],"properties":{"index":{"type":"integer","description":"Zero-based index of the step.","isRequired":true,"uniqueKey":"oneOf.7.index","typeLabel":"integer"}},"uniqueKey":"oneOf.7","typeLabel":"object"},{"type":"object","description":"SSE lifecycle event signalling that the agent has started generating the final answer. Event name is \"answerStarted\". The event name carries the meaning; the body is an empty object.","uniqueKey":"oneOf.8","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"runId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","conversationId":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"exampleType":"generated"},"935d497e-401a-452b-b487-85f38f5f050b":{"description":"Bad request. The request was malformed or invalid.","content":{"application/json":{"schema":{"required":["error_code","message"],"type":"object","properties":{"error_code":{"type":"string","example":"UNAUTHORIZED","isRequired":true,"uniqueKey":"error_code","typeLabel":"string"},"message":{"type":"string","example":"Missing authentication token","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error_message":{"type":"string","example":"","uniqueKey":"error_message","typeLabel":"string"},"sub_errors":{"type":"array","items":{"required":["code","message"],"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"sub_errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"sub_errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"sub_errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"sub_errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error_code":"UNAUTHORIZED","message":"Missing authentication token","error_message":"","sub_errors":[{"code":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"7201ba40-163e-47e4-9f44-f13f77d0b7ba":{"description":"Unauthorized. This error occurs if the authentication token is missing or invalid.","content":{"application/json":{"schema":{"required":["error_code","message"],"type":"object","properties":{"error_code":{"type":"string","example":"UNAUTHORIZED","isRequired":true,"uniqueKey":"error_code","typeLabel":"string"},"message":{"type":"string","example":"Missing authentication token","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error_message":{"type":"string","example":"","uniqueKey":"error_message","typeLabel":"string"},"sub_errors":{"type":"array","items":{"required":["code","message"],"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"sub_errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"sub_errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"sub_errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"sub_errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error_code":"UNAUTHORIZED","message":"Missing authentication token","error_message":"","sub_errors":[{"code":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"7c66ac6c-dfa3-44d0-b3af-7f7b941fd453":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"required":["error_code","message"],"type":"object","properties":{"error_code":{"type":"string","example":"UNAUTHORIZED","isRequired":true,"uniqueKey":"error_code","typeLabel":"string"},"message":{"type":"string","example":"Missing authentication token","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error_message":{"type":"string","example":"","uniqueKey":"error_message","typeLabel":"string"},"sub_errors":{"type":"array","items":{"required":["code","message"],"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"sub_errors.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"sub_errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"sub_errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"sub_errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error_code":"UNAUTHORIZED","message":"Missing authentication token","error_message":"","sub_errors":[{"code":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"258cbcff-9453-4f9d-b3de-b88302926f92":{"bearerAuth":{"type":"http","description":"Use a Bearer token for authentication. Submit the token using the `Authorization`\nheader: `Authorization: Bearer \u003ctoken>`.\n","scheme":"bearer","scopes":[],"schemeName":"bearerAuth"}},"00d2af1e-1344-42a1-b82a-f4a055033f6c":{"openId":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth","scopes":{"openid":"openid"}}},"scopes":["implicit"],"schemeName":"openId"}}},"servers":{"e5189070-0fb4-4cf0-8fea-39217fc8f1f3":{"url":"https://api.datalinks.com/api/v1","description":"production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","description":"Use a Bearer token for authentication. Submit the token using the `Authorization`\nheader: `Authorization: Bearer \u003ctoken>`.\n","scheme":"bearer","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Use a Bearer token for authentication. Submit the token using the `Authorization`\nheader: `Authorization: Bearer \u003ctoken>`.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"},{"schemes":[{"scheme":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth","scopes":{"openid":"openid"}}},"scopes":["implicit"],"schemeName":"openId"},"schema":{"title":"OAuth2 Auth","type":"string","isRequired":true,"description":"The access token received from the authorization server in the OAuth 2.0 flow.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"openId","name":"Authorization"}],"title":"openId"}]},"originalFileLocation":"api-reference/openapi.yml"},"subdomain":"datalinks-d7c3bacc","siteName":"Documentation","title":"Run AutoRAG agent with streaming response - Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-25T14:36:20.571Z","originalFileLocation":"api-reference/autorag/run-autorag-agent-with-streaming-response.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Uses the AutoRAG agent to answer a question about any data that the user can access. Returns results as a Server-Sent Events (SSE) stream with incremental updates. The SSE event name identifies each event. A run that starts emits events in this order: 1. run-started: The run id and the conversation id. 2. planningStarted: The agent started to make the plan. 3. plan: The plan, as a list of step instructions. Not sent if the plan is empty. 4. For each step: stepStarted, then queryExecuting, then step with the instruction, query and result data. queryExecuting is sent immediately after stepStarted, before the agent writes the query. A step that is skipped because a step it depends on produced no value sends stepStarted and step only. 5. answerStarted: The agent started to write the final answer. 6. answer: The final answer. When the question is outside the scope of the data, the stream has no step events and no answerStarted, and answer contains the refusal. A plan can still come before it. When the run fails, an error event replaces the remaining events. If the run cannot start, error is the only event and run-started is not sent. In rare cases, a failure to record a completed run sends error after answer. A conversationId that is unknown, or that the caller cannot continue in this namespace, gets a 404 response before the stream opens. Steps that do not depend on each other run at the same time. Their events can interleave and their step events can arrive out of plan order, so use index to match each event to its step.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Run AutoRAG agent with streaming response - Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Uses the AutoRAG agent to answer a question about any data that the user can access. Returns results as a Server-Sent Events (SSE) stream with incremental updates. The SSE event name identifies each event. A run that starts emits events in this order: 1. run-started: The run id and the conversation id. 2. planningStarted: The agent started to make the plan. 3. plan: The plan, as a list of step instructions. Not sent if the plan is empty. 4. For each step: stepStarted, then queryExecuting, then step with the instruction, query and result data. queryExecuting is sent immediately after stepStarted, before the agent writes the query. A step that is skipped because a step it depends on produced no value sends stepStarted and step only. 5. answerStarted: The agent started to write the final answer. 6. answer: The final answer. When the question is outside the scope of the data, the stream has no step events and no answerStarted, and answer contains the refusal. A plan can still come before it. When the run fails, an error event replaces the remaining events. If the run cannot start, error is the only event and run-started is not sent. In rare cases, a failure to record a completed run sends error after answer. A conversationId that is unknown, or that the caller cannot continue in this namespace, gets a 404 response before the stream opens. Steps that do not depend on each other run at the same time. Their events can interleave and their step events can arrive out of plan order, so use index to match each event to its step.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://datalinks-d7c3bacc.mintlify.site/_mintlify/api/og/v2?division=autorag\u0026amp;title=Run+AutoRAG+agent+with+streaming+response\u0026amp;description=Uses+the+AutoRAG+agent+to+answer+a+question+about+any+data+that+the+user+can+access.%0AReturns+results+as+a+Server-Sent+Events+%28SSE%29+stream+with+incremental+updat\u0026amp;theme=dbbdd144882f1d878fa10cf4\u0026amp;signature=c2513a6c5b27537cd6fac83a8f653dd1027b3faf969b45dae52c0a2b1b275732\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Run AutoRAG agent with streaming response - Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Uses the AutoRAG agent to answer a question about any data that the user can access. Returns results as a Server-Sent Events (SSE) stream with incremental updates. The SSE event name identifies each event. A run that starts emits events in this order: 1. run-started: The run id and the conversation id. 2. planningStarted: The agent started to make the plan. 3. plan: The plan, as a list of step instructions. Not sent if the plan is empty. 4. For each step: stepStarted, then queryExecuting, then step with the instruction, query and result data. queryExecuting is sent immediately after stepStarted, before the agent writes the query. A step that is skipped because a step it depends on produced no value sends stepStarted and step only. 5. answerStarted: The agent started to write the final answer. 6. answer: The final answer. When the question is outside the scope of the data, the stream has no step events and no answerStarted, and answer contains the refusal. A plan can still come before it. When the run fails, an error event replaces the remaining events. If the run cannot start, error is the only event and run-started is not sent. In rare cases, a failure to record a completed run sends error after answer. A conversationId that is unknown, or that the caller cannot continue in this namespace, gets a 404 response before the stream opens. Steps that do not depend on each other run at the same time. Their events can interleave and their step events can arrive out of plan order, so use index to match each event to its step.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://datalinks-d7c3bacc.mintlify.site/_mintlify/api/og/v2?division=autorag\u0026amp;title=Run+AutoRAG+agent+with+streaming+response\u0026amp;description=Uses+the+AutoRAG+agent+to+answer+a+question+about+any+data+that+the+user+can+access.%0AReturns+results+as+a+Server-Sent+Events+%28SSE%29+stream+with+incremental+updat\u0026amp;theme=dbbdd144882f1d878fa10cf4\u0026amp;signature=c2513a6c5b27537cd6fac83a8f653dd1027b3faf969b45dae52c0a2b1b275732\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/datalinks-d7c3bacc/UoVzkwi3FIgLQM3H/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#607251\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/autorag/run-autorag-agent-with-streaming-response.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.datalinks.com/#organization\",\"name\":\"Documentation\",\"url\":\"https://docs.datalinks.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/datalinks-d7c3bacc/TPNYzjeK9vJGjQOz/logo/datalinks_logo.svg?fit=max\u0026auto=format\u0026n=TPNYzjeK9vJGjQOz\u0026q=85\u0026s=c04854596e886fee7cd51d303e0bb6e2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.datalinks.com#website\",\"name\":\"Documentation\",\"url\":\"https://docs.datalinks.com\",\"publisher\":{\"@id\":\"https://docs.datalinks.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response#webpage\",\"url\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response\",\"name\":\"Run AutoRAG agent with streaming response\",\"description\":\"Uses the AutoRAG agent to answer a question about any data that the user can access. Returns results as a Server-Sent Events (SSE) stream with incremental updates. The SSE event name identifies each event. A run that starts emits events in this order: 1. run-started: The run id and the conversation id. 2. planningStarted: The agent started to make the plan. 3. plan: The plan, as a list of step instructions. Not sent if the plan is empty. 4. For each step: stepStarted, then queryExecuting, then step with the instruction, query and result data. queryExecuting is sent immediately after stepStarted, before the agent writes the query. A step that is skipped because a step it depends on produced no value sends stepStarted and step only. 5. answerStarted: The agent started to write the final answer. 6. answer: The final answer. When the question is outside the scope of the data, the stream has no step events and no answerStarted, and answer contains the refusal. A plan can still come before it. When the run fails, an error event replaces the remaining events. If the run cannot start, error is the only event and run-started is not sent. In rare cases, a failure to record a completed run sends error after answer. A conversationId that is unknown, or that the caller cannot continue in this namespace, gets a 404 response before the stream opens. Steps that do not depend on each other run at the same time. Their events can interleave and their step events can arrive out of plan order, so use index to match each event to its step.\",\"dateModified\":\"2026-11-25T14:36:20.571Z\",\"isPartOf\":{\"@id\":\"https://docs.datalinks.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.datalinks.com/api-reference/a2a/list-the-agents-exposed-over-a2a\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"autorag\",\"item\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-over-all-data\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Run AutoRAG agent with streaming response\",\"item\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response#apireference\",\"headline\":\"Run AutoRAG agent with streaming response\",\"name\":\"Run AutoRAG agent with streaming response\",\"description\":\"Uses the AutoRAG agent to answer a question about any data that the user can access. Returns results as a Server-Sent Events (SSE) stream with incremental updates. The SSE event name identifies each event. A run that starts emits events in this order: 1. run-started: The run id and the conversation id. 2. planningStarted: The agent started to make the plan. 3. plan: The plan, as a list of step instructions. Not sent if the plan is empty. 4. For each step: stepStarted, then queryExecuting, then step with the instruction, query and result data. queryExecuting is sent immediately after stepStarted, before the agent writes the query. A step that is skipped because a step it depends on produced no value sends stepStarted and step only. 5. answerStarted: The agent started to write the final answer. 6. answer: The final answer. When the question is outside the scope of the data, the stream has no step events and no answerStarted, and answer contains the refusal. A plan can still come before it. When the run fails, an error event replaces the remaining events. If the run cannot start, error is the only event and run-started is not sent. In rare cases, a failure to record a completed run sends error after answer. A conversationId that is unknown, or that the caller cannot continue in this namespace, gets a 404 response before the stream opens. Steps that do not depend on each other run at the same time. Their events can interleave and their step events can arrive out of plan order, so use index to match each event to its step.\",\"url\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response\",\"mainEntityOfPage\":{\"@id\":\"https://docs.datalinks.com/api-reference/autorag/run-autorag-agent-with-streaming-response#webpage\"},\"dateModified\":\"2026-11-25T14:36:20.571Z\",\"publisher\":{\"@id\":\"https://docs.datalinks.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.datalinks.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/autorag/run-autorag-agent-with-streaming-response.md","siteName":"Documentation","nav":{"global":null,"tabs":[{"tab":"Docs","icon":"file-lines","pages":[{"title":"Docs","href":""}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference"}]},{"group":"Endpoints","expanded":true,"pages":[{"group":"a2a","pages":[{"title":"List the agents exposed over A2A","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /a2a","href":"/api-reference/a2a/list-the-agents-exposed-over-a2a"},{"title":"Fetch an agent's AgentCard","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /a2a/{agentName}/.well-known/agent-card.json","href":"/api-reference/a2a/fetch-an-agents-agentcard"},{"title":"A2A JSON-RPC endpoint for an agent","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /a2a/{agentName}","href":"/api-reference/a2a/a2a-json-rpc-endpoint-for-an-agent"}]},{"group":"agents","pages":[{"title":"Get code files for a cleaning task","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /agents/cleaning/{cleaningTaskId}/code","href":"/api-reference/agents/get-code-files-for-a-cleaning-task"},{"title":"Request cleaning on a dataset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /agents/{username}/{namespace}/{datasetName}/requestCleaning","href":"/api-reference/agents/request-cleaning-on-a-dataset"}]},{"group":"datasets","pages":[{"title":"Fetch datasets","deprecated":true,"version":null,"openapi":"/api-reference/openapi.yml get /data","href":"/api-reference/datasets/fetch-datasets"},{"title":"Fetch datasets in namespace","deprecated":true,"version":null,"openapi":"/api-reference/openapi.yml get /data/{namespace}","href":"/api-reference/datasets/fetch-datasets-in-namespace"}]},{"group":"data","pages":[{"title":"List ingestions for a dataset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /data/{username}/{namespace}/{datasetName}/ingest/attempts","href":"/api-reference/data/list-ingestions-for-a-dataset"}]},{"group":"dataset","pages":[{"title":"Get dataset information","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /data/{username}/{namespace}/{datasetName}","href":"/api-reference/dataset/get-dataset-information"},{"title":"Rename a namespace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data/{username}/{namespace}/rename","href":"/api-reference/dataset/rename-a-namespace"},{"title":"Rename a dataset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data/{username}/{namespace}/{datasetName}/rename","href":"/api-reference/dataset/rename-a-dataset"},{"title":"Update inference definition","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /data/{username}/{namespace}/{datasetName}/inferDefinition","href":"/api-reference/dataset/update-inference-definition"},{"title":"Clear all data for a dataset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data/{username}/{namespace}/{datasetName}/clear","href":"/api-reference/dataset/clear-all-data-for-a-dataset"},{"title":"Delete all data and metadata for a dataset (balefire)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /data/{username}/{namespace}/{datasetName}/balefire","href":"/api-reference/dataset/delete-all-data-and-metadata-for-a-dataset-balefire"},{"title":"Update dataset sort order","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /schema/{username}/{namespace}/{datasetName}/sort-order","href":"/api-reference/dataset/update-dataset-sort-order"}]},{"group":"namespace","pages":[{"title":"Delete all data and metadata for a namespace (balefire)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /data/{username}/{namespace}/balefire","href":"/api-reference/namespace/delete-all-data-and-metadata-for-a-namespace-balefire"}]},{"group":"ingest","pages":[{"title":"Preview","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /infer/preview","href":"/api-reference/ingest/preview"},{"title":"Infer dataset description","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /infer/description","href":"/api-reference/ingest/infer-dataset-description"},{"title":"Schema","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /infer/schema","href":"/api-reference/ingest/schema"},{"title":"Create new dataset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /ingest/new/{namespace}/{datasetName}","href":"/api-reference/ingest/create-new-dataset"},{"title":"Ingest data","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /ingest/{namespace}/{datasetName}","href":"/api-reference/ingest/ingest-data"}]},{"group":"buildspecs","pages":[{"title":"List the caller's BuildSpecs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-specs","href":"/api-reference/buildspecs/list-the-callers-buildspecs"},{"title":"Create a BuildSpec","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /build-specs","href":"/api-reference/buildspecs/create-a-buildspec"},{"title":"Get a BuildSpec","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-specs/{buildSpecId}","href":"/api-reference/buildspecs/get-a-buildspec"},{"title":"Edit a BuildSpec","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /build-specs/{buildSpecId}","href":"/api-reference/buildspecs/edit-a-buildspec"},{"title":"Delete a BuildSpec","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /build-specs/{buildSpecId}","href":"/api-reference/buildspecs/delete-a-buildspec"},{"title":"Schedule a build (create a BuildRun)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /build-specs/{buildSpecId}/run","href":"/api-reference/buildspecs/schedule-a-build-create-a-buildrun"},{"title":"Preview a build (dry run)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /build-specs/{buildSpecId}/preview","href":"/api-reference/buildspecs/preview-a-build-dry-run"},{"title":"List a BuildSpec's runs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-specs/{buildSpecId}/runs","href":"/api-reference/buildspecs/list-a-buildspecs-runs"},{"title":"Get a BuildRun","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-runs/{buildRunId}","href":"/api-reference/buildspecs/get-a-buildrun"},{"title":"List the ingestions a BuildRun performed","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-runs/{buildRunId}/ingestions","href":"/api-reference/buildspecs/list-the-ingestions-a-buildrun-performed"},{"title":"List a preview run's outputs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-runs/{buildRunId}/outputs","href":"/api-reference/buildspecs/list-a-preview-runs-outputs"},{"title":"Fetch a preview output's download URL","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-runs/{buildRunId}/outputs/{destinationName}","href":"/api-reference/buildspecs/fetch-a-preview-outputs-download-url"},{"title":"List a pipeline's file-input slot bindings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-specs/{buildSpecId}/file-inputs","href":"/api-reference/buildspecs/list-a-pipelines-file-input-slot-bindings"},{"title":"Set (replace) the files bound to a file-input slot","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /build-specs/{buildSpecId}/file-inputs/{slot}","href":"/api-reference/buildspecs/set-replace-the-files-bound-to-a-file-input-slot"},{"title":"Unbind a file-input slot","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /build-specs/{buildSpecId}/file-inputs/{slot}","href":"/api-reference/buildspecs/unbind-a-file-input-slot"},{"title":"Add a file to a batch file-input slot","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /build-specs/{buildSpecId}/file-inputs/{slot}/members","href":"/api-reference/buildspecs/add-a-file-to-a-batch-file-input-slot"},{"title":"Remove a file from a file-input slot","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /build-specs/{buildSpecId}/file-inputs/{slot}/members/{fileId}","href":"/api-reference/buildspecs/remove-a-file-from-a-file-input-slot"},{"title":"List a pipeline repo's files","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-specs/{buildSpecId}/files","href":"/api-reference/buildspecs/list-a-pipeline-repos-files"},{"title":"Save edits to a pipeline repo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml put /build-specs/{buildSpecId}/files","href":"/api-reference/buildspecs/save-edits-to-a-pipeline-repo"},{"title":"Read one file from a pipeline repo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /build-specs/{buildSpecId}/file","href":"/api-reference/buildspecs/read-one-file-from-a-pipeline-repo"},{"title":"Validate a pipeline repo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /build-specs/{buildSpecId}/files/validate","href":"/api-reference/buildspecs/validate-a-pipeline-repo"},{"title":"Sync a pipeline repo's manifest with the spec","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /build-specs/{buildSpecId}/files/sync-manifest","href":"/api-reference/buildspecs/sync-a-pipeline-repos-manifest-with-the-spec"}]},{"group":"ingestionTracking","pages":[{"title":"Retry ingestion","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /ingestionTracking/{ingestionId}/retry","href":"/api-reference/ingestiontracking/retry-ingestion"},{"title":"Mark ingestion as seen","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /ingestionTracking/{ingestionId}/seen","href":"/api-reference/ingestiontracking/mark-ingestion-as-seen"}]},{"group":"links","pages":[{"title":"Load links","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /links/{username}/{namespace}/{datasetName}","href":"/api-reference/links/load-links"},{"title":"Rebuild links","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /links/{username}/{namespace}/{datasetName}","href":"/api-reference/links/rebuild-links"},{"title":"Preview links","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /links/preview/{username}/{namespace}/{datasetName}","href":"/api-reference/links/preview-links"},{"title":"Add a new link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /links/add","href":"/api-reference/links/add-a-new-link"}]},{"group":"ontology","pages":[{"title":"Get dataset ontology","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /ontology/{username}/{namespace}/{datasetName}","href":"/api-reference/ontology/get-dataset-ontology"},{"title":"Save dataset ontology","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /ontology/{username}/{namespace}/{datasetName}","href":"/api-reference/ontology/save-dataset-ontology"},{"title":"Curate ontology links","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /ontology/curate-links","href":"/api-reference/ontology/curate-ontology-links"}]},{"group":"rdf","pages":[{"title":"Export a namespace ontology as RDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /rdf/{username}/{namespace}/ontology","href":"/api-reference/rdf/export-a-namespace-ontology-as-rdf"},{"title":"List a namespace's ontology versions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /rdf/{username}/{namespace}/ontology/versions","href":"/api-reference/rdf/list-a-namespaces-ontology-versions"},{"title":"Export one stored version of a namespace ontology as RDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /rdf/{username}/{namespace}/ontology/versions/{number}","href":"/api-reference/rdf/export-one-stored-version-of-a-namespace-ontology-as-rdf"},{"title":"Compare 2 stored versions of a namespace ontology","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /rdf/{username}/{namespace}/ontology/versions/{from}/diff/{to}","href":"/api-reference/rdf/compare-2-stored-versions-of-a-namespace-ontology"},{"title":"Export a namespace's SHACL shapes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /rdf/{username}/{namespace}/shapes","href":"/api-reference/rdf/export-a-namespaces-shacl-shapes"},{"title":"Stream a namespace's rows as RDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /rdf/{username}/{namespace}/data","href":"/api-reference/rdf/stream-a-namespaces-rows-as-rdf"}]},{"group":"schema","pages":[{"title":"List all datasets","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /schema/datasets/all","href":"/api-reference/schema/list-all-datasets"},{"title":"List user namespaces","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /schema/{user}/namespaces","href":"/api-reference/schema/list-user-namespaces"},{"title":"List datasets within namespace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /schema/{user}/{namespace}/datasets","href":"/api-reference/schema/list-datasets-within-namespace"}]},{"group":"permissions","pages":[{"title":"List users with access to a dataset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /permissions/datasets/{username}/{namespace}/{datasetName}/shares","href":"/api-reference/permissions/list-users-with-access-to-a-dataset"},{"title":"Share a dataset with a user","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /permissions/datasets/{username}/{namespace}/{datasetName}/shares","href":"/api-reference/permissions/share-a-dataset-with-a-user"},{"title":"Revoke a user's access to a dataset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /permissions/datasets/{username}/{namespace}/{datasetName}/shares","href":"/api-reference/permissions/revoke-a-users-access-to-a-dataset"},{"title":"List users with access to a namespace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /permissions/namespaces/{username}/{namespace}/shares","href":"/api-reference/permissions/list-users-with-access-to-a-namespace"},{"title":"Share a namespace with a user","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /permissions/namespaces/{username}/{namespace}/shares","href":"/api-reference/permissions/share-a-namespace-with-a-user"},{"title":"Revoke a user's access to a namespace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /permissions/namespaces/{username}/{namespace}/shares","href":"/api-reference/permissions/revoke-a-users-access-to-a-namespace"}]},{"group":"query","pages":[{"title":"Query data","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /query","href":"/api-reference/query/query-data"}]},{"group":"autorag","pages":[{"title":"Run AutoRAG agent over all data","description":"Uses the AutoRAG agent to answer a question about any data that the user can access.\n\nA `conversationId` that is unknown, or that the caller cannot continue in this namespace, gets a 404 response.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /query/autorag","href":"/api-reference/autorag/run-autorag-agent-over-all-data"},{"title":"Run AutoRAG agent with streaming response","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /query/ask","href":"/api-reference/autorag/run-autorag-agent-with-streaming-response"}]},{"group":"agentRuns","pages":[{"title":"Get the status of an agent run","description":"Returns the current status of an agent run, the original question, and (for completed\nruns) the rendered result. Use this to find the status of a run, for example after a dropped SSE connection.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /query/runs/{runId}","href":"/api-reference/agentruns/get-the-status-of-an-agent-run"},{"title":"Delete an agent run and request the erase of its data","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /query/runs/{runId}","href":"/api-reference/agentruns/delete-an-agent-run-and-request-the-erase-of-its-data"},{"title":"Resume an agent run (no run can resume at this time)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /query/runs/{runId}/resume","href":"/api-reference/agentruns/resume-an-agent-run-no-run-can-resume-at-this-time"},{"title":"Submit thumbs up/down feedback on a completed agent run","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /query/runs/{runId}/feedback","href":"/api-reference/agentruns/submit-thumbs-updown-feedback-on-a-completed-agent-run"}]},{"group":"conversations","pages":[{"title":"List the caller's conversations within a namespace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /query/conversations","href":"/api-reference/conversations/list-the-callers-conversations-within-a-namespace"},{"title":"Get a conversation and its turns","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /query/conversations/{conversationId}","href":"/api-reference/conversations/get-a-conversation-and-its-turns"}]},{"group":"user","pages":[{"title":"List user tokens","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /user/tokens","href":"/api-reference/user/list-user-tokens"},{"title":"Add a new user token","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /user/token","href":"/api-reference/user/add-a-new-user-token"},{"title":"Delete user token","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /user/token/{tokenId}","href":"/api-reference/user/delete-user-token"},{"title":"List token permissions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /user/tokens/{tokenId}/permissions","href":"/api-reference/user/list-token-permissions"},{"title":"Get user usage history","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /user/usage/history","href":"/api-reference/user/get-user-usage-history"},{"title":"Get user usage aggregated by day","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /user/usage/by-day","href":"/api-reference/user/get-user-usage-aggregated-by-day"},{"title":"Get the current user","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /user/me","href":"/api-reference/user/get-the-current-user"}]},{"group":"multipart-upload","pages":[{"title":"Prepare multipart upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /upload/multipart/{username}/{namespace}/{datasetName}/prepare","href":"/api-reference/multipart-upload/prepare-multipart-upload"},{"title":"Finish multipart upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /upload/multipart/{username}/{namespace}/{datasetName}/finish","href":"/api-reference/multipart-upload/finish-multipart-upload"},{"title":"Abort multipart upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /upload/multipart/{username}/{namespace}/{datasetName}/abort","href":"/api-reference/multipart-upload/abort-multipart-upload"}]},{"group":"fileUpload","pages":[{"title":"Prepare session for file upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /file-upload/prepare","href":"/api-reference/fileupload/prepare-session-for-file-upload"},{"title":"Finish file upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /file-upload/{sessionId}/files/{fileId}/finish","href":"/api-reference/fileupload/finish-file-upload"},{"title":"Abort file upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /file-upload/{sessionId}/abort","href":"/api-reference/fileupload/abort-file-upload"},{"title":"List completed files in an upload session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /file-upload/{sessionId}/files","href":"/api-reference/fileupload/list-completed-files-in-an-upload-session"}]},{"group":"data-assets","pages":[{"title":"List the committed, non-deleted data assets in a namespace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /data-assets/{username}/{namespace}","href":"/api-reference/data-assets/list-the-committed-non-deleted-data-assets-in-a-namespace"},{"title":"Create a data asset and start its first version upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data-assets/{username}/{namespace}","href":"/api-reference/data-assets/create-a-data-asset-and-start-its-first-version-upload"},{"title":"Get a data asset's latest metadata and a presigned download URL","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /data-assets/{username}/{namespace}/{assetId}","href":"/api-reference/data-assets/get-a-data-assets-latest-metadata-and-a-presigned-download-url"},{"title":"Soft-delete a data asset (retained briefly, then hard-purged)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml delete /data-assets/{username}/{namespace}/{assetId}","href":"/api-reference/data-assets/soft-delete-a-data-asset-retained-briefly-then-hard-purged"},{"title":"Update a data asset's name and/or description","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml patch /data-assets/{username}/{namespace}/{assetId}","href":"/api-reference/data-assets/update-a-data-assets-name-andor-description"},{"title":"List the versions of a data asset, newest first","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /data-assets/{username}/{namespace}/{assetId}/versions","href":"/api-reference/data-assets/list-the-versions-of-a-data-asset-newest-first"},{"title":"Start uploading a new version of a data asset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data-assets/{username}/{namespace}/{assetId}/versions","href":"/api-reference/data-assets/start-uploading-a-new-version-of-a-data-asset"},{"title":"Get a presigned download URL for a specific version","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /data-assets/{username}/{namespace}/{assetId}/versions/{versionNo}","href":"/api-reference/data-assets/get-a-presigned-download-url-for-a-specific-version"},{"title":"Complete a version upload from the client's part manifest","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data-assets/{username}/{namespace}/{assetId}/versions/{versionNo}/finish","href":"/api-reference/data-assets/complete-a-version-upload-from-the-clients-part-manifest"},{"title":"Acknowledge an uploaded chunk, extending the deadline and getting the next chunk's URL","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data-assets/{username}/{namespace}/{assetId}/versions/{versionNo}/parts/{partNumber}/done","href":"/api-reference/data-assets/acknowledge-an-uploaded-chunk-extending-the-deadline-and-getting-the-next-chunks-url"},{"title":"Recover a pending upload - what landed, with ETags, and URLs for what did not","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml get /data-assets/{username}/{namespace}/{assetId}/versions/{versionNo}/status","href":"/api-reference/data-assets/recover-a-pending-upload--what-landed-with-etags-and-urls-for-what-did-not"},{"title":"Re-issue upload URLs for specific parts, extending the deadline","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data-assets/{username}/{namespace}/{assetId}/versions/{versionNo}/parts/presign","href":"/api-reference/data-assets/re-issue-upload-urls-for-specific-parts-extending-the-deadline"},{"title":"Abort a pending version upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data-assets/{username}/{namespace}/{assetId}/versions/{versionNo}/abort","href":"/api-reference/data-assets/abort-a-pending-version-upload"},{"title":"Roll back to a retained version by copying it as a new version","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yml post /data-assets/{username}/{namespace}/{assetId}/rollback","href":"/api-reference/data-assets/roll-back-to-a-retained-version-by-copying-it-as-a-new-version"}]}]}]},{"tab":"Python SDK","icon":"python","pages":[{"title":"Python SDK","href":"/pythonsdk"}]}]},"basePath":"","title":"Run AutoRAG agent with streaming response - Documentation","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CaRkHcld.js","snippetPresets-CbOVSLWB.js","utils-cjri0g4r.js","style-to-object-BY3JEAdk.js","utils-DINdUa17.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-B6z-PJGf.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BldndzCM.js","_Uint8Array-BFUkDgJK.js","isObject-FP1Yky1u.js","ApiExamples-gah5G0c1.js","usePlaygroundInputsStore-DMbftGRK.js","shallow-BPuQ-dV8.js","isEqual-Du6c450V.js","CodeSnippets-BSVM0Ibi.js","CodeSnippet-BtGQRZnK.js","use-playground-group-access-98JyaSW7.js","Page-DuvGhd6e.js","api-description-markdown-ja0XM5Ae.js","DynamicMarkdown-DgKZ4_wp.js","SectionHeading-S4Jc_qPe.js","MethodPill-HIsDH_bI.js","getPastedJson-BKEmMYEO.js","Check2Icon-CRFAnWm9.js","axios-CsQoIw0U.js","Markdown-CexXCNoj.js","AssistantPageLink-C2AZnMAs.js","dist-CjxLTLs9.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}