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

# Build an agentic workflow for your calls

> Use the Brilo agentic workflow builder to split a call into steps, capture details mid-call, and branch to a transfer, identity check, or the next conversation.

An agentic workflow turns one long prompt into a map of steps that the call moves through while it
is happening. Each step does one job, such as talking to the caller, capturing details, checking
their identity, or transferring them, and the arrows between steps decide where each caller goes
next. You build it in your agent's **Workflow** tab.

## What it is

An agentic workflow is a flowchart your agent follows during a live call. It starts at **Start**,
where your agent says its greeting, and moves from step to step along arrows called paths. Every
step and every path runs while the caller is on the line. Nothing in the workflow runs after the
call ends. For work after the call, see
[Automate what happens after a call](https://docs.brilo.ai/reports/automate-what-happens-after-a-call.md).

A single prompt is enough for most agents. A workflow earns its place when different callers need
clearly different handling and you want that routing to be predictable, not left to the agent's
judgement in one long set of instructions.

## When you would use it

* **A front desk that sorts callers.** New patients go to intake, existing patients asking about
  billing go to the billing team, and everyone else keeps talking to the front desk.
* **A check before private information.** Callers asking about their account must pass a texted
  code before the next step reads anything out.
* **A transfer that must happen on a rule.** Every caller who says it is urgent goes straight to a
  person, every time.

## How it works

The workflow builder offers these steps. You add one by hovering over a step and choosing **+**,
then picking from the list. The table lists each step and what it does on the call.

| Step | What it does on the call |
| - | - |
| **New Sub-Agent** | Talks with the caller. Has its own **Conversation goal**, **Knowledge Base**, voice and language, and stays in the conversation until one of its paths fits. |
| **Extract Information** | Reads the conversation so far and fills the values you name, such as `call_reason`. Never speaks and never asks. |
| **Verify Identity** | Texts the caller a short code and waits for them to give it back. Leaves by **Verified** or **Not verified**. |
| **Call Transfer** | Transfers the caller to a person or number. |
| **Send SMS** | Texts the person on the call, then moves on. |
| **Tool Calling** | Runs an action from one of your connected apps, such as looking up a record. |
| **End Call** | Says goodbye, following your **End call instructions**, and hangs up. |

Extract Information is not the same as the extraction fields in **Post Call Analysis**. Extract
Information fills values at the moment the call reaches it, so the call can be routed on them. Post
Call Analysis fields are filled after the call ends, for reporting. See
[Pull the details out of every call](https://docs.brilo.ai/reports/extract-call-information.md).

## How paths decide where the call goes

A path is the arrow between two steps. Choose a path to open its **Edge Condition** panel, then
answer **When should the call take this path?** with one of three choices:

* **When the AI decides.** You describe the situation in words, and the agent judges it from the
  conversation. Good for intent, such as "The caller wants to book an appointment".
* **When a condition matches.** You compare a value against something: **What to check**, **How to
  compare** (for example **equals**, **is one of**, **is set**), and **What to compare against**.
  Choose **Add condition** for more than one check, and **Match** with **All of them** or **Any one
  of them**. The same values always give the same answer.
* **Otherwise.** Taken when nothing else leaving the step matched. There is nothing to fill in.

One step can have as many paths leaving it as you need. After an Extract Information step, Brilo
checks the paths in this order: rule paths against the values it captured, then the paths left to
the AI, then **Otherwise**. When two rule paths could both match, you cannot choose which wins, so
write rules that do not overlap.

Rule paths leaving a Sub-Agent are checked when the caller arrives at that Sub-Agent, not again
later. To route on something the caller says during a conversation, send the call through an
Extract Information step and put the rules on the paths leaving it.

A new path shows red until you save a condition on it, and you cannot publish your agent while any
step or path is red.

## When nothing matches

A step with no **Otherwise** path can reach a point where none of its paths fit. When that happens
after Extract Information, Send SMS or Tool Calling, Brilo sends the caller back to the last
Sub-Agent they spoke to, which asks one short clarifying question and then tries again. If the
second try still matches nothing, the agent apologises, tells the caller it cannot help on this
call, and ends the call.

The same happens when a path left to the AI is chosen but the Extract Information step captured
nothing it was meant to: the caller is asked for the missing detail once.

Give every Extract Information step an **Otherwise** path. It is the simplest way to make sure no
caller ever reaches a dead end. Point it at a Sub-Agent that carries on helping, or at a Call
Transfer to your team.

A step can only be revisited a limited number of times on one call. A path that loops a caller
back to an earlier Sub-Agent again and again ends the call politely, so send callers forward to a
new Sub-Agent rather than in a circle.

## The Verify Identity step

Verify Identity confirms a caller is who they say they are before a later step reads out personal
or account information. Under **Setup**, **How** is **SMS**, and **Send the code to** is one of:

* **Contact record**, the phone number saved on the contact matched to this caller, or another
  contact field you pick.
* **Use dynamic variable**, a phone number an earlier step filled.
* **The number they're calling from**. Only safe when the contact was matched from that same
  number.

**Advanced** sets **Code expires after**, **Tries allowed**, **Resends allowed**, and **Let them use
the keypad**. **What the caller hears** holds the lines your agent says during the check.

Verify Identity has two exits instead of conditions. **Verified** is for callers who gave the right
code. **Not verified** is for everyone else, including callers who ran out of tries or had no
number to text. Both must lead somewhere, such as a transfer or a polite ending, before you can
publish.

## A worked example for a clinic front desk

A clinic front desk workflow sorts callers by why they are calling, while the front desk conversation carries on
for everyone the rules do not catch.

* **Start** leads to a Sub-Agent called Front desk. Its **Conversation goal** asks the caller
  whether they are a new or existing patient and why they are calling.
* **The path from Front desk** is set to **When the AI decides**, with "The caller has said whether
  they are a new or existing patient and why they are calling". It leads to Extract Information.
* **Extract Information** captures `caller_status` as a **Choice** of new or existing, and
  `call_reason` as a **Choice** of appointment, prescription refill, billing, or other.
* **The billing path** is **When a condition matches**, with `call_reason` **equals** billing. It
  leads to a Call Transfer to your billing team.
* **The refill path** is **When a condition matches**, with `call_reason` **equals** prescription
  refill and `caller_status` **equals** existing, and **Match** set to **All of them**. It leads to
  Verify Identity. **Verified** leads to a Sub-Agent that handles refills, and **Not verified**
  leads to a Call Transfer to the front desk.
* **The Otherwise path** leads to a Sub-Agent called Front desk, continued, with the same goal of
  helping the caller, so the conversation carries on for everyone else.

The values you compare against must match the **Allowed values** of the Choice exactly as you
typed them.

## When not to use one

* **Your agent answers questions and takes messages.** A single prompt does this well and is
  easier to change. See [Write what your agent says](https://docs.brilo.ai/agents/write-what-your-agent-says.md).
* **You only need a transfer when a caller asks for a person.** A transfer action does this without
  a workflow. See [Pass the call to a person](https://docs.brilo.ai/actions/pass-the-call-to-a-person.md).
* **The work can wait until the call ends.** Use a post-call workflow instead.

## What it costs and what it needs

* The workflow builder needs a desktop screen. It is not available at phone width.
* Extract Information needs an agent with versions turned on. See
  [Save and switch agent versions](https://docs.brilo.ai/agents/versions.md).
* The workflow is off until you choose **Enable Agentic Workflow** in the **Workflow** tab. From
  then on your agent follows the workflow on every new call. The **Agentic Workflow** switch in the
  same tab turns it off again.
* On a workspace with HIPAA support turned on, Extract Information does not capture values, so rule
  paths that check them will not work as intended. Use paths set to **When the AI decides** instead. See [Healthcare and HIPAA](https://docs.brilo.ai/compliance/healthcare-and-hipaa).

## What else you can do here

* Transfer callers to the right person. See [Pass the call to a person](https://docs.brilo.ai/actions/pass-the-call-to-a-person.md).
* Add actions from your connected apps. See [Connect your tools](https://docs.brilo.ai/actions/connect-your-tools.md).
* Publish and roll back your changes. See [Save and switch agent versions](https://docs.brilo.ai/agents/versions.md).
* Do the paperwork after the call. See [Automate what happens after a call](https://docs.brilo.ai/reports/automate-what-happens-after-a-call.md).

## FAQ

> **Can one Extract Information step have several conditional paths?**
>
> Yes. Add as many paths leaving the Extract Information step as you need, each with its own
> condition, for example one checking `caller_status` and another checking `call_reason`. Brilo
> checks the rule paths first, then the paths left to the AI, then **Otherwise**. Write rules that
> do not overlap, because you cannot set which one wins.

> **What happens when no path matches in my workflow?**
>
> The **Otherwise** path is taken, if the step has one. Without an **Otherwise** path, the caller
> goes back to the last Sub-Agent they spoke to for one clarifying question, then Brilo tries
> again. If nothing matches the second time, the agent apologises and ends the call. Add
> **Otherwise** to every step to avoid that.

> **Does Extract Information run during the call or after it?**
>
> During the call. Extract Information reads the conversation at the moment the call reaches it,
> fills its values, and the call moves straight on along the matching path. It never speaks to the
> caller. The extraction fields in **Post Call Analysis** are different, because those are filled
> after the call ends.

> **How do I keep the conversation going after Extract Information?**
>
> Point the **Otherwise** path, and any path that should not end or transfer the call, at a
> Sub-Agent. That Sub-Agent picks up the conversation where it left off. Send callers forward to a
> new Sub-Agent rather than back to the one they came from, because a step can only be revisited a
> limited number of times.

> **What is the simplest way to transfer or verify on a condition?**
>
> Put the rule on a path leaving Extract Information and point it straight at a Call Transfer or a
> Verify Identity step. For Verify Identity, connect **Verified** to the step that reads out
> private information and **Not verified** to a transfer or a polite ending. Add **Otherwise** for
> everyone else.

> **Should I remove the Extract Information step from my workflow?**
>
> Keep the Extract Information step if you route on exact values, such as a reason chosen from a
> list. Remove it if the routing is about what the caller wants, because paths set to **When the
> AI decides** on the Sub-Agent can judge that directly. On a workspace with HIPAA support turned
> on, use paths left to the AI.

> **Why can I not add Extract Information to my workflow?**
>
> Extract Information only appears for agents with versions turned on. Open your agent and choose
> **Enable Versioning** at the top of the agent page, then return to the **Workflow** tab. See
> [Save and switch agent versions](https://docs.brilo.ai/agents/versions.md) for how versions work.

> **What is the difference between a workflow and a prompt?**
>
> A prompt is one set of instructions your agent follows for the whole call. An agentic workflow
> splits the call into steps with paths between them, so routing follows rules you can see. Use a
> prompt unless different callers clearly need different handling. See
> [Write what your agent says](https://docs.brilo.ai/agents/write-what-your-agent-says.md).

## Related

* [Automate what happens after a call](https://docs.brilo.ai/reports/automate-what-happens-after-a-call.md) for work after the call ends
* [Pull the details out of every call](https://docs.brilo.ai/reports/extract-call-information.md) for reporting fields
* [Pass the call to a person](https://docs.brilo.ai/actions/pass-the-call-to-a-person.md) for transfer settings
* [Save and switch agent versions](https://docs.brilo.ai/agents/versions.md) to publish workflow changes


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