# Flow builder

> Know every mode, step and rule of the canvas you build voice agents on.

Source: https://docs.vlayers.ai/build/flow-builder

Kind: Reference

Flows run on the same runtime as code agents, so anything a code agent can do, a flow can do too. To build your first one step by step, follow [Build your first voice agent](https://docs.vlayers.ai/build/first-voice-agent); this page is the reference for what the canvas offers.

## Two ways a flow talks

| Mode | How it works | Use it for |
|---|---|---|
| **Agent mode** (a Playbook step) | A real agent with its own prompt, model, temperature and a list of tools it may use. You define named exits; each exit is a port. The model leads the conversation but can only leave through the exits you drew. | Conversations that can go several ways, where the outcome matters more than the wording. |
| **Graph mode** | Steps run in the order you wired them: scripted lines, questions, branches, API calls. Captured values are kept for the whole call, so the agent never asks again for something it knows. | Intake, disclosures, anything that must happen in a set order. |

You can mix them. A scripted intake can hand a hard conversation to a Playbook step and take back over when it exits.

## The step palette

| Group | Steps | What they do |
|---|---|---|
| Scripted | Say, Ask, Confirm, Keypad menu | You write the words. |
| Agentic | AI reply, Playbook, Branch by intent, Route by skill, Knowledge, Remember | The model decides, within your prompt and exits. |
| Tools | Call an API, Code | Reach outside the call. |
| Logic | Condition, Set variable, Workflow, Transfer to human, End call, Required info, Shortcut rule, Note | Control the order and guarantee what happens. |

## Ports and branches

Branching steps (Condition, Branch by intent, Keypad menu, Playbook) have one labelled port per outcome plus an **Otherwise** port, so there are no dead ends. Select a step to set its prompt, script, variables or tool in the inspector. Flow-wide variables, required information and shortcut rules live in the **Capabilities & Rules** panel. To reuse what the caller said, see [Variables](https://docs.vlayers.ai/build/variables).

## Publish and deploy

These are two separate gates:

- **Publish** saves an immutable version and checks it: steps nothing reaches, signals nobody uses, required information that is never collected. Errors block publishing; warnings do not.
- **Deploy** turns the published version into a live agent in the Agents list.

**Go live** does both in one step. You can keep editing the draft while the deployed version keeps answering calls. A **Dry run** on the canvas uses the last saved draft; see [Testing](https://docs.vlayers.ai/build/testing).

## Common problems

| Problem | Fix |
|---|---|
| Publish is blocked | Read the validation errors: usually a step nothing leads to, or required information no step collects. |
| The live agent does not have your changes | Saving keeps a draft. Publish and deploy (or choose **Go live**) again. |
| The agent speaks an empty gap | A variable was never captured. See [Variables](https://docs.vlayers.ai/build/variables). |

## Next steps

- [Playbooks](https://docs.vlayers.ai/build/playbooks): Give the agent a goal instead of a script.
- [Tools](https://docs.vlayers.ai/build/tools): Call your APIs from a flow.
- [Phone numbers](https://docs.vlayers.ai/build/numbers): Put the agent on a number.
