Documentation Index
Fetch the complete documentation index at: https://docs.svantic.com/llms.txt
Use this file to discover all available pages before exploring further.
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 via message/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 more Parts:
| 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)
import { RemoteAgent } from '@svantic/sdk';
const remote = await RemoteAgent.connect('http://savant:3000');
const stream = remote.send_stream('Analyze this codebase', 'session-1');
for await (const event of stream) {
if (event.kind === 'status-update') {
console.log('Status:', event.status.state);
}
if (event.kind === 'message') {
for (const part of event.message.parts) {
if (part.kind === 'text') {
process.stdout.write(part.text);
}
}
}
}
Using the REST API
For direct HTTP access, use POST /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 the EventConverter:
| 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) |