Skip to main content

Run an agent generation

POST 

/v1/projects/:project_id/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 /v1/projects/{project_id}/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. Pass idempotency_key to make a retry safe: a request whose key is already claimed runs nothing and answers 202 with the generation the key names.

A credential scoped to a project the agent is shared with, through an accepted share, runs it in that project: on the publisher's configuration, recorded, metered and governed in the grantee project.

Request​

Responses​

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