Start an Agent Builder session
Session Lifecycle
- POST /start (this endpoint) — create a session from a prompt → returns
sessionId. - GET //status — poll every few seconds until
statusis"completed"(the AI finished building the agent successfully),"ready"(the AI finished its turn but the agent may not have been saved yet), or"error". On any terminal status the response also containsagentIdandagentName; stop polling at that point. Subsequent calls may return the same terminal response or404— both mean the build is done. - POST //stop (optional) — abort the session early if you no longer
want the build to continue. Returns
204 No Content. Has no effect once the session has already reached a terminal state.
Note: The session tears down automatically a short time after reaching a terminal status — no explicit teardown call is required. The agent draft is saved in your workspace as soon as the AI creates it (before the session ends). The draft persists whether or not you call
/stop; use the standard agents API to delete unwanted drafts.
Authorizations
API Key authorization header. Example: "Authorization: ApiKey {your-api-key}"
OAuth 2.0 Bearer token. Example: "Authorization: Bearer {access-token}"
Body
The prompt and optional space to save to
Request to start an agent building session via the external API.
Response
OK
Response when starting an agent build session via the external API.
Session ID to use for status polling and subsequent calls.
1