Streaming
Real-time response streaming.
Overview
Streaming allows responses to appear in real-time as they're generated, rather than waiting for the complete response.
How It Works
Model → Token → Token → Token → Complete
↓ ↓ ↓
Display Display DisplayInstead of waiting for the full response, tokens are sent as they're generated.
Configuration
json5
{
agent: {
streaming: true,
streamingChunkSize: 10 // Tokens per chunk
}
}Channel Support
Not all channels support streaming equally:
| Channel | Streaming Support |
|---|---|
| WebChat | Full |
| Control UI | Full |
| Telegram | Partial (edit messages) |
| Limited | |
| Discord | Partial |
Benefits
- Faster perceived response: Users see output immediately
- Better UX: More natural conversation feel
- Cancelable: Users can cancel mid-response
Limitations
- Some channels don't support message editing
- Network latency can affect smoothness
- Tool calls may pause streaming