> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beam.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Flows

> Build an agent's Flow on the canvas, configure each step from the sidebar, then test and publish it.

A Flow is the set of steps an agent works through when a task starts, from chat or from a trigger. You build it on the agent's **Flow** page, where the steps sit on a canvas and the sidebar on the right holds the settings of the step you select. Every change saves to a draft, and the draft becomes the version the agent runs only when you publish it.

<Frame caption="Agent <span>→</span> Flow">
  <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-page-overview.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=609ef099512bcd29c4646a1c00ab1b8c" alt="An agent's Flow page with the version button reading Active and the Test mode switch in the header, Execute flow above the Trigger, a five-step Flow on the canvas, and the canvas toolbar at the bottom" width="1880" height="1245" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-page-overview.png" />
</Frame>

<h2 id="what-a-flow-is">
  What a Flow is
</h2>

<h3 id="the-flow-page">
  The Flow page
</h3>

| Control | What it does |
| - | - |
| **Draft** | Opens **Version history**. It reads **Draft**, or **Active** on a published agent. |
| **Test mode** | Runs the Flow against test connections instead of live systems. |
| **Execute flow** | Sits above the **Trigger** and starts a task on the draft, so you can watch it run. |
| **Publish** | Sits in the banner above the canvas and makes the draft the version the agent runs. |
| **Find a step…** | Searches the canvas from the toolbar at the bottom. |

You can also open the Beam AI panel on this page and ask it to explain the Flow or change a step for you. [Beam AI Copilot](/01-getting-started/beam-ai-copilot/beam-ai-copilot) covers the panel.

<h3 id="steps-and-paths">
  Steps and paths
</h3>

Every Flow starts at the **Trigger** and runs downward along the arrows, one step to the next. A dashed line ending in a **+** marks where the next step goes. Steps come in four categories: **AI** steps follow written instructions, **Integration** steps act in a connected app, **Utilities** are standalone actions, and **Controls** shape the path a task takes: **Loop**, **Condition**, **Wait** and **Exit**.

<h3 id="what-a-step-card-shows">
  What a step card shows
</h3>

| Part | What it tells you |
| - | - |
| Note | The line under the name, saying what the step is for. |
| Amber border | The step is saved but not finished. Hover it to see the missing fields. |
| Warning triangle | An integration the step needs is not connected. |
| Person icon | **Consent required** is on, so the task waits at this step for approval. |

<Frame caption="Agent <span>→</span> Flow">
  <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-step-cards.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=1f3f79e31e746028b29301537eac6bb7" alt="Two step cards on the canvas, Find Emails with the Gmail icon and List Channels with the Slack icon, each with its name, note line and three-dot menu" width="940" height="730" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-step-cards.png" />
</Frame>

<h3 id="drafts-and-versions">
  Drafts and versions
</h3>

A step saves the moment you add it, finished or not, so you can lay out a Flow first and fill in detail later. **Publish** stays greyed out until every step and branch is finished. Each publish adds a version, and you can open an earlier one read-only and restore it as the new draft.

<h2 id="how-to-use-flows">
  How to use Flows
</h2>

<Info>
  Changing a Flow needs the **Create & edit** capability, and running it needs **Run**. Without **Create & edit** the Flow opens read-only. Capabilities come from your role, covered in [Roles and Permissions](/05-resources/roles-and-permissions/roles-and-permissions).
</Info>

<h3 id="add-a-step">
  Add a step
</h3>

Every step comes from the same **Add step** window.

<Steps>
  <Step title="Open Add step">
    Select the **+** at the end of a path, or hover the line between two steps and select the **+** on it.
  </Step>

  <Step title="Pick the step">
    Choose a category in the left rail, then a step. On **AI**, describe what the step should do and select **Create with AI**, or select **Add blank step** to fill it in yourself.
  </Step>
</Steps>

<Frame caption="Agent <span>→</span> Flow <span>→</span> Add step">
  <img src="https://mintcdn.com/beamai/5sjMFBB-gamSkrEM/02-building-agents/agent-fundamentals/flow-configuration/flow-add-step-modal-current.jpg?fit=max&auto=format&n=5sjMFBB-gamSkrEM&q=85&s=b31f03b050c68b46ca6d4c3ba8c6b17d" alt="Add step window on the AI tab, with the AI, Integration, Controls, and Utilities categories, the What should this step do field, prompt chips, and Add blank step" width="1280" height="720" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-add-step-modal-current.jpg" />
</Frame>

A new step that still needs settings shows an amber border, and hovering it lists the missing fields. Both can take a moment to appear.

<h3 id="branch-the-flow-with-a-condition">
  Branch the Flow with a Condition
</h3>

A **Condition** splits the Flow, and each task takes the branch whose rule it meets.

<Steps>
  <Step title="Add the Condition">
    Open **Add step** where the Flow should split, select **Controls**, then **Condition**.
  </Step>

  <Step title="Choose how it decides">
    In the sidebar, set **Condition Type** to **LLM-based** to let an AI model judge, or **Rule-based** for exact matches on earlier values.
  </Step>

  <Step title="Define each branch">
    Select each **Add condition** label and set when a task takes that branch. To add a branch, select the **+** to the right of the last one.
  </Step>
</Steps>

<h3 id="configure-a-step">
  Configure a step
</h3>

Each step's settings live in its sidebar.

<Steps>
  <Step title="Open the step">
    Select the step on the canvas. To rename it, select the name at the top of the sidebar and type over it.
  </Step>

  <Step title="Fill in the tabs">
    **Parameters** holds the connection, the **Input variables**, the **Output variables** and, on an AI step, the **Prompt**. **Settings** holds **Consent required** and **On error**, and **Evaluation** holds the scoring metrics.
  </Step>

  <Step title="Test the step">
    Select **Configure & test** at the bottom of the sidebar to run the step on sample input and check its output.
  </Step>
</Steps>

<Frame caption="Agent <span>→</span> Flow <span>→</span> Step <span>→</span> Parameters">
  <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-step-sidebar.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=2b52d997adf6d1b29ad5a6119fd1baba" alt="The sidebar of an AI step with the Parameters, Settings, and Evaluation tabs, the Model section open, and Configure and test at the bottom" width="1880" height="1095" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-step-sidebar.png" />
</Frame>

Inputs are covered in [Variable Fill](/02-building-agents/agent-configuration/variables-state/variables-state), and scoring in [Evaluation Framework](/04-observability-analytics/evaluation-framework/evaluation-framework).

<h3 id="choose-a-steps-model">
  Choose a step's model
</h3>

An AI step always has a **Model** section. Other steps show one only when at least one input is filled by AI.

<Steps>
  <Step title="Open the model picker">
    On the **Parameters** tab, open **Model** and select the **LLM**\* field. Models are grouped by provider.
  </Step>

  <Step title="Pick a model and its effort">
    Hover a provider and pick a model from its submenu, then set **Effort** in the same submenu. Higher effort gives the model more room to reason.

    <Frame caption="Agent <span>→</span> Flow <span>→</span> step <span>→</span> Parameters <span>→</span> Model <span>→</span> LLM">
      <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-model-picker.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=0fa2900943b0232fdad8c8774e9e208f" alt="The LLM picker open on an AI step, with one submenu of models expanded and the Effort options below the models" width="1396" height="672" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-model-picker.png" />
    </Frame>
  </Step>

  <Step title="Add fallbacks">
    Under **Fallback models**, pick the models to try if the first one fails.
  </Step>
</Steps>

<Note>
  **Fallback models** is a Pro feature, locked on a free workspace.
</Note>

<h3 id="change-a-steps-icon">
  Change a step's icon
</h3>

A step that uses an integration shows that app's icon until you upload your own.

<Steps>
  <Step title="Upload your own">
    Select the step, then its icon at the top of the sidebar. Select **Upload**, choose an image of up to 10 MB, and select **Upload** again.
  </Step>

  <Step title="Go back to the default">
    Open the same menu and select **Remove**.
  </Step>
</Steps>

<h3 id="write-a-note-on-a-step">
  Write a note on a step
</h3>

A note under a step's name tells you what it is for without opening it.

<Steps>
  <Step title="Select the note line">
    Select **Add a note to identify this step...** under the step's name, or the note already there.
  </Step>

  <Step title="Type and save">
    Press Shift and Enter together for a new line, and Enter to save.
  </Step>
</Steps>

<h3 id="reconnect-a-step">
  Reconnect a step
</h3>

Move an arrow to a different step without redrawing it. A branch keeps its condition when you move it.

<Steps>
  <Step title="Grab the arrowhead">
    Hover the arrow and drag it by its arrowhead, the end that points into a step.
  </Step>

  <Step title="Drop it on the new step">
    Release it over the new step. If that connection is not allowed, the step shakes and the arrow stays put.
  </Step>
</Steps>

<h3 id="replace-or-delete-a-step">
  Replace or delete a step
</h3>

Each step's menu swaps or removes it.

<Steps>
  <Step title="Open the step menu">
    Open the three-dot menu on the step card, or at the top of its sidebar.
  </Step>

  <Step title="Replace or delete">
    Select **Replace** to choose a different step in its place, or **Delete** to remove it.
  </Step>
</Steps>

<Warning>
  Replacing a **Condition** removes its branches. The steps that were on them stay on the canvas, but nothing points to them until you reconnect them.
</Warning>

<h3 id="find-a-step">
  Find a step
</h3>

Search finds a step in the Flow you have open, including a read-only one.

<Steps>
  <Step title="Search">
    Select the magnifier in the canvas toolbar and type part of a step's name, action or note into **Find a step…**.
  </Step>

  <Step title="Move through the results">
    Use the arrow keys. The canvas moves to each step and highlights it.
  </Step>

  <Step title="Go to a step">
    Press Enter to stay on that step, or Escape to go back to where you were.
  </Step>
</Steps>

<Frame caption="Agent <span>→</span> Flow <span>→</span> Find a step…">
  <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-find-a-step.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=c2675d47e27fc91f74ec421ab6d42def" alt="The Find a step field open in the canvas toolbar with a list of matching steps above it, and the matching step highlighted on the canvas" width="1880" height="1095" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-find-a-step.png" />
</Frame>

<h3 id="configure-the-trigger">
  Configure the trigger
</h3>

The **Trigger** holds what starts a task outside chat, such as a timer, a webhook or an app.

<Steps>
  <Step title="Add a trigger">
    Select the **Trigger** step, then **Add trigger** in its sidebar. Pick a trigger under **Built-in**, or an app under **Integrations** and then its action.

    <Frame caption="Agent <span>→</span> Flow <span>→</span> Trigger <span>→</span> Add trigger">
      <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-add-trigger.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=b99d7f5f3183fcec7f46e57afb0fec4c" alt="The Add trigger window with the Built-in triggers and the Integrations list" width="1880" height="1173" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-add-trigger.png" />
    </Frame>
  </Step>

  <Step title="Fill it in and turn it on">
    Complete its settings, check them with **Configure & test**, and use the switch beside the trigger to turn it on.
  </Step>
</Steps>

Each trigger type is covered in [Triggers](/03-running-operations/task-management/triggers-webhooks/triggers-webhooks).

<h3 id="test-and-publish">
  Test and publish
</h3>

Try the draft on test connections, then publish it.

<Steps>
  <Step title="Clear the warnings">
    Finish every step and branch with an amber border, including the **Trigger**. Hover each one to see what it is waiting on.
  </Step>

  <Step title="Turn on Test mode">
    Turn on **Test mode** in the header, set the test **Trigger** and **Connections**, and select **Start testing**.

    <Frame caption="Agent <span>→</span> Flow <span>→</span> Test mode">
      <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-test-mode-setup.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=0787ba39c73032fa730bb25b99796dcb" alt="The Set up test mode window with Max test runs, Trigger, Connections, and the Start testing button" width="1880" height="1173" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-test-mode-setup.png" />
    </Frame>
  </Step>

  <Step title="Check the runs">
    Select **View test runs** in the header to see what the runs produced.
  </Step>

  <Step title="Publish">
    Select **Publish** in the **This flow has not yet been published** banner. If test mode is on, confirming also ends the test session.
  </Step>
</Steps>

<Frame caption="Agent <span>→</span> Flow">
  <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-publish-blocked.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=7f23ea67e14d7662fba5bc85aa9bf656" alt="The This flow has not yet been published banner with Publish greyed out, and below it a blank AI Step with its tooltip listing the missing input variable, prompt and output variable" width="1300" height="840" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-publish-blocked.png" />
</Frame>

Test mode is covered in full in [Test Mode](/03-running-operations/debugging-testing/test-datasets/test-datasets).

<h3 id="restore-an-earlier-version">
  Restore an earlier version
</h3>

Bring back an earlier version as your draft.

<Steps>
  <Step title="Open Version history">
    Select the version button in the header. It reads **Draft**, or **Active** on a published agent, and **Current draft** appears above **Previous versions** only when you have unpublished changes.

    <Frame caption="Agent <span>→</span> Flow <span>→</span> Version history">
      <img src="https://mintcdn.com/beamai/VC2qLuPcS0Ao-BsM/02-building-agents/agent-fundamentals/flow-configuration/flow-version-history.png?fit=max&auto=format&n=VC2qLuPcS0Ao-BsM&q=85&s=53d8473c2430f8d7e0a4a0ad92013e67" alt="The Version history menu open under the version button, listing the current version and the previous versions" width="1342" height="650" data-path="02-building-agents/agent-fundamentals/flow-configuration/flow-version-history.png" />
    </Frame>
  </Step>

  <Step title="Open the version">
    Select a version under **Previous versions**. The canvas shows it read-only.
  </Step>

  <Step title="Restore it">
    Select **Restore as draft**. If you have unpublished changes, select **Restore** to confirm they will be replaced.
  </Step>
</Steps>

<h2 id="troubleshooting">
  Troubleshooting
</h2>

<AccordionGroup>
  <Accordion title="Publish is greyed out">
    Hover **Publish** to read why. Usually a step, the **Trigger** or a Condition branch is unfinished. If the message names the create & edit permission, ask an admin to publish.
  </Accordion>

  <Accordion title="A control is greyed out in Add step">
    Hover the control to read its placement rule: a **Loop** cannot go inside another loop, a **Wait** cannot go inside a loop, an **Exit** only ends a Condition branch, and two Conditions cannot sit next to each other.
  </Accordion>

  <Accordion title="The Test mode switch is greyed out">
    Test mode needs a trigger. If the tooltip asks for one, add it as in [Configure the trigger](#configure-the-trigger). A tooltip about credits means the workspace has run out of them.
  </Accordion>

  <Accordion title="A step shows a warning triangle">
    The integration the step needs has no connected account. On an Integration step, select the triangle to connect one. On an AI step, connect it from the step's sidebar.
  </Accordion>
</AccordionGroup>

<h2 id="next-steps">
  Next steps
</h2>

<CardGroup cols={2}>
  <Card title="Variable Fill" icon="sliders" href="/02-building-agents/agent-configuration/variables-state/variables-state">
    Choose how each input variable gets its value.
  </Card>

  <Card title="Structured Outputs" icon="code" href="/02-building-agents/agent-configuration/structured-outputs/structured-outputs">
    Define the outputs a step passes on to later steps.
  </Card>

  <Card title="Loop Nodes" icon="repeat" href="/02-building-agents/advanced-patterns/loop-node/loop-node">
    Build the body of a loop and read its output.
  </Card>

  <Card title="Test Mode" icon="vial" href="/03-running-operations/debugging-testing/test-datasets/test-datasets">
    Try a Flow against test connections before you publish.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.