What is a Route?
Routes connect events to processing logic. They create pipelines where data flows through operations.Basic Example
Core Operations
| Operation | Description |
|---|---|
on(Event) | Listen for specific event types |
map(function) | Transform data by applying a function |
filter(condition) | Continue processing only if condition is met |
stream(generator) | Process async generators that yield multiple values |
broadcast() | Send results to other components (terminal operation) |
Key Features
- Declarative Processing: Define what happens when events occur
- Pipeline Chaining: Link operations to transform and route data
- Interrupt Handling: Gracefully handle conversation interruptions
- Multi-Agent Coordination: Route events between different agents