nodes, and in code it is a NodeConfig object. Either way it may contain the following properties:
name: The name of the node; used as a reference to transition to the node. In a config, the node’s key undernodesis its name, so there is no separate field.role_message: Astrdefining the bot’s role/personality. Sent as the LLM’s system instruction and persists across transitions until changed. Typically set once in the initial node.task_messages: A list of messagedictsdefining the current node’s objectives.functions: The tools the node offers. See Functions.pre_actions: Actions to execute before LLM inference. Actions run once upon transitioning to a node.post_actions: Actions to execute after LLM inference. Actions run once after the node’s initial LLM inference.context_strategy: Strategy for updating context during transitions. The default behavior is to append messages to the context.respond_immediately: Whether to run LLM inference as soon as the node is set. The default is True.
The only required field is
task_messages, as your bot always needs a prompt
to advance the conversation.Messages
Therole_message sets who the bot is, as a plain string. The task_messages say what it should do at this node, as a list of entries with a role and content, and focus the LLM on the immediate task, such as asking one question:
- Declarative
- Programmatic
Placeholders
Arole_message and a task message’s content may refer to the manager’s state with {{ key }} placeholders. FlowManager fills them in each time it enters the node, so a value a handler stored earlier in the conversation can appear in a later prompt:
Cross-Provider Compatibility
Task messages use Pipecat’s OpenAI-style message format and are translated for whichever LLM provider you use. The role message is sent as that provider’s system instruction.Respond Immediately
For each node in the conversation, you can decide whether the LLM should respond immediately upon entering the node (the default behavior) or whether the LLM should wait for the user to speak first before responding. You do this using therespond_immediately field.
- Declarative
- Programmatic