Skip to main content
Stream agent responses word-by-word for instant feedback — no waiting for the full response.

Quick Start

1

Simple Usage

Streaming is on by default — just create an agent and chat.
2

With Configuration

Turn off streaming when you need the complete response at once.
3

Streaming with Tools

Tool calls are handled automatically — the stream continues after tool execution.

How It Works


Configuration Options


Common Patterns

Interactive Chat Application

Long-Form Content Generation

Batch Processing (Disable Streaming)


Best Practices

Streaming dramatically improves perceived performance. Users see responses immediately rather than waiting. Keep it enabled for any chat or interactive application.
When processing many documents or requests without a live user, stream: false is faster and simpler — you get back the complete string directly from chat().
Set verbose: true during development to see formatted streaming output in the console. Disable it in production API endpoints where you only need the return value.
Every supported LLM provider (OpenAI, Anthropic, Google, Groq, etc.) supports streaming. You do not need to change the provider to enable it.

Agent

Full agent configuration

Providers

LLM provider setup