Skip to main content
Streaming is enabled by setting "streaming_on": true in your agent configuration.

Quick Start

Enable streaming by adding the streaming_on parameter to your agent configuration:

Advanced Configuration

For more complex streaming scenarios, you can customize the agent configuration:

Stream Format

The API returns data in Server-Sent Events (SSE) format:
The first frame (initial metadata) is sent without an event: line, so it arrives as a default message event. Only content chunks include the content key, which is what the example consumer code above checks for.

Key Benefits

  • Real-time Feedback: See results as they’re generated
  • Better User Experience: Reduced perceived latency
  • Progress Tracking: Monitor long-running operations
  • Immediate Error Detection: Catch issues early in the process

Use Cases

  • Creative Writing: Generate stories, articles, or content with live updates
  • Data Analysis: Process large datasets with streaming insights
  • Research Tasks: Get research findings as they’re discovered
  • Code Generation: See code being written in real-time
  • Educational Content: Create interactive learning experiences