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

# Advanced Agents (Flow)

> A WhatsApp chat agent built from a persona and a flow of steps, instead of one long system prompt

A WhatsApp chat agent comes in two types. You pick one when you create the agent.

| | **Basic** | **Advanced (flow)** |
| - | - | - |
| You write | One system prompt that describes everything | A persona (role, goal, instructions, rebuttals, guardrails) and a flow of steps on a canvas |
| Messages, templates, media | The AI decides when to call each send function | Each one is a step; exact text, buttons, template variables and media links are filled in by code |
| Branching | Described in prose inside the prompt | Buttons, AI-judged branches, rule conditions checked by code, global intents |
| Where it is in the conversation | The AI infers it from the prompt and the history | Every message is tagged with its step, and the AI is told its last step on every turn |
| Best for | Short, open-ended assistants | Sales funnels, bookings, onboarding, anything with a fixed sequence |

> [!WARNING]
>
> The type is fixed once the agent is created, and every version of the agent has the same type. To move a Basic agent to Advanced, create a new Advanced agent, or have Claude build one from your PRD — see [Build with Claude](/chat-agents/advanced/build-with-claude).

Advanced agents are WhatsApp only for now. Instagram agents are Basic; widget agents use the [widget flow builder](/widget/chat/card-types), which is a different, fully deterministic kind of flow.

## How an Advanced agent answers

An Advanced flow is **not a fixed script that code walks through**. When a message arrives:

**1. The flow becomes the agent's plan**

Your persona and every step are compiled into one system prompt. Steps are numbered **S1, S2, …**, and each says what to do and where to go next.

**2. The AI works out where the conversation is**

Every message the agent sent is tagged with the step it came from, and the end of each turn tells the AI its last step — so a reply to the third question is answered at the third step, not from the start.

**3. Code does the deterministic parts**

A step with exact text sends it word for word. Buttons are added by code. Template variables and media links that come from the contact, a function result or a fixed value are filled in by code. Rule conditions are checked by code and the AI is told the result.

**4. The AI does the judgement**

It writes the messages you marked **AI writes it**, decides which AI-judged branch a typed reply belongs to, fills function arguments, and answers side questions from your instructions and rebuttals before steering back to the flow.

Because the AI follows the flow rather than being locked into it, a lead who asks a question in the middle of a funnel gets an answer and is brought back to the step they were on.

## What an Advanced agent is made of

> **[Agent Persona](/chat-agents/advanced/persona)**
>
> Role, goal, instructions, rebuttals and guardrails — what applies on every step.

> **[The flow](/chat-agents/advanced/flow-builder)**
>
> The steps, how they connect, and how a turn moves through them.

> **[Step types](/chat-agents/advanced/step-types)**
>
> Every step type and every field.

> **[Branches and conditions](/chat-agents/advanced/branches-and-conditions)**
>
> Buttons, AI-judged branches, rules, global intents.

> **[Testing](/chat-agents/advanced/testing)**
>
> Test Chat with the live step highlight, and the publish checks.

> **[Build with Claude](/chat-agents/advanced/build-with-claude)**
>
> Give Claude your PRD and the skill, get the agent as a JSON file.

The rest of the configuration is the same as a Basic agent: [LLM Model](/chat-agents/configuration/llm-model), [Conversation & Features](/chat-agents/configuration/conversation-and-features), [Follow-Ups](/chat-agents/configuration/follow-ups), [Functions](/chat-agents/functions/overview) and [Webhook](/chat-agents/configuration/webhook).

## Create one

**1. Start a chat agent**

**Dashboard → Agents → Create Agent → Chat Agent**, then pick **WhatsApp**.

**2. Pick Advanced (flow)**

Under **Agent type**, choose **Advanced (flow)** — "Persona plus a flow of steps you design on a canvas".

**3. Build it**

The editor opens on the **Flow** page. Its left rail holds every page of the agent:

| Page | What it holds |
| - | - |
| **Agent Persona** | Role, Goal, Instructions, Rebuttals and Guardrails tabs |
| **Flow** | The canvas, the step editor and Test Chat |
| **Model** | The LLM and its fallback |
| **Conversation** | Reply timing, voice notes, images, session limits |
| **Follow-ups** | What the agent sends when the user goes quiet |
| **Functions** | Your custom functions — the ones **Custom function** steps call |
| **Webhook** | This agent's own webhook |

Every page except Flow keeps Test Chat open on the right.

**4. Save, test, publish**

Save, try it in Test Chat, then publish. Publishing runs the [flow checks](/chat-agents/advanced/testing#publish-checks).

## Limits

| | Limit |
| - | - |
| Steps per flow | 150 |
| Exits per step (buttons, branches and "anything else" together) | 12 |
| Buttons on a Send buttons step | 3 as reply buttons, up to 10 as a list |
| Message or guidance text | 4,000 characters |

An Advanced agent always may send several messages in one turn, because a flow often chains two steps — so the **Multiple Messages per Reply** switch is not shown for it.

## Cost

Replies are billed exactly like a Basic agent's. A flow adds one case: when the AI sends a step that does not wait for the user on its own, the turn spends one more model call to carry on to the next step, instead of stopping halfway.


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