Skip to main content

Trigger agent generation

POST 

/v1/projects/:project_id/sessions/:session_id/generate

Triggers the agent to generate a response based on the current conversation. Background by default: returns 202 Accepted with the generation's id once its record exists. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response. Pass stream: true in the body to receive the turn's events as SSE, one frame per step and tool call, until it settles; stream: true with ?wait=false is 400.

Request​

Responses​

Agent reply or requires_action (only when ?wait=true), or the turn's event stream (with stream: true)