How to build WhatsApp AI agents with CodeWords
A complete guide to building WhatsApp AI agents with CodeWords — from first login to a live, integrated agent with memory, tools, and human handover.
On this page
- Step 1: go to codewords.agemo.ai
- Step 2: describe your agent
- Step 3: choose your WhatsApp connection
- Step 4: write your system prompt
- Step 5: Cody deploys the agent
- Step 6: add integrations
- Step 7: set up human handover
- The five WhatsApp AI agent types you can build with CodeWords
- Industry-specific starting points
- Choosing how to connect
- What to check before you point it at customers
- What the first month usually looks like
- Frequently asked questions
- Related reading
Building a WhatsApp AI agent used to mean hiring a developer, setting up cloud infrastructure, managing API credentials, and spending weeks writing bot logic. With CodeWords, it means telling Cody what you want and going live in the same session.
This guide walks through the full process — from creating your account to deploying an agent with integrations, memory, and human handover built in.
TL;DR
- Describe your agent to Cody (the builder inside CodeWords) and it builds it — no code, no flowcharts, no config files.
- Choose your WhatsApp connection: Business API for volume and compliance, Personal Device for speed and flexibility.
- Add integrations, memory, and handover by telling Cody what you need — it handles the setup.
Step 1: go to codewords.agemo.ai
Head to codewords.agemo.ai and create your account. The onboarding flow takes about two minutes.
Once you're in, you'll see Cody — the builder inside CodeWords that acts as your agent builder. Everything happens through Cody. You describe what you want, and it builds it.
Step 2: describe your agent
Start by telling Cody what kind of agent you're building. Be as specific as you can about:
- What the agent does (answers FAQs, books appointments, qualifies leads, takes orders)
- Who it's talking to (customers, potential clients, existing members)
- What tone it should use (friendly, professional, concise)
- What actions it should take (create a CRM contact, send a calendar invite, update a spreadsheet)
- What it should do when it can't help (hand off to a human, collect contact details and escalate)
Here are some example descriptions to give you a sense of the format:
Customer support agent:
"Build an inbound WhatsApp agent for my dental practice. It should answer questions about opening hours, services, and pricing. If someone wants to book, it should collect their name, preferred day, and type of appointment, then create a booking in my Calendly. If they have an urgent dental issue, it should tell them to call us on [number] immediately."
Lead qualification agent:
"Build a WhatsApp lead qualification bot for my marketing agency. When someone messages in, it should ask for their company name, current monthly marketing budget, what they're hoping to achieve, and their timeline. Score them out of 10 based on budget (over £2,000/month = high score) and timeline (under two months = high score). Push the lead to HubSpot with the score and a conversation summary."
Restaurant ordering agent:
"Build a WhatsApp ordering agent for my pizza restaurant. It should take takeaway orders in natural language, confirm the order back to the customer, ask for their delivery address, and log the order to a Google Sheet. Send a confirmation message with an estimated delivery time of 35 minutes."
You don't need to think about how any of this is implemented. Just describe what you want, and Cody will ask clarifying questions if it needs more information.
Step 3: choose your WhatsApp connection
CodeWords supports two ways to connect WhatsApp:
Business API (CodeWords' number): your agent uses a verified WhatsApp Business API number managed by CodeWords. Messages to customers use Meta's template system — you pre-approve message templates, and the system sends them within the 24-hour messaging window. This is the right choice if you're running volume campaigns, want a verified business checkmark, or need to send outbound messages at scale (5–50 DMs per day to start, scaling up as your account reputation builds).
Personal Device (your own number): you connect your personal WhatsApp number by scanning a pairing code — similar to how WhatsApp Web works. There are no template restrictions. You can send any message to anyone who messages you first. This is faster to set up and the right choice for most small businesses getting started.
Most people begin with Personal Device and move to Business API as they grow. Cody will ask which you want during setup and walk you through the connection steps.
Step 4: write your system prompt
The system prompt is the set of instructions your agent follows in every conversation. Cody will draft one based on your description, but you can review and refine it.
A good system prompt includes:
Identity: "You are an assistant for Bright Smile Dental Clinic. Your name is Amy."
Purpose: "Your job is to answer questions about our services and help patients book appointments."
Tone: "Be warm, friendly, and clear. Keep replies concise — two to three sentences unless more detail is genuinely needed."
Knowledge: "Our opening hours are Monday to Friday, 8:30am to 6pm, and Saturday 9am to 1pm. We offer general dentistry, cosmetic whitening, Invisalign, and emergency appointments. Emergency slots are available same-day on 020 1234 5678."
Boundaries: "If someone has a dental emergency, tell them to call us immediately rather than booking online. If someone asks about medical advice beyond dental topics, explain you can only help with dental questions."
Handover: "If a patient is frustrated or the question is outside your knowledge, say 'Let me put you through to our team' and flag the conversation for human review."
Cody will suggest improvements to your system prompt and help you fill in any gaps.
Step 5: Cody deploys the agent
Once you're happy with the agent description and system prompt, Cody deploys it. This takes seconds.
Your agent is now live. Send it a test message from your own WhatsApp to verify it's responding correctly. Check that the tone matches what you described, that it handles edge cases sensibly, and that any integrations (calendar, CRM, spreadsheet) are triggering correctly.
Step 6: add integrations
Tell Cody which tools you want to connect. CodeWords has access to 3,000+ integrations via Composio, including:
- HubSpot — create contacts, update deals, log notes
- Google Sheets — append rows, update cells, read data
- Calendly / Cal.com — check availability, create bookings
- Stripe — look up customer records, create payment links
- Shopify — look up orders, update customer records
- Slack — send notifications to your team when something needs attention
To connect a tool, just tell Cody: "When someone books an appointment, create a contact in HubSpot with their name, number, and the appointment details." Cody will prompt you to authenticate the integration via OAuth — one click, no API keys.
Step 7: set up human handover
Every well-built WhatsApp agent needs a clear handover path. Cody can set this up based on your description.
Common handover triggers:
- Customer expresses frustration ("this is ridiculous" / "I want to speak to a human")
- Question is outside the agent's knowledge base
- The conversation involves a complaint or refund
- The lead scores above a threshold and a rep should follow up immediately
When a handover triggers, the agent can: send a Slack notification to your team, tag the conversation for review, tell the customer that a human will be in touch within a defined timeframe, or — if you're using Business API — escalate to a live chat inbox.
The five WhatsApp AI agent types you can build with CodeWords
Most businesses find one of these five patterns covers their needs:
Inbound DM bot: replies to anyone who messages your WhatsApp number. Best for FAQ, booking, and lead qualification.
Self-chat assistant: lives in your own "Message yourself" chat. You send it tasks, it acts on them. Great for expense tracking, daily summaries, and internal lookups.
Allowlist bot: only responds to specific numbers you define. Good for client portals and team tools.
Group bot: responds inside a WhatsApp group when someone uses a trigger word. Useful for community Q&A and team assistants.
Scheduled sender: sends messages on a schedule, not just in response to inbound messages. Use for reminders, digests, and follow-ups.
Industry-specific starting points
CodeWords has pre-built guidance for specific industries. If you're building for one of these sectors, start with the guide for that sector:
Or visit the WhatsApp agents hub for the full overview.
Choosing how to connect
Two routes onto WhatsApp, with a genuine trade-off between them.
The WhatsApp Business API is the official path. It supports a verified business profile, higher volumes, and template messages, and it comes with Meta's business verification process, which takes time and paperwork.
The personal-device route connects a number you already use, which avoids that verification step where it applies. It suits smaller operations and anyone testing an idea before committing to the API process.
Neither is universally better. The API is the right destination for volume and for anything customer-facing at scale. The personal-device route gets you running sooner on a number your customers already recognize. Worth noting that group automation currently works through the personal-device route, and that route is not frictionless: treat it as a practical starting point rather than a permanently equivalent alternative to the API.
What to check before you point it at customers
A WhatsApp agent is unusually exposed, because the first person to find a flaw is a customer rather than a colleague. Five checks worth running first.
Send it something ambiguous. Not the question you designed it for. Something half-typed, in the wrong language, or asking two things at once. That's what real inbound looks like.
Check what it does when a system it depends on is down. If your CRM lookup fails, does the agent say something sensible or does it improvise an answer about the customer's order?
Confirm the escalation path works end to end. Trigger it deliberately and check a person actually receives it. Escalation that logs somewhere nobody reads is worse than none, because you'll believe it's covered.
Read the outbound rules again. Confirm nothing in your build sends unsolicited messages, and that opt-outs stop everything rather than just the sequence they arrived in.
Watch the first fifty conversations yourself. Not the metrics, the transcripts. You'll learn more in an hour of reading than a week of dashboards, and the fixes will be obvious.
What the first month usually looks like
Worth setting expectations, because the pattern is consistent enough to plan around.
Week one is about surprise. Customers ask things you didn't anticipate, in phrasing you didn't imagine, and roughly a fifth of conversations go somewhere the agent handles awkwardly. This is normal and it's the most useful week, because every awkward transcript is a specific fix.
Week two is tightening. You narrow the agent's scope, add the two or three things it should have known, and make the escalation wording clearer. Most of the improvement happens here and it comes from reading conversations rather than adjusting settings.
Weeks three and four are about the edges. The customer who sends a voice note, the one who replies to a three-week-old message, the one who asks something genuinely outside your business. You decide what should happen in each case and describe it.
After that, changes become occasional rather than constant. Teams that struggle usually did one of two things: launched to their whole customer base at once rather than a slice, or stopped reading transcripts after the first week.
Frequently asked questions
How long does it take to get something running?
A straightforward agent can be described, built, and deployed in a single sitting. Connecting your other systems and agreeing what should escalate to a person usually takes longer than the build, and it's time well spent.
Can I change the agent after it's live?
Yes, by describing the change. That matters more on WhatsApp than most channels, because you'll be adjusting constantly in the first few weeks as you see what customers actually ask, which is never quite what you expected.
Should we launch to everyone at once?
Better not to. Route a slice of inbound to the agent first, a single location or a single product line, and read every one of those conversations before widening. A staged launch turns the inevitable early surprises into a handful of transcripts rather than a day of customer complaints, and it costs nothing but a week.
What should the agent not handle?
Anything binding, anything involving payment details, and anything where being wrong causes real harm. Capture the request, then have a person confirm. That boundary is easier to hold from day one than to introduce after something goes wrong.