How to build a WhatsApp AI agent without code in 5 steps
Build a WhatsApp AI agent without code: describe it, connect a number, write instructions, deploy and test, and follow the rules that keep it live.
On this page
- What is a WhatsApp AI agent?
- What can you build?
- Two rules to know before you build
- How to build your WhatsApp AI agent with CodeWords
- Which AI models power the replies?
- How does the bot remember the conversation?
- What happens when the agent cannot answer?
- What about connecting to other tools?
- What does it cost?
- FAQs: How to Build a WhatsApp AI Agent
- Ready to build?
To build a WhatsApp AI agent without code, follow five steps: describe what the agent should do, connect a WhatsApp number, write the agent's instructions, let the builder deploy it, then test it with real messages. The finished agent reads each incoming message, works out what the customer wants, and replies in plain language at any hour.
Key Takeaways
- Describe the WhatsApp AI agent in plain English. In CodeWords, Cody, the builder, writes and deploys the agent. There are no flowcharts and no separate AI API keys.
- Start inbound-first. The customer sends the first message and the agent replies. Cold messages to strangers are the main reason numbers get banned.
- Build a business agent, not a general chatbot. Since 15 January 2026, Meta's terms bar general-purpose AI assistants from the WhatsApp Business Platform (TechCrunch, 18 October 2025). Support, sales and booking agents are still allowed.
- Plan the handoff before launch. Decide what the agent does when it cannot answer, and write that rule into its instructions.
What is a WhatsApp AI agent?
A WhatsApp AI agent is an automated assistant that replies to messages inside WhatsApp. When a customer sends a message, the agent reads it, uses an AI model to work out the customer's intent, and sends back a reply without a person typing it. The agent works on any day and at any hour.
A WhatsApp AI agent is different from a menu chatbot ("press 1 for hours, press 2 for returns"). The AI agent understands normal sentences. A customer can type "do you have anything for a 40th birthday party?" and the agent answers the question, then asks a follow-up question if it needs more detail.
WhatsApp has more than 3 billion monthly users (Meta Q1 2025 earnings call, 30 April 2025), so WhatsApp is where many businesses' customers already are.
What can you build?
You can build five types of WhatsApp bot, and each type answers a different question: who starts the conversation, and who the bot replies to. Pick one type before you start, because the type decides how you connect the number and which rules apply.
| Bot type | What it does | Typical uses |
|---|---|---|
| Inbound direct message (DM) bot | Replies to anyone who messages you first | Customer support, FAQ answers, lead qualification, appointment requests |
| Self-chat assistant | Lives in your own "Message yourself" chat and replies to you | Expense logging, journaling, task tracking, daily summaries |
| Allowlist bot | Replies only to phone numbers you list | Client-only access, internal team tools |
| Group bot | Replies inside WhatsApp groups when someone uses a trigger word, such as "?" | Team assistants, community Q&A |
| Scheduled sender | Sends messages on a schedule instead of replying | Reminders, weekly digests and price alerts for people who asked for them |
Most businesses start with the inbound DM bot, because the customer starts every conversation. For industry examples, read the guides for accounting firms and auto repair workshops, or open the example packs for real estate and hotels, B&Bs and guesthouses.
Two rules to know before you build
Two rules decide whether a WhatsApp AI agent stays on WhatsApp. Rule 1: the customer messages first, and the agent replies. Rule 2: the agent serves your business and does not act as a general-purpose chatbot. Both rules come from Meta's policies, and breaking either one can get the number restricted or removed.
Rule 1: start inbound-first
Starting inbound-first means the customer messages you first, and your agent replies. Every reply then sits inside a conversation the customer started. Meta rates a number's quality from user feedback such as blocks, reports, mutes and archives (Meta for Developers, 2026), and a customer who starts the chat has asked for the reply.
Sending cold messages to people who never contacted you has the opposite effect. Recipients block and report those messages, and numbers that bulk-message strangers get restricted or banned. Polite wording and slow sending do not change the outcome.
In practice, inbound-first means four things:
- Customers message first. The agent replies to inbound messages and does not open conversations with strangers.
- Outbound messages stay transactional or consented. Order updates, appointment reminders and messages to people who opted in are fine. Marketing blasts to a bought list get numbers banned.
- Sends are paced and capped. Sudden volume spikes look like spam, whatever the content.
- Opt-outs are honored at once. When someone asks to stop, stop, and keep the record so the next import does not add the person back.
Inbound-first is also easier to build. Put a "Message us on WhatsApp" link on your website or social bio, and the agent handles the replies.
Rule 2: build a business agent, not a general chatbot
Building a business agent means the agent does one job for your own customers. Meta's WhatsApp Business Solution terms bar AI providers from the Business Platform when a general-purpose AI assistant is the main thing they offer. The rule took effect on 15 January 2026, and OpenAI, Perplexity, Luzia and Poke were among the providers affected (TechCrunch, 18 October 2025).
The same report says businesses that use AI to serve their own customers are not affected (TechCrunch, 18 October 2025). A support agent, a lead qualifier or a booking assistant for your business is allowed. A bot that answers any question on any topic for anyone is the pattern to avoid. Give the agent a clear job and tell it to decline topics outside that job.
A WhatsApp AI agent is the wrong fit if your plan is to send promotional messages to people who never contacted you, or to run an open assistant for anyone. Both break the two rules above.
How to build your WhatsApp AI agent with CodeWords
You build a WhatsApp AI agent with CodeWords in five steps: describe the agent, choose a connection, write the instructions, let Cody deploy it, and test it. CodeWords is an AI automation platform. You describe what you want in plain English, and Cody, the builder inside CodeWords, builds it. There is no drag-and-drop canvas.
Step 1: Describe your bot
Describing your bot means telling Cody, in one or two plain sentences, what the agent should do and who it serves. Go to app.codewords.ai and start a new chat. Cody then asks a few questions before it writes anything: who the bot should reply to, whether it should pause when you reply yourself, and what it should do when it does not know the answer.
An example description:
"I want a WhatsApp bot that answers customer questions about my business. I'll give it my FAQ and opening hours."
To start from a working bot instead, open the WhatsApp lead qualifier template and change it to fit your business.
Step 2: Choose how to connect to WhatsApp
Choosing how to connect to WhatsApp means picking one of two CodeWords connection types: Business API or Personal Device. Business API (the WhatsApp Business Platform) sends from CodeWords' official WhatsApp Business number and suits customer-facing bots. Personal Device links your own WhatsApp number and suits a personal assistant. The table compares the two connection types.
| Business API | Personal Device | |
|---|---|---|
| Sends from | CodeWords' official WhatsApp Business number | Your own WhatsApp number |
| First message to a customer | Needs a Meta-approved template | No CodeWords template. Cold outreach can still get the number banned |
| Free-form replies | Within 24 hours of the customer's last message (Meta WhatsApp Business Messaging Policy, 2026) | No 24-hour window. Unsolicited sends can still get the number banned |
| CodeWords daily DM cap | 5 a day on Free, 20 on Pro, 50 on Business (CodeWords pricing page, 2026) | No CodeWords cap |
| Best fit | Customer-facing support and FAQ bots | A personal assistant on your own number |
To link a Personal Device connection, open WhatsApp, go to Settings, then Linked Devices, then Link a Device, and enter the pairing code Cody gives you. Neither connection type lifts Meta's ban on unsolicited messages, so both stay inbound-first.
Step 3: Give your bot its instructions
Giving your bot its instructions means writing the system prompt: the plain-English text that sets the agent's tone, knowledge and limits. Cody suggests a first version from your description, and you edit it. Specific instructions produce better replies, so say what the agent should and should not do, set the tone, and give it the facts it needs.
A system prompt for a café bot might be:
"You are a friendly assistant for Rosie's Café. You know our full menu, prices, and opening hours. Keep responses to two or three sentences and use bullet points for lists. If someone asks to make a booking, ask for their name, date, time, and party size. Never make up information you don't have. If a question is not about the café, say you can only help with café questions."
The reply-length line matters because customers read WhatsApp on phones, where long replies need scrolling. The last line keeps the agent a business assistant, in line with Rule 2.
Step 4: Cody builds and deploys it
Cody builds and deploys the agent once your description, connection and instructions are in place. Cody writes the workflow, tests it with sample messages, and deploys it. You can watch it work in the chat or come back later.
You can change the agent later by asking Cody in the same chat. A simple bot for frequently asked questions (FAQ) has fewer steps to build and test than an agent with a customer relationship management (CRM) connection.
Step 5: Test it
Testing the agent means sending real WhatsApp messages to the connected number before customers do. Send four kinds of message: a normal question, an unusual question, an off-topic question and an opt-out word such as "STOP". Check that each reply is correct, short, on-topic and honest about what the agent does not know. If a reply is wrong, tell Cody what to change.
Which AI models power the replies?
CodeWords includes AI models from OpenAI, Anthropic and Google, with no separate API keys. The table lists some of the available models (CodeWords model docs, 2026). You pick the model when you build the agent and can change it at any time by asking Cody. Smaller models cost less per reply, which suits a high message volume.
| Provider | Models |
|---|---|
| OpenAI | GPT-5, GPT-5-mini |
| Anthropic | Claude Sonnet 4.6, Claude Haiku 4.5 |
| Gemini 3.5 Flash |
GPT-5-mini and Gemini 3.5 Flash are the lower-cost options for a busy FAQ bot. The larger models suit agents that must follow longer instructions or reason through several steps.
How does the bot remember the conversation?
The bot remembers a conversation by saving each customer's recent messages and sending them to the AI model with every new message. WhatsApp delivers each message on its own, so without saved history the bot would treat every message as the start of a new conversation.
CodeWords workflows store this history in Redis, a fast key-value database, with one history per customer phone number:
- A customer sends a message.
- The bot loads that customer's recent messages from Redis.
- The bot sends the history and the new message to the AI model.
- The AI model replies with the full context.
- The workflow saves the new exchange back to Redis.
The workflow sets how much history the bot keeps and for how long. The WhatsApp agent with human handoff template, for example, keeps the last 20 messages for 7 days. Each customer has a separate history, so one person's chat never mixes with another's.
What happens when the agent cannot answer?
When the agent cannot answer, it should hand the conversation to a person instead of guessing. Decide the handoff rule before launch and write it into the agent's instructions. A guessed answer about prices, stock or bookings costs more trust than an honest "let me get someone to help".
Three handoff options work for most businesses:
- Alert the owner. The workflow sends you a WhatsApp message with the customer's number and a summary. The CodeWords human handoff template works this way: the AI model flags a request that needs a person, and the workflow notifies the number you set.
- Give the customer a way to reach a person. Share a phone number, an email address or the opening hours of a staffed line.
- Log the question for later. Save the question to a sheet, then add the answer to the agent's instructions.
For bookings, the safe default is to collect the details (name, date, time, party size) and have a person confirm. Let the agent book slots on its own only after you have tested that connection against your real calendar.
What about connecting to other tools?
Connecting a WhatsApp AI agent to other tools lets the agent write leads, bookings and orders into the systems you already use. You do not set up these connections by hand. Tell Cody what you want, for example "save new leads to HubSpot", and Cody asks you to sign in to that tool.
| Agent | Connected tool | What the agent does |
|---|---|---|
| Lead qualification bot | HubSpot | Qualifies and scores the lead, creates a HubSpot contact and assigns it to a rep |
| Appointment bot | Google Calendar | Checks availability, books the slot and sends a confirmation |
| Order bot | Google Sheets | Takes the order, logs it in a spreadsheet and confirms with the customer |
| Support bot | Slack | Sends the first reply, then posts the conversation to Slack if it cannot solve the issue |
The WhatsApp order automation template is a working starting point for the order bot.
What does it cost?
A WhatsApp AI agent on CodeWords can cost nothing to start. The Free plan includes 5 WhatsApp DMs a day on the Business API. Pro costs $39 a month and allows 20 DMs a day. Business costs $100 a month and allows 50 DMs a day (CodeWords pricing page, 2026). All plans include AI model access and integrations.
Personal Device connections have no CodeWords daily send cap. Meta's anti-spam rules still apply, and staying inbound-first keeps the number within them. See current prices on the pricing page.
FAQs: How to Build a WhatsApp AI Agent
Are WhatsApp chatbots free?
Yes, WhatsApp chatbots can be free to start. The CodeWords Free plan includes 5 WhatsApp DMs a day on the Business API, with AI model access included. Pro costs $39 a month for 20 DMs a day, and Business costs $100 a month for 50 DMs a day (CodeWords pricing page, 2026).
How do WhatsApp bots work?
WhatsApp bots work by receiving each message through a connection to WhatsApp, passing the message to software or an AI model, and posting the reply back to the chat. AI bots also load the customer's recent chat history with each message, so every reply fits the conversation so far.
How do I integrate my chatbot with WhatsApp?
You integrate a chatbot with WhatsApp through the WhatsApp Business Platform or a linked device. In CodeWords, choose Business API to send from CodeWords' official business number, or choose Personal Device to link your own WhatsApp number with a pairing code from Settings, then Linked Devices.
Are WhatsApp bots illegal?
No, WhatsApp bots are not illegal, but WhatsApp's terms limit how you run them. Business bots that serve your own customers are allowed. Unsolicited bulk messages, unofficial automation tools and general-purpose AI assistants on the Business Platform break the terms and can get the number banned.
Ready to build?
Go to CodeWords, describe a simple inbound FAQ bot, and connect your WhatsApp. Start small, get one agent live, then add CRM connections, multi-step flows and scheduled sends once you have seen it work.
Related reading: WhatsApp AI chatbot, build WhatsApp chatbot, WhatsApp bot builder, introducing WhatsApp automations, WhatsApp agents by industry, why WhatsApp bots get banned.