Skip to main content
POST
Stream an agent reply via SSE (A2A)

Authorizations

Authorization
string
header
required

User-bound credential carrying an identity: either a session JWT or a user access token (at:*) generated from the user settings UI. Send as Authorization: Bearer <token>. Org API keys (iak_*) are not accepted here - they carry no user identity. Use the x-prismeai-api-key header instead (see OrgApiKeyAuth).

Headers

x-draft-mode
boolean

When true, the stream exercises the agent's live (draft) config instead of published_config. Owners/writers only.

Path Parameters

agentId
string
required
Maximum string length: 64

Body

application/json
message
object
required

A2A v0.3 flat message envelope.

Response

Server-Sent Events stream of A2A task lifecycle events. task.output.completed is the terminal lifecycle event. Its data.status.state reports whether the task completed, failed, or requires user input. A transport summary frame follows; inspect its error and task.status.state fields before closing the stream.

Stream of data: <json> lines. Lifecycle frames use {"event":"<name>","data":{...}}; the server does not emit native SSE event: fields. Discard only the literal {"keepAlive": true} frame. The final summary frame has no event; inspect error.error for an early authorization failure and task.status.state for the final task state.