Streaming & Events
Svantic supports real-time streaming via the A2A protocol’s SSE (Server-Sent Events) mechanism, enabling clients to receive progressive updates as tasks execute.A2A Streaming
When a client sends a task to Svantic viamessage/stream, the response is an SSE stream of A2A events:
Event Types
TaskStatusUpdateEvent
Reports task lifecycle changes:| State | Meaning |
|---|---|
submitted | Task received, queued for processing |
working | Execution in progress |
input-required | Waiting for user input (form, approval) |
completed | Task finished successfully |
failed | Task failed with error |
canceled | Task was canceled |
Message
An agent response containing one or moreParts:
| Part Kind | Content |
|---|---|
TextPart | Plain text (thoughts, explanations, answers) |
DataPart | Structured JSON (tool results, forms, capability invocations) |
FilePart | File content or reference |
TaskArtifactUpdateEvent
Emitted when the agent produces a tangible output — a file, a structured document, or a final result.Consuming Streams
Using RemoteAgent (SDK)
Using the REST API
For direct HTTP access, usePOST /send with method: "message/stream" — see the Using the API guide.
Event Conversion
Svantic’s internal engine events are automatically converted to A2A events by theEventConverter:
| Internal Event | A2A Event |
|---|---|
| Agent text output | Message with TextPart |
| Tool call start | TaskStatusUpdateEvent (working) |
| Tool result | Message with DataPart |
| Plan approval request | Message with DataPart (form) |
| A2UI form | Message with DataPart (form fields) |
| Execution complete | TaskStatusUpdateEvent (completed) |
| Error | TaskStatusUpdateEvent (failed) |
