Run an Agent as an external user, streaming AG-UI events (SSE)
Requires a ProjectRuntimeContext — the credential must be paired with the x-persona-external-user-id header asserting which of the Project’s own external users is running the Agent. Reuses the exact same runtime as the Persona AG-UI route. Pass x-thread-id (a Thread id from POST /api/v1/developer/threads) to resume a named conversation — omit it to keep using the implicit, Domain-extended deterministic thread id (one conversation per Agent + external user). An unrecognized/foreign/wrong-agent x-thread-id silently falls back to the deterministic id rather than erroring (same contract as the Persona AG-UI route).
Authorizations
Developer Platform Project credential, minted via POST /api/v1/projects/{projectId}/credentials. Send as Authorization: Bearer <keyId>.<secret>. Optionally pair with the x-persona-external-user-id header to act on behalf of one of the Project's own external users. This credential is a server-side secret — see the Integration Guide.
Headers
A Thread id from the Developer Thread CRUD API — resumes that conversation instead of the implicit deterministic one.
Body
Resume data for a Thread paused on a human-in-the-loop interrupt (e.g. an agent-management tool the Agent's interruptOn config requires confirming). Pass { type: "decision", decision: "continue" | "reject" } to approve/deny a pending tool call, or an object shaped for the specific clarification the interrupted run is waiting on.
Response
A text/event-stream SSE stream of AG-UI protocol events (the standard @ag-ui/core EventType values): RUN_STARTED once at the start of the run; TEXT_MESSAGE_CHUNK for streamed assistant text deltas; REASONING_MESSAGE_START/CONTENT/END for models that expose reasoning; TOOL_CALL_CHUNK/TOOL_CALL_RESULT for tool invocations and their results; STATE_SNAPSHOT for full-state updates; CUSTOM for Persona-specific side-channel events (e.g. subagent traces, MCP structured content); and RUN_FINISHED once at the end. Each event is a JSON object sent as one data: line per SSE convention.