Skip to main content
POST /v1/workspaces/{workspace_id}/ask runs Soma’s agent: it searches the documents and the knowledge graph as many times as it needs, reads whole documents when a table is involved, then answers.
answer is markdown with [N] markers; citations lists the passage behind each N that the answer uses.

Follow-up questions

Pass the thread_id of the previous answer:
Threads are the same as in the Soma app: the conversation shows up there too.

Streaming

With "stream": true the response is a stream of Server-Sent Events:
Comment lines (: keep-alive) are sent every 15 seconds while the agent works.