Streaming with Workflows
Learn how to build streaming workflows
LlamaIndex workflows are designed from the ground up to work with streaming data. The streaming capabilities make it perfect for:
- Building real-time applications
- Handling large datasets incrementally
- Creating responsive UIs that update as data becomes available
- Implementing long-running tasks with partial results
Basic Streaming
Every workflow context provides a stream of events:
Using the Stream Utilities
Workflows provide utility functions to make working with streams easier:
Conditional Stream Processing
You can conditionally process events and even stop the stream early:
Integration with UI Frameworks
Workflow streams can be easily integrated with UI frameworks like React to create responsive interfaces:
Server-Sent Events (SSE)
Workflows are also suitable for implementing Server-Sent Events:
Next Steps
Now that you've learned about streaming with workflows, explore more advanced topics: