Introduction to Graph-Based Flows
Flows in Beam AI allow users to define structured paths that an agent follows based on the task query, available context, and external triggers. These flows operate within a graph-based framework, enabling multiple execution paths, branching decisions, and flexible automation steps.
Each agent follows a predefined path based on the query type. The user defines which flow structure is in place, and the agent determines how to execute the steps within that structure.
For example, in a Customer Support Agent, the query type could determine the high-level path:
Core Components of a Graph-Based Flow
A flow in Beam AI consists of three key structural elements:
Primary Paths – The agent follows a predefined path based on query type.
Branches – Conditional points that adjust the agent’s route within a selected path.
Exit Conditions – Defined points where the agent concludes its execution.
Primary Paths – Selecting the Flow Based on Query Type
At the start of execution, the agent determines which primary path to take based on the task query.
📌 Example Use Case: Customer Support Agent Handling Different Requests
Trigger: A customer submits a request.
Path Selection: The agent categorizes the request type and follows the relevant flow:
If the query is about a product return → Follow the Product Return Requests Handling path.
If the query is about an order status → Follow the Order Status Handling path.
If the query is about an appointment booking → Follow the Appointment Coordination path.
🔹 Once a primary path is selected, the agent executes defined steps within that flow.
Nodes – Defining Actions Within a Selected Path
Once inside a selected flow, the agent executes nodes, which represent actions or decisions.
Nodes allow the agent to:
Retrieve and process information (e.g., checking refund eligibility).
Execute tools (e.g., drafting an email response, updating a database).
Route tasks dynamically based on predefined logic.
📌 Example Use Case: Customer Support Agent Processing a Refund Request
Trigger: The agent enters the Product Return Requests Handling flow.
Actions Taken:
Retrieve product details from the database.
Evaluate refund eligibility based on return policy.

Branches – Adjusting the Agent’s Path Within a Flow
Branches allow the agent to follow different routes after entering a selected flow.
📌 Example Use Case: Customer Support Agent Handling an Order Status Inquiry
Trigger: A customer requests an order update.
Selected Flow: Order Status Handling.
Decision Point:
✅ If order is shipped, retrieve tracking details and inform the customer.
❌ If order is delayed, notify support.
Exit Conditions – Defining When the Flow Ends
Exit conditions determine when a flow stops execution by reaching an intervention point.
📌 Example Use Case: Customer Support Agent Resolving Complaints
Trigger: A customer submits a delayed order complaint.
Selected Flow: Order Status Handling.
Decision Process:
✅ If the issue is resolved, send confirmation
❌ If escalation is required, assign to a human agent (Exit Condition: Manual Review Needed).