Skip to main content

Run an agent generation

POST 

/api/v1/agents/:agent_id/generate

Sends messages to the agent, resolves its tools, and runs the AI model loop. Background by default: returns 202 Accepted with a generation_id to poll via GET /api/v1/generations/{generation_id}. Pass ?wait=true to block and receive the result inline, where client tools pause the generation and return requires_action. Streaming (stream: true) implies waiting.

Request

Responses

Generation result or SSE stream (only when ?wait=true or stream: true)