Cedar enables streaming responses by default in your chat interface. Responses appear in real-time as they’re generated. You can disable streaming by setting theDocumentation Index
Fetch the complete documentation index at: https://docs.cedarcopilot.com/llms.txt
Use this file to discover all available pages before exploring further.
stream prop to false on any chat component or ChatInput.
Partial Object Streaming Not Supported: Cedar currently doesn’t support
partial object streaming. For structured data to be handled via Cedar’s
automatic handlers, only complete objects should be streamed or streaming
should be turned off.
Quick Start
With Pre-built Components
Streaming is enabled by default for all pre-built chat components:stream={false}:
With Individual Components
The ChatInput component has streaming enabled by default, but you can override it:How It Works
When streaming is enabled:- Real-time Updates: Text streams in character by character as it’s generated
- Out of the box support for streaming flexible objects: Handle structured objects and custom events (see Custom Message Rendering)
- Smooth Animation: Built-in typewriter effect for natural reading experience
- Error Handling: Graceful fallbacks if streaming fails
Additional Configuration necessary by provider
- OpenAI and AI SDK: Streaming is supported out of the box
- Mastra and Custom backend: The backend is required to send a data-only SSE stream of information in either streamed text or entire objects
Uhhh... what is a data-only SSE stream?
Uhhh... what is a data-only SSE stream?
Server-Sent Events (SSE) are part of a one-way streaming protocol to deliver a sequence of JSON objects for structured data or tool outputsOur client handlers will parse each
data: messages over a single HTTP connection. The stream mixes plain text and structured JSON, sent as newline-delimited chunks prefixed with data:.Under the hood, the server emits:Text chunks for incremental message renderingdata: line as it arrives and handle parsed text or JSON accordingly. This enables real-time, mixed-format updates with minimal overhead.Sample Backend Streaming Handler Implementation
Sample Backend Streaming Handler Implementation
Feel free to drop these handlers into your backend to take care of Cedar-OS-compatible streaming.1. Example Usage:2. Core SSE Stream Creator:
Next Steps
- Set up our cedar-mastra-starter for an example of streaming from a separate Mastra server.
- Sending back a custom object type? Render it using custom message rendering
- Learn about configuring the Cedar editor

