Start an agent
Send a brief toPOST /api/v2/agents. This creates the
agent and starts its first run.
202 Accepted with the run already running. Keep the agent.id and run.id
from the response — you’ll need both.
Poll for the result
The agent works in the background, so pollGET /api/v2/agents/{id}/runs/{runId} until status is no
longer running. Each running response carries a Retry-After header (15 seconds) —
wait that long between polls. Polling is free.
Read the response
When the run finishes, check two things on the run object:- Questions — if
todo.pendingQuestions[]isn’t empty, the agent needs you to clarify something before it continues. Answer it with a follow-up run. - Results —
response.tables[]lists every table the agent built or changed, each with aurlyou can open in Origami.
Follow up
To answer a question or ask for more, send another run to the same agent withPOST /api/v2/agents/{id}/runs. It keeps the same workspace
and conversation, so just say what’s next.
POST /api/v2/agents/{id}/cancel — whatever it built so
far is kept.