v2

latestOpenAPI 3.1.02026-08-05267431678.1 KB
auto-agent

Clarify

Stream the clarification agent response as Server-Sent Events.

Each event is a JSON object preceded by data: and terminated by two newlines. Two event types are emitted:

  • {"type": "delta", "content": "..."} — streamed token(s).
  • {"type": "complete", ...} — final summary with answer, interrupt data, and run_id / results_url if the agent triggered a run.

When a run is triggered, a background task is scheduled via spawn_background_task (FastAPI BackgroundTasks is incompatible with StreamingResponse).

Args: request: FastAPI request (required by rate limiter). body: Chat request with message, optional resume_value, and history. auth: Authenticated user.

Returns: StreamingResponse with text/event-stream content type.

Raises: HTTPException: 400 if neither message nor resume_value is provided.

post/auto-agent/clarify

Request body

messagestring nullable

User text input (for new turns)

resume_valuestring nullable

MCQ option selected by user (resumes interrupted graph)

conversation_idstring nullable

Existing conversation ID

historyobject[] nullable

Conversation history [{role, content, tool_calls?, tool_call_id?, name?}]

project_idstring nullable

Project ID selected by the user. Hidden from the chat UI and used to scope any resources created by a triggered Auto Agent run.

client_metadataobject nullable

Optional client trace metadata for observability.

Response

Successful Response

{"stackTrail":"paths:/auto-agent/clarify:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}