Overview
FlowManager orchestrates conversation flows by managing state transitions, function registration, and message handling across different LLM providers. It drives both forms of flow: nodes built in Python, and nodes a Flow produced from a flow config.
Placeholder Rendering
On entering a node, the manager fills{{ key }} placeholders in the node’s prompts from state, before anything is sent to the LLM. It renders the node’s role_message, the content of each of its task_messages, and the text of any tts_say action.
Rendering happens on every entry, not once at load, so a prompt sees whatever handlers have stored by then — including after a context reset, and again each time a node is re-entered. {{ order.size }} walks into a stored mapping, values are rendered with str(), and \{{ key }} is left as the literal {{ key }}. A placeholder naming a key that is not in state raises FlowError on entry.
Configuration
All parameters are keyword-only.PipelineWorker
required
Pipeline worker instance used for queueing frames into the pipeline.
PipelineWorker
deprecated
Deprecated: Use
worker instead. This parameter is deprecated and will be
removed in 2.0.0.Pipeline worker instance used for queueing frames into the pipeline.LLMService | LLMSwitcher
required
LLM service instance or an
LLMSwitcher for switching between providers at
runtime. Any LLMService subclass is supported, including OpenAI-compatible
services (Groq, Together, Cerebras, DeepSeek, etc.), Anthropic, Google Gemini,
and AWS Bedrock.Any
required
Context aggregator for managing conversation context. Typically created using
LLMContextAggregatorPair from
pipecat.processors.aggregators.llm_response_universal.ContextStrategyConfig
Default context strategy for managing conversation context during node
transitions. Can be overridden per-node via
NodeConfig.context_strategy.
See
ContextStrategyConfig.BaseTransport
default:"None"
Transport instance for communication (e.g.,
DailyTransport). When provided,
accessible via the transport property in function and action handlers.list[FlowsFunctionSchema | FlowsDirectFunction]
default:"None"
Functions that will be available at every node. These are registered once
during initialization and automatically included alongside node-specific
functions. Useful for capabilities like “transfer to human” that should be
accessible from any conversation state.With a flow config, pass
flow.global_functions,
which holds the config’s global_functions already resolved to your
handlers. It is a fresh list each time, so you can extend it with functions
defined in code.Properties
state
transport
None if not set. Use this to interact with the communication platform (e.g., mute participants, access room info).
current_node
None before initialization or if no node has been set.
worker
task
worker. Maintained for backward compatibility.
Methods
initialize
Raises:
FlowInitializationError if initialization fails.
{{ key }} before calling initialize(), since the initial node is rendered as it is entered.
set_node_from_config
name field in the config, or a UUID is generated if not provided.
Raises:
FlowTransitionError if the manager is not initialized. FlowError if node setup fails.
In most cases, prefer returning the next node from a consolidated function
handler instead of calling this method directly.
get_current_context
FlowError if the context aggregator is not available.
register_action
(action, flow_manager) or a legacy handler (action). Legacy single-argument handlers are deprecated and will be removed in 2.0.0.
pre_actions or post_actions: