Pipecat Flows
Technical reference for Pipecat’s conversation flow system
New to building conversational flows? Check out our Pipecat Flows guide first.
Installation
Pipecat Flows requires an additional dependency:
FlowManager
Main class for managing conversation flows.
Constructor Parameters
Complete flow configuration including initial_node and nodes
Pipeline task for frame queueing
Optional TTS service for immediate speech actions
Configuration Structure
Example flow_config
Here’s a minimal example demonstrating the flow_config
structure:
See the Pipecat Flows guide for a more complete example.
Methods
Initialize the flow with starting messages
Parameters:
- initial_messages: List[dict] - Initial context messages
Register flow functions with LLM service
Parameters:
- llm_service: LLMService - Service to register functions with
Register custom action handler
Parameters:
- action_type: str - Action identifier
- handler: Callable - Action handler function
Built-in Actions
Speaks text immediately using TTS service
Ends the conversation and closes the connection
Example Usage
Function Types
Terminal Functions
Execute without changing nodes. Used for refinement within a state.
Transitional Functions
Execute and change to new node. Used for major state changes.