Run

View as Markdown
Run the Labric data-analysis agent and return its final answer alongside the tool calls it made. With stream=true the response is instead a stream of server-sent AgentRunEvent events, closing after a terminal `result` event that carries the same summary, or an `error` event if the run fails; prefer streaming for long analyses. Pass chat_id to continue a saved conversation, or save=true to save the run as a new chat visible in the web UI; if saving fails, the answer is still returned but its chat_id is null. Requires an API key with the `read` scope.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
promptstringRequired
streamtrueRequired
modelstring or nullOptional
chat_idstring or nullOptionalformat: "uuid"
savebooleanOptionalDefaults to false

Response

typestring
deltastring or nullOptional
tool_call_idstring or nullOptional
tool_namestring or nullOptional
inputanyOptional
outputanyOptional
resultobject or nullOptional

Final result of an agent run: the assistant’s answer, the tool calls it made, token usage, and the chat id when the run was persisted.

errorstring or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error
502
Bad Gateway Error