Skip to main content

SubFlows

SubFlows in BotDojo are like mini-Flows within a Flow. They allowing you to encapsulate and organize more complex logic into reusable components. Just like regular Flows, SubFlows take an Input, perform a series of actions, and then produce an Output. This modular approach enables you to break down your Flow into smaller, more manageable pieces, making your overall Flow more readable and maintainable.

Creating a SubFlow

To create a SubFlow, you need to add a Start SubFlow and End SubFlow to your Flow. The Start SubFlow and End SubFlow work similar to Start and End Nodes see Start and End Nodes

Calling a SubFlow

Call a SubFlow directly with the Call SubFlow Node. See the example below.

SubFlows as Agent Tools

SubFlows can also be used as Agent Tools, which are reusable components that can be accessed and utilized by AI Agents within your Flow. Use the SubFlow Tool Node and hook it up to your Agent like any other tool.

See AI Agents for more information

Loop Node

The Loop Node nodes allow you to loop through arrays and use SubFlows on each item in the array.