Understanding Graph-Based Flows

Understanding Graph-Based Flows

Understanding Graph-Based Flows

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:

Subscription Requests Handling

Seamless integration with third-party systems such as ACME, Contoso, and
other APIs.

Appointment Coordination

Seamless integration with third-party systems such as ACME, Contoso, and
other APIs.

Order Status Handling

Seamless integration with third-party systems such as ACME, Contoso, and
other APIs.

General Customer Support Requests

Seamless integration with third-party systems such as ACME, Contoso, and
other APIs.

Once the path is selected, branches within the flow allow the agent to take different routes based on conditions, such as refund eligibility or escalation requirements.

Seamless integration with third-party systems such as ACME, Contoso, and
other APIs.

Core Components of a Graph-Based Flow

A flow in Beam AI consists of three key structural elements:

  1. Primary Paths – The agent follows a predefined path based on query type.

  1. Branches – Conditional points that adjust the agent’s route within a selected path.

  1. 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

  1. Trigger: A customer submits a request.

  1. 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

  1. Trigger: The agent enters the Product Return Requests Handling flow.

  1. 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

  1. Trigger: A customer requests an order update.

  1. Selected Flow: Order Status Handling.

  1. 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

  1. Trigger: A customer submits a delayed order complaint.

  2. Selected Flow: Order Status Handling.

  3. Decision Process:

    • ✅ If the issue is resolved, send confirmation

    • ❌ If escalation is required, assign to a human agent (Exit Condition: Manual Review Needed).

Start Today

Start building AI agents to automate processes

Join our platform and start building AI agents for various types of automations.

Start Today

Start building AI agents to automate processes

Join our platform and start building AI agents for various types of automations.

Start Today

Start building AI agents to automate processes

Join our platform and start building AI agents for various types of automations.