Building Conversation Flows

Building Conversation Flows

A flow is the conversation blueprint for your AI Agent. It defines the stages of a phone call, what the agent does at each stage, which tools it can use, and when the conversation moves forward. Think of it like a flowchart: each box is a stage the agent can be in, and the arrows between them are the triggers that move the conversation to the next stage.

Key Concepts

States (the boxes)

Each state is a stage of the conversation, such as "Greeting / Assisting," "Transferring," or "Closing." The agent behaves differently in each state based on the instructions and tools you give it. The first state handles both greeting and active assistance, so the agent can start helping right away without waiting for a transition.


Instructions (what the agent does)

Every state has instructions that tell the agent how to behave while it is in that stage. For example, in a "Greeting" state you might instruct: "Welcome the caller, ask how you can help, and listen for buying signals."


Functions (the tools the agent can use)

Functions are actions the agent can take, such as looking up company info, transferring a call, or collecting a caller's contact details. Each state has its own set of available functions, so you control exactly what the agent can do at each stage.


Transitions (the arrows)

Transitions connect one state to the next. When a function is triggered, the agent can automatically move to a different state. For example, when a caller asks to speak with sales, the agent might transition from "Greeting" to "Collecting Info."


How the Agent Moves Between States

Two things control when the agent transitions to a new state:

1. The Function Description

Each function has a description that tells the agent when to use it. The agent reads every caller response and compares it to the descriptions of its available functions. When there is a match, it fires that function.

For example, a function described as "Collect the caller's contact information when they express interest in our product or want to speak with sales" will fire when the caller says something like "Yeah, I'd love to learn more about pricing."

2. The State Instructions

The instructions in each state reinforce when to use functions. You can add guidance like "If the caller asks about pricing or a demo, collect their contact details." This gives the agent extra context beyond just the function description.

Info
The function description is the trigger that tells the agent when to act. The state instructions shape how the agent behaves. The transition defines where the conversation goes next. 

Available Tools & Functions

When you add tools to a state, you will see them organized into groups in the tool picker. Some tools are always available, others appear only when you have enabled the matching integration.

Built-in Tools (always available)


Every agent comes with these core tools out of the box:

  • Search Phone Directory - Searches your company's phone directory when a caller asks for a specific person or department.
  • Transfer Call - Transfers the caller to the right extension after finding a match.
  • Complete Transfer - Finalizes a transfer once the handoff is confirmed.
  • Cancel Transfer - Cancels a transfer if the caller changes their mind before being connected.
  • Get Company Info - Looks up your company details (hours, address, services, FAQs) from your training data.
  • End Call - Wraps up the conversation with a goodbye message.

Info Collection (always available)

Lets you build custom data-gathering forms into any state. Add the "Collect Info" tool to a state, then configure which fields to collect (name, email, phone, etc.) and what happens with the data (send an email, fire a webhook, send an SMS, or post to Slack or Teams).

The agent walks the caller through each field one by one, then submits everything at once. You can configure different fields and actions on different states to collect different information at each stage.

Lead Qualification (always available)

Similar to Info Collection, but designed for qualifying leads with a structured questionnaire. The questions are configured in your agent's training data rather than on individual states, so every call follows the same qualification script.

You can set it to start automatically, trigger on specific keywords, or only run when the caller specifically requests it.

Action Nodes (always available)

A standalone action executor. It does not collect data itself; it runs actions (email, webhook, SMS, Slack, Teams) using data that was collected by a previous state. This lets you separate data collection from action execution, so you can route to different actions depending on the flow path.

A common pattern: State A collects information from the caller, then transitions to State B which executes actions with that data. This gives you flexibility. For example, you could route qualified leads to one action (email the sales team) and unqualified leads to another (just log to a webhook).

Integration Tools

These tools appear in the tool picker after you enable the matching integration on your agent's domain. Each integration adds a set of specialized functions.

Calendar Scheduling (Generic Calendar integration)

Lets the agent help callers book appointments. The agent searches your available calendars, helps the caller pick one, and texts them a booking link via SMS.

How to enable: Turn on the "Generic Calendar" or "Generic Booking" integration in your domain's integration settings.

How it works on a call: Caller asks to book an appointment, the agent searches calendars, if multiple calendars exist the caller picks one, and the agent texts the booking link to the caller's phone.

Info
The agent always sends booking links via text message and never reads URLs aloud. 

Calendly / Cal.com Scheduling

Full live-booking experience: the agent checks available time slots, walks the caller through selecting a slot, and books the appointment right on the call.

How to enable: Turn on the "Calendly" or "Cal.com" integration in your domain's integration settings.

How it works on a call: Caller asks to schedule, the agent shows available appointment types, checks open time slots based on the caller's preferences, collects the caller's email, name, and timezone, and books the appointment. If live booking fails, the agent falls back to texting a scheduling link.

Info
The agent confirms the caller's email by spelling it back to avoid mistakes, and always asks for timezone. 

Heartland POS Ordering

Turns your agent into a phone-based ordering system. Callers can browse the menu, customize items, build a cart, and place an order, all through conversation.

How to enable: Enable the "Heartland" integration in your domain's integration settings, or set the agent's type to "Heartland."

What the agent can do: Search the menu, browse categories, show daily specials, add and remove items, handle customizations and modifiers, collect customer info, set pickup time, suggest add-ons, validate pricing, and submit the order to your Heartland POS system.

Knowledge Base

Gives the agent access to your uploaded documents so it can answer detailed questions that go beyond basic company info and FAQs.

How to enable: Create a Knowledge Base for your agent and upload documents (PDFs, web pages, etc.). Once the Knowledge Base is active, the search tool becomes available.

How it works on a call: When the caller asks a question the agent cannot answer from its training data, it searches your uploaded documents and shares a conversational answer.

Info
The agent always searches the Knowledge Base before saying it does not have information. The more documents you upload, the more your agent can answer. 

MCP Tools (advanced)

MCP (Model Context Protocol) tools let you connect your agent to custom external services. These appear in a purple "MCP" group in the tool picker after you configure an MCP server in your agent's settings.

Quick Reference: How to Enable Each Tool Type

  • Built-in Tools - Always on, no setup needed.
  • Info Collection / Lead Qualification / Actions - Always available. Configure fields on the state or questions in training data.
  • Calendar / Calendly / Cal.com - Enable the matching integration in domain settings.
  • Heartland POS - Enable integration or set agent type to Heartland.
  • Knowledge Base - Create and activate a Knowledge Base with uploaded documents.
  • MCP Tools - Configure an MCP server in agent settings.

How the AI Uses Tools During a Call

Think of functions like items in a toolbox. You hand the agent the whole toolbox and it picks the right tool based on what the caller says. You do not control the order; the AI does.

Each function has a description that tells the AI when to use it. The AI reads every caller response, compares it to the descriptions of the tools available in the current state, and picks the best match.

Integration tools are designed to work together

All functions from the same integration go in the same state. They are a workflow chain, and their descriptions tell the AI the natural sequence.

For example, with Calendly scheduling:

  1. "Get event types" fires first. Its description says "use when the caller wants to schedule."
  2. "Check availability" fires next. It says "search for available time slots based on caller preferences."
  3. "Create booking" fires last. It says "book an appointment; requires name, email, and timezone", info the AI has not collected yet, so it knows to wait.

You do not need to create separate states for each step. Put all the integration's tools in one state and the AI handles the sequence.

Info
Drop all functions from an integration into the same state. The AI uses the function descriptions to figure out which one to call and in what order, just like a worker picks the right tool from the toolbox for each part of the job. 

One State or Many?

You can put everything in a single state and the agent handles it fine. The main reason to use multiple states is when you want the agent's focus or personality to change during the call.

Example: Multi-state flow

State 1: Greeting / Assisting - Has directory search, transfer, company info, and knowledge base tools. The agent is in general receptionist mode and can start helping immediately.

State 2: Scheduling - Has all calendar and Calendly tools. The agent transitions here when the caller says "I need an appointment." Now it is focused only on booking.

State 3: Lead Collection - Has info collection tools. The agent transitions here when the caller shows interest. Now it is focused only on gathering details.

When one state is enough

If your agent has a straightforward job such as answering questions, searching the knowledge base, and maybe transferring calls, the initial "Greeting / Assisting" state with all the tools works great. The AI picks what it needs based on the conversation. No extra states needed.

When to add more states

Add a new state when you want the agent to shift focus. For example, when a caller expresses interest, transition to a "Collect Info" state so the agent concentrates on gathering their details. The key is that each state limits which tools are available, keeping the agent on task.

What About Auto-Inject?

If an integration is enabled but you did not add its tools to your flow, the agent automatically gets access to them on every state. So even if you forget, the agent still works. Adding tools explicitly just gives you control over which states have which capabilities.

Example: Lead Collection Flow

Here is what a lead collection flow looks like. The agent starts in a single state that handles both greeting and general assistance, then transitions to focused states as needed.

State 1 - Greeting / Assisting

Instruction: "Welcome the caller, answer questions, help with requests."

Functions available:

  • Get company info
  • Search phone directory
  • Collect lead info (transitions to State 2)

State 2 - Collect Info

Instruction: "Gather the caller's details."

Functions available:

  • Collect info (transitions to State 3)

State 3 - Transferring

Instruction: "Thank the caller and end the call."

Functions available: None - call ends.

How This Plays Out on a Call

  1. The call starts in Greeting / Assisting. The agent welcomes the caller and can immediately help, answering questions with "Get Company Info," searching the phone directory, or transferring the call. There is no delay waiting for a transition.
  2. The caller says "I'd love to learn more about your pricing." The agent recognizes this matches the "Collect Lead Info" function description, fires it, and transitions to Collect Info.
  3. Now in Collect Info, the agent's focus narrows to gathering contact details. The general tools are no longer available, so the agent stays on task.
  4. Once the info is collected, "Collect Info" fires and the agent moves to Transferring, where it thanks the caller and wraps up.

Tips for Building Flows

Write Clear Descriptions

The function description is the most important part. Be specific about when the agent should use it. Instead of "Collect info," write "Collect the caller's name and email when they show interest in a demo or ask about pricing."

Limit Functions Per State

Only give the agent the tools it needs for that stage. Fewer choices means the agent stays focused and makes better decisions about which function to use.

Use States to Guide Focus

Each state narrows what the agent is paying attention to. The initial "Greeting / Assisting" state has broad tools so the agent can help right away. Adding a separate state like "Collect Info" with just data collection tools keeps the agent focused on that task.

Start with a Template

Use the Templates button in the toolbar to load a pre-built flow. It is easier to modify an existing flow than to build one from scratch.

Do Not Worry About Missing Integration Tools

If you enable an integration after building your flow, the agent will automatically have access to those tools at runtime, even if you have not explicitly added them to your states. For best results though, add them to the specific states where they make sense.


Still have questions? Submit a ticket and our team will help you build the right flow for your use case.
    • Related Articles

    • State based vs Prompt Engineering

      There are two ways to control how your AI Agent behaves on a call: 1. Write one long system prompt that tries to cover every situation or 2. Build a flow with states that change the agent's focus as the conversation moves forward. This article ...
    • State Type: Assisting

      The Assisting state is the agent's general-purpose "stay and help" state. It is the default conversational state — broad in scope, liberal with tools, and the place most calls spend the majority of their time. What It Does Assisting is what it sounds ...
    • Call Recordings, Transcripts & Audit Logs

      Every AI Agent call produces three artefacts you can review later: a full audio recording, a turn-by-turn transcript, and an AI-generated summary. Together they let you audit what the agent said, review edge cases, train staff on common call types, ...
    • Call Summaries

      Every AI Agent call generates a full transcript and a short AI-written summary. The summary is the piece most teams actually read — a two-to-four-sentence recap of why the caller called, what was discussed, and how it ended. This article explains ...
    • Knowledgebases

      Your AI Agent's training data covers the basics — hours, address, services, a short FAQ. For anything deeper — product manuals, procedural answers, multi-step troubleshooting — use a Knowledge Base. Upload your documents once, and the agent can ...