Streaming
All Octavus responses stream in real-time using Server-Sent Events (SSE). This enables responsive UX with incremental updates.
Stream Response
When you trigger an action, you get an async generator of parsed events:
typescript
Event Types
The stream emits various event types. Octavus events align with the Vercel AI SDK naming conventions where applicable.
Lifecycle Events
typescript
Block Events
Track execution progress:
typescript
Text Events
Streaming text content:
typescript
Reasoning Events
Extended reasoning (for supported models like Claude):
typescript
Tool Events
Tool call lifecycle:
typescript
Resource Events
Resource updates:
typescript
Display Modes
Each block/tool specifies how it should appear to users:
| Mode | Description |
|---|---|
hidden | Not shown to user (background work) |
name | Shows block/tool name |
description | Shows description text |
stream | Streams content to chat |
Note: Hidden events are filtered before reaching the client SDK. Your frontend only sees user-facing events.
Stream Event Type
typescript
Error Recovery
The SDK handles common error scenarios:
typescript