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

# Build a voice flow

> Lay out a conversation flow voice agent as flow nodes and transitions, set its global prompt, and reuse steps with subflows.

> [!NOTE]
>
> This capability is in **beta**. Behavior can change before general availability.

A flow node is one step of a voice call, the way a gambit is one step of a chat flow. The two are not interchangeable. At the end of this page, your voice agent runs its calls as flow nodes joined by transitions.

## Before you start

Before you start, sign in to [the dashboard](https://dashboard.hellotars.com) and select the organization you want to work in.

* A voice agent of the type **Conversation flow**. See [Create a voice agent](https://hellotars.com/docs/guides/voice/build/create-a-voice-agent.md). A single prompt voice agent becomes a flow with **Convert to conversation flow** in the more actions menu.
* Your role includes **Build chat agents, voice agents, knowledge bases & tools**.

## Write the global prompt

**1. Open the voice agent and select the Global Settings tab**

The **Global Settings** panel opens.

**2. Write the Global prompt**

Tars adds the global prompt before the instruction of every flow node. Use it to say who the voice agent is on every step.

**3. Choose the Transition flexibility**

**Rigid mode** or **Flex mode** decides how the voice agent moves between flow nodes.

| Mode | How it works |
| - | - |
| **Rigid mode** | One flow node is active at a time. The model sees only that flow node's instruction and tools, and leaves only through its transitions. |
| **Flex mode** | The whole flow becomes one prompt of tasks and tools. The voice agent moves between tasks freely and resumes finished ones without repeating them. It costs more tokens, and equation transitions are unreliable. |

**Global Settings** also holds the voice agent's **Speech settings**, **Transcription**, **Call settings**, **After the call**, **Security & storage** and **Webhooks**. See [Configure the settings](https://hellotars.com/docs/guides/voice/build/create-a-voice-agent.md#configure-the-settings).

## Add flow nodes

Every flow starts at **Begin**. **Begin** holds the **Welcome message** and the **Pre-call tools**, which look up data before the voice agent speaks.

Select or drag a flow node from the **Nodes** palette. To join a new flow node to an existing one, use **Connect to** and select **Create and connect**. These flow nodes are available:

| Flow node | What it does |
| - | - |
| **Conversation** | The voice agent talks with the caller using this flow node's instruction plus the global prompt. Its transitions are judged after each caller turn. |
| **Subagent** | A **Conversation** flow node that also has its own tools, so the model can call them while it talks. |
| **Tool** | Runs one tool on entry: an integration action, a custom HTTP call or a built-in tool. It can say a line while it runs. Its transitions read the result. |
| **Code** | A **Tool** flow node whose tool is JavaScript. |
| **Extract Variable** | Silent while extraction works. The model reads the transcript so far and fills named variables, then the transitions run. A missing **Required** value starts a spoken recovery. See below. |
| **Logic Split** | Silent, with no model. Equation branches are checked top to bottom on entry. The first true one wins, and **Else** always exists. |
| **Press Digit** | On outgoing calls, listens to a phone menu and presses keys by its instruction. It does not speak. |
| **Call Transfer** | Hands the caller to a phone number, a SIP address or a member in the dashboard. See [Transfer calls](https://hellotars.com/docs/guides/voice/build/transfer-calls.md). |
| **Agent Transfer** | Hands the call to another voice agent with the context kept. The call stays one call in history. |
| **Subflow** | Enters a reusable subflow. When the subflow reaches an **Exit**, this flow node's transitions decide what happens next. |
| **Ending** | Ends the call when the caller arrives, with an optional closing line. A flow can have several. |
| **Note** | A note for your team. Tars never compiles it into the voice agent. |

When an **Extract Variable** flow node ends with a **Required** variable still empty, it recovers like this:

* If extraction worked but left the value empty, only an **Else** transition can fire.
* If extraction failed, no values are saved and **Else** is skipped, even when it exists.
* Without a transition, the call returns to the flow node that last spoke, and the voice agent talks with the caller again to get the missing value.
* If no flow node has spoken yet, the call stays on the **Extract Variable** flow node, and the voice agent asks using that flow node's instruction.

Select a flow node to open its inspector. The inspector holds the flow node's **Instruction** or **Static sentence**, its **Transitions**, and these optional sections:

* **Knowledge** attaches knowledge bases to this flow node only.
* **Overrides** changes the model, interruption, silence reminders or transcription mode for this flow node. In **Flex mode**, the voice agent's speech settings apply instead.
* With **Global node**, the caller can reach this flow node from anywhere when its **Entry condition** is met. With **Go back afterwards**, the caller then returns to where they were.
* **Fine-tune examples** gives the model example conversations for its transitions and replies.

[https://dashboard.hellotars.com](https://dashboard.hellotars.com)

![A conversation flow in the flow builder with the Discover Conversation flow node selected and its inspector open, showing the Instruction prompt and the Transitions list](https://hellotars.com/docs/docs/guides/voice/images/voice-flow-builder.png)

## Connect flow nodes with transitions

A transition moves the caller to another flow node. With no transitions, the caller stays in the flow node.

| Transition | When it fires |
| - | - |
| **Prompt** | The model judges that the condition you describe is true. |
| **Equation** | Variable values match the equation. Choose **Match all** or **Match any**. |
| **Else** | No other transition fires. A **Logic Split** always needs one. |
| **Always** | Without a condition. |

**Skip response** moves on without the voice agent replying first. **Confirm values before moving** asks the caller to confirm the values that a transition needs.

### What a flow node knows about later flow nodes

Each flow node knows what the voice agent can do later in the call. A flow node never tells the caller that the voice agent cannot do a task that a later flow node does. It moves the call toward that flow node instead.

Tars sets this when you publish. A flow published before October 30, 2026 gets it only after you publish it again. See [Publish a version](https://hellotars.com/docs/guides/voice/launch/test-and-publish-a-voice-agent.md#publish-a-version).

## Reuse steps with subflows

A subflow is a group of flow nodes that a **Subflow** flow node enters. A subflow returns to its parent flow through an **Exit**.

| Where it lives | Who can use it |
| - | - |
| **Local** | Only this voice agent. It opens as a tab next to **Main flow**. |
| **Shared** | Any voice agent in the organization. It lives in the **Subflows** library on the **Voice Agents** page. |

A shared subflow has its own versions. Select **Publish** in the subflow to publish a new version. Voice agents keep the version they use until you select **Take the update** on their **Subflow** flow node. To move a subflow between local and shared, select **Convert to shared** or **Convert to local**.

A subflow uses the voice agent's voice, model, global prompt and other global settings. Only the transition flexibility can differ inside a subflow.

## Check the flow

Select **Validate** to list the issues that block publishing. When nothing blocks it, the banner reads **No issues · ready to publish**.

**Search nodes** in the toolbar opens **Voice flow commands**. Search flow nodes there, or run commands such as **Fit view** and **Toggle test panel**.

## Verify

Open the test panel and select **Text chat**. Type what a caller says and check that the call moves through the flow nodes you expect. See [Test and publish a voice agent](https://hellotars.com/docs/guides/voice/launch/test-and-publish-a-voice-agent.md).

## Related pages

* [Voice agents](https://hellotars.com/docs/guides/voice/voice-overview.md)
* [Give a voice agent tools](https://hellotars.com/docs/guides/voice/build/voice-agent-tools.md)
* [Transfer calls](https://hellotars.com/docs/guides/voice/build/transfer-calls.md)
* [Test and publish a voice agent](https://hellotars.com/docs/guides/voice/launch/test-and-publish-a-voice-agent.md)


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