Edges
Edges
Edges connect nodes within a flow. Every flow must begin with a Start Node and end with one or more End Node.
Node types
Node types
The system supports the following node type right now and more will be added over time:
- Flow Node: A node that represents a flow or a subflow.
- Start Node: The entry point of a flow. Each flow must have exactly one Start Node.
- End Node: The exit point of a flow. A flow must have at least one End Node.
- Tool Node: Call an imported tool and returns its result.
- Agent Node: Call an imported agent to perform a certain task.
- Decisions Node: (Public Preview) Specify a decision table to determine actions based on provided conditions.
- Prompt Node: (Public Preview) Make a LLM call to extract/classify/generate information based on provided input.
- Doc Processing Node: (Public Preview) Extract text from a provided document.
- Branch Node: A conditional branch. Currently, only binary branches are supported.
- Foreach Node: A subflow that iterates over a list of items until it is done.
- Loop Node: A subflow that iterates over a condition as long as it is true.
Node specification
Node specification
Each node includes a specification that defines its behavior and properties:
- kind: The type of node. For example:
tool
,user
,agent
. - name: The internal name of the node.
- display_name (optional): A user-friendly name for display purposes.
- description (optional): A brief description of the node’s purpose.
- input_schema (optional): The input schema of the node. By default there are no input schemas.
- output_schema (optional): The output schema of the node. By default there are no output schemas.
Data mapping
Data mapping
Currently, flows supports automatic runtime data mapping only.
Scheduling
Scheduling
(Public Preview) It is also possible to schedule a Flow or an Agent to run at a later today. See the section on
Scheduler
for details.Examples
Examples
There are a number of examples in the
examples/flow_builder
directory to showcase how to utilize the different Flow features- agent_scheduler - scheduing of agents
- collaborator_agents - sequencing of agents
- extract_support_request - use LLM to extract information from requests
- foreach_email - use Foreach control to iterate over a set of items
- get_facts_numbers - use Loop control to repeat work until certain condition is satisfied
- get_insurance_rate - use Decisions node to determine insurance rate based on credit rating and loan amount
- get_pet_facts - use Branch support to route requests
- get_tuition_reimbursed - use multiple Branches to support complex logic routing
- hello_message_flow - sequencing 2 python tools together
- ibm_knowledge_to_emails - sequence an agent and a tool together
- schedule_helpdesk_alert - a schedulable flow that can be used to check helpdesk schedule_helpdesk_alert
- text_extract - use the DocProc node to extract text from document
When to use Flow
When to use Flow
- whenever you need a repeatable, predictable sequencing of Agents, Tools and People.
- when it is going to take more a couple minutes. Because Flow is long running, it can be used to sequence long chain of tasks that can take hours or days.
- when user interaction is desired (human-in-the-loop)
- when scheduling is required
Note:
- As flow can be long running, when you call a flow tool, the system will provide an instance ID and will wait for the response.
- In the meantime, you can use the
Get Flow Status
tool (in a new chat session) to query the status of a flow using its instance ID.