Create an AI agent for WhatsApp chats
Learn how to create an AI agent that handles your WhatsApp chats, from writing its prompt and adding knowledge to connecting tools and testing it.
Your customers expect a reply the moment they message you. An AI agent for WhatsApp chats replies instantly, at any hour, in 30+ languages, without adding to your team’s workload. It answers from your own business information, sends rich messages like images, buttons and catalogues, and takes actions such as booking a demo or handing the chat to the right person. You decide what it knows, what it can do and when it must hand over.
This guide walks you through setting one up, step by step. No coding is needed.
What's covered
Before you begin
You need the AI agents and assistance add-on on the Pro or Enterprise plan.
Each message the agent sends uses 1 AI credit. Each voice note it transcribes uses 0.5 AI credits. For the full rate card, see Introduction to AI agents.
Keep your business information handy: FAQs, your website link, policies and product documents.
Step 1: How to create your AI agent

Click Automate in the left menu, then click AI Agents.
Click Create new agent.
Enter a name your team will recognise, such as “Support” or “Sales”. Customers never see this name.
Describe the agent’s job in one or two lines. This becomes the start of its prompt. You can also click Skip and write it later.
Select any shared knowledge bases the agent should answer from. You can also add knowledge later.
Click Create agent.
Step 2: How to write a prompt that gets results

The prompt is the most important part of your agent. It tells the agent who it is, what it should achieve and where it must stop. The agent reads it before every chat. A vague prompt gives vague answers. A clear goal with clear rules gives answers your customers can trust.
Click Chat agent, then open the Prompt tab.
Write your instructions. Cover these four things:
Who the agent is: its name, role and the business it represents.
What it should do: answer product questions, share order updates, guide customers, and so on.
How it should talk: tone, language, and words to use or avoid.
Rules it must follow: never guess an answer, always hand over complaints, and so on.
Use Formatted to write with headings and lists, or Raw to write in Markdown. Headings you add show up in the Contents panel, so you can jump between sections. Click Full screen if you need more room.
Click Save settings at the bottom. To check your edits first, click Review changes. To undo them, click Discard.
Sample System Prompt:
Step 3: How to configure the chat settings

Click Chat agent, then open the Settings tab. Settings are grouped into sections. Change what you need, then click Save settings at the bottom.
Model
The AI model the agent uses. Pick one based on how complex your chats are.
Context messages
How many earlier messages in the chat the agent remembers. The default is 5.
Max reasoning steps
How many tool calls the agent can make to answer one message.
Include all tools
Gives the agent every tool on each reply.
Reasoning effort
How deeply the model thinks before it replies. Leave it on Default to let the model decide.
Show reasoning summary in test mode
Shows why the agent replied the way it did while you test. This uses slightly more credits.
Enable web search
Lets the agent look up live information on the internet.
Default intent behaviour
What happens when the agent isn’t confident. See the next section.
Enable customer memory
Lets the agent remember each customer across chats. Choose a template, such as Generic customer profile, Support bot, Real estate bot or Shopping bot, to decide what it remembers. It never overwrites your CRM data.
Custom fields
Shares the custom fields you select with the agent as facts about the customer.
Customer outcomes
The outcomes each AI call can end in, such as “Callback later”. When a call ends, the conversation is matched to one outcome and your bot flow continues from there.
Step 4: How to decide what happens when the agent isn’t sure

When the agent can’t find a confident answer, it follows a fallback flow that you build. A common setup is to send a short apology and hand the chat to your team.
In Chat agent > Settings, go to Fallback. Next to Default intent behaviour, click Configure.
The Bot Builder opens with a starting point called On no intent match.
Drag Send Message from the left onto the canvas. Drag the dot on the starting point to the new card to connect them.
In Body, type your message. For example: “Sorry, I couldn’t find an answer to that. A team member will reply shortly.”
Search for Assign Agent, drag it onto the canvas and connect it after Send Message.
Under Assignment Method, choose how the chat is assigned:
Assign Randomly to Human: shares chats randomly across your team.
Rotate Equally (Round Robin): gives chats to team members one by one, in turn.
Reassign to Last Human Agent: sends the chat back to the person who handled it last.
Select the team members who should get these chats.
Turn on the toggle at the top so it shows Enabled.
Click Save, then click Save again in the confirmation box.
Step 5: Give your agent the right knowledge

Knowledge is the information your agent answers from. Better knowledge means more accurate answers. Click Knowledge, then click Add source and choose one of these:
FAQ: Type a question the way a customer would ask it, add the answer, then click Add FAQ. It’s ready to use straight away.
Website: Enter the page address. Keep Follow links to other pages on the same site ticked to include linked pages, or untick it to add only that page. Websites are re-crawled once a day. After you update your website, click Re-sync all to refresh it straight away.
Files: Upload PDF, Excel, CSV, Markdown or text files, up to 20 MB each.
Check the Status column. The agent uses a source once it shows Trained. The bar at the top shows how much knowledge storage you’ve used.
Share knowledge across agents: In the Knowledge bases box, click Create knowledge base to build one that every agent can answer from, or select the ones this agent should use.
Work with FAQs in bulk: Click the three-dot menu, then Import FAQs from Excel or Export FAQs to Excel.
Step 6: Let your agent take actions with tools

Tools turn your agent from a responder into a doer. Click Tools to see three lists:
Your tools: tools you create, such as checking an order or booking a demo.
Built-in tools: tools made for calls. They don’t affect chats.
Send · WhatsApp: let the agent send images, documents, videos, buttons, interactive messages, media carousels and lists. They’re on for new agents. Use the toggles, or Enable all, then click Save settings.
Create your own tool
Click Add tool. The Create Tool panel opens.
In Name, type a short name in lowercase words joined by underscores, such as talk_to_human or book_demo.
In Description, tell the agent exactly when to use the tool. The agent decides when to use it based on this, so be specific.
Under Type, choose how the tool works:
Bot: Runs a journey you build in the Bot Builder. If you see Channel, pick the channel the journey runs on, such as WhatsApp.
API: Connects to your own system. Select the Method and enter the URL, then click Add header for any headers your system needs. Already have a cURL command? Click Import from cURL to fill these in. Click Test API to check it works.
Under Available for, choose All, Voice only or Text only. For chats, choose All or Text only.
Click Add parameter for each detail the agent should collect from the customer first, such as an order number.
Click Create. The tool shows under Your tools, with a toggle to turn it on or off.
Mention the tool in your prompt too, for example: “If the customer asks for a person, use talk_to_human.”
Build the journey for a Bot tool

Click the three-dot menu on the tool, then click Create customer journey. Once a journey exists, this option shows as Open customer journey.
The Bot Builder opens with a starting point called On customer intent.
Add the actions you need, such as Assign Agent, and connect them.
End the flow with Pass Tool Call Response. Write what the agent should tell the customer, for example: “The chat is now assigned to a team member. Tell the customer someone will reply shortly.”
Turn on the toggle so it shows Enabled, then click Save.
Step 7: How to connect MCP servers

MCP servers let your agent use tools from other software, such as your CRM. MCP servers work only for chat agents.
Click MCP servers, then click Add server.
Enter a Name, such as “Acme CRM”, and the server URL.
Choose the Transport: Streamable HTTP or SSE (legacy).
Choose the Authentication: None, Bearer token, API key, Custom header or OAuth (client credentials).
Add a Tool prefix if you want. If you leave it blank, it’s made from the name. The server’s tools show up in the agent as mcp_prefix__tool_name.
Click Add server.
Check the server’s status. Connected means it worked, and the number of tools it shares shows next to it. Failed means the agent couldn’t reach the server. Check the URL and authentication, then try again.
Step 8: How to test your agent before going live

Test every agent before your customers talk to it.
Open the Chat tab in the test panel on the right.
Send messages the way a real customer would. Try a common question, a request that should be handed over, and a question the agent shouldn’t know.
Expand the details under any reply to see which tools the agent used, how long each step took, what it read and what the reply cost.
Make changes to the prompt, knowledge or tools. Then click the three-dot menu and use Replay to run the same test messages again.
How does your agent handle voice notes?
Customers don't always type. Sometimes they send a voice note instead. When that happens in a chat assigned to your AI agent, the agent transcribes the voice note, understands what the customer said and replies in text. You don't need to set up anything extra for this.
The agent answers from your knowledge and tools, the same way it does for a typed message.
Its reply is a normal text message.
The voice note stays in the chat, so your team can see what the customer sent if the chat is handed over.
Each voice note the agent transcribes uses 0.5 AI credits, in addition to the 1 AI credit for each reply it sends.
Keep improving your agent
Unresolved intents: Once your agent is live on WhatsApp, questions it couldn’t answer show here, with how often they were asked in the last 7 days. Answer a question and your answer is saved to the agent’s FAQs, so it can reply next time.
Sessions: On the AI Agents page, open the Sessions tab to read the chats your agents have handled.
Bot logs: On the AI Agents page, click the three-dot menu on the agent, then View bot logs to see what it did.
Key takeaways
A specific prompt with clear rules is the key to a great agent.
Knowledge tells the agent what to say. Tools let it take action.
Every Bot tool’s journey must end with Pass Tool Call Response.
Set up a fallback so no customer is left without a reply.
Test and replay conversations before going live.
Your agent can transcribe a customer’s voice note and reply in text.
Each reply uses 1 AI credit, and each voice note uses 0.5 AI credits. If credits run out, the agent stops replying until you top up or credits refill.
Review Unresolved intents regularly. Each answer adds a new FAQ.
FAQs
Related articles
Introduction to AI agentsCreate an AI agent for WhatsApp and PSTN callsCreate an API tool for your AI agentCreate a Bot tool for your AI agentSummarise chats with AILast updated