Core Concepts
Event: An object sent between components of the voice agent system (e.g.,UserTranscriptionReceived, AgentResponse, ToolCall). This is the core unit
of communication between components. Events are wrapped in a Message before
being sent to the bus.
Node: A stateful event processor that handles conversations and generates
events. Typically an AI agent that processes user input and creates replies.
Bridge: A component that connects nodes to the event bus. Each bridge can be
configured with different routes, that trigger based on different events.
Messages are received and sent on the Bridge.
Route: An event processing pipeline. They specify what operations to run
when certain events occur. A route is triggered on a specific event type or
regex pattern.
System Components
These components work behind the scenes to orchestrate your voice agent: VoiceAgentSystem: The builder that orchestrates all components for a single call. It manages the lifecycle and connections between your nodes and bridges. VoiceAgentApp: The main entry point that handles WebSocket connections and creates a newVoiceAgentSystem for each call.
Bus: The central message bus that delivers messages between all components.
You rarely interact with it directly - it works automatically behind the scenes.
Events are automatically wrapped in Message objects when they are sent to the
bus.