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

# Conversational Flows

> Flows are the heart of your voice assistant's conversation logic that defines structure, branching paths, and decision points. Flows are comprised of steps, conditions, and branching paths.

## What is a Flow?

A Flow is a subcomponent of a conversation. If you were speaking to a friend, you might first talk about the weather, then about your day, then about your plans for the weekend. Each of these topics is a flow.

In Voxworks, a Flow a consists of:

* **Steps** — Individual turns of speech the assistant performs, as well as any actions the assistant takes (speak, execute logic, call tools)
* **Conditions** — Rules that determine which path to take to the next step based on user responses
* **Variables** — Any data that is expected to be different for each conversation, such as the participant's first name or account number. Variables can be captured, modified, and used throughout the conversation

***

## Flow Architecture

Voxworks uses a hierarchical flow structure:

```text theme={null}
Script
   Main Flow (entry point)
       Step 1 (Voice)
          Condition A → Step 2
          Condition B → Step 3
       Step 2 (Voice)
          Condition → Step 3
       Step 3 (Flow)
           Sub-Flow
               Step 1
               Step 2 → Return to Main Flow
```

* **Main Flow** — The primary conversation path
* **Sub-Flows** — Modular conversation branches that can be reused across flows
* **Steps** — The individual units of work within a flow

***

## Step Types

Flows contain four types of steps:

| Type         | Purpose                                               | Interactive         |
| ------------ | ----------------------------------------------------- | ------------------- |
| **Voice**    | Speak to the user and wait for a response             | Yes                 |
| **Function** | Execute custom logic (validation, calculations)       | Yes                 |
| **Tool**     | Call external services and APIs (SMS, calendar, etc.) | Yes                 |
| **Flow**     | Jump to a sub-flow                                    | Depends on sub-flow |

***

## How Flows Execute

1. **Start** — The agent begins at the main flow, step 0
2. **Execute Step** — The current step is executed based on its type
3. **Evaluate Conditions** — For voice steps, user response determines the next path
4. **Navigate** — The LLM decides which step to move to the next step based on conditions
5. **Repeat** — Continue until a the main flow "end flow" condition is reached then the call will end

***

## Conditions and Branching

Voice steps include conditions that determine where to go next:

```text theme={null}
Step: "Are you interested in scheduling a demo?"
   Condition: "User expresses interest" → Go to booking flow
   Condition: "User has questions" → Go to FAQ step
   Condition: "Otherwise" → Stay on same step
```

Conditions are evaluated by the AI based on the user's actual response, not keyword matching. This allows natural, flexible conversations.

***

## Key Concepts

| Concept           | Description                          |
| ----------------- | ------------------------------------ |
| **Main Flow**     | The primary conversation entry point |
| **Sub-Flow**      | A reusable conversation module       |
| **Voice Step**    | Interactive turn with the user       |
| **Function Step** | Backend logic execution              |
| **Tool Step**     | External service integration         |
| **Flow Step**     | Navigation to a sub-flow             |
| **Variables**     | Data storage and retrieval           |

***

## Next Steps

* [Main Flows](/flows/flows-main) — Learn about the primary conversation flow
* [Sub-Flows](/flows/flows-sub) — Create reusable conversation modules
* [Steps Overview](/flows/steps) — Understand the different step types
* [Variables](/flows/variables) — Work with data in your flows
