Pipecat Flows
Technical reference for Pipecat’s conversation flow system
New to building conversational flows? Check out our Pipecat Flows guide first.
Installation
Core Types
FlowArgs
FlowResult
Base type for function handler results. Additional fields can be included as needed.
FlowConfig
Configuration for the entire conversation flow.
NodeConfig
Configuration for a single node in the flow.
FlowManager
Main class for managing conversation flows, supporting both static (configuration-driven) and dynamic (runtime-determined) flows.
Methods
Initialize the flow with starting messages.
Set up a new conversation node.
Register a handler for a custom action type.
State Management
The FlowManager provides a state dictionary for storing conversation data:
Usage Examples
Functions that execute operations within a state and optionally transition to a new state.
Functions that create transitions between nodes. Use transition_to to specify the target node.
Function Properties
Async function that processes data within a node
Name of the node to transition to after function execution
Transition Types
Handler Signatures
Return Types
Provider-Specific Formats
You don’t need to handle these format differences manually - use the standard format and the FlowManager will adapt it for your chosen provider.
Built-in Actions
Speaks text immediately using the TTS service.
Ends the conversation and closes the connection.
Custom Actions
Exceptions
Base exception for all flow-related errors.
Raised when flow initialization fails.
Raised when a state transition fails.
Raised when an invalid or unavailable function is called.