Content ·

How to set up an AI agent on WhatsApp

Cloud API, 24-hour window, templates, message competition and human handoff: what changes when the channel is WhatsApp.

11 min readIntermediaryFounders, CTOs and product teams operating at WhatsAppUpdated September 2026

Setting up an agent on WhatsApp is 30% AI and 70% messaging platform. Agent modeling is the same as any other channel; What changes are the rules of Meta's Cloud API, the real behavior of those who send five audios in a row and the need to return the conversation to a human without breaking the context.

Executive summary

  • Official Cloud API avoids banning and releases templates — BSP and unofficial gateways are a business risk.
  • The 24-hour window defines what you can send and how much it costs.
  • Message debounce is mandatory: the user writes in bursts.
  • Human handoff is part of the product, it is not plan B.

1. Choose the access path to WhatsApp

There are three paths: Cloud API directly with Meta, a BSP (official provider) or unofficial libraries that automate WhatsApp Web. The third is tempting because it is free and fast, and is exactly what brings down the company's number. Do not use in serious operation.

Direct Cloud API gives lower cost and full control, requiring you to take care of business verification, webhooks and infrastructure. BSP solves onboarding and support with a markup per conversation. For those who already have a technical team, direct Cloud API is the standard.

2. Webhook: receive without losing messages

Meta delivers events via HTTPS webhook and resends when you don't respond quickly. The handler needs to validate the signature, respond 200 immediately and process in queue. Processing synchronously generates timeout, redelivery and duplicate response to the customer.

Keep the message identifier and discard duplicates: delivery is at least once, not exactly once.

Webhook that validates, queues and responds quickly
export const POST = async ({ request }) => {
  const raw = await request.text();
  if (!verificarAssinatura(raw, request.headers.get("x-hub-signature-256"))) {
    return new Response("assinatura inválida", { status: 401 });
  }
  const evento = JSON.parse(raw);
  const msg = evento.entry?.[0]?.changes?.[0]?.value?.messages?.[0];
  if (msg && !(await jaProcessada(msg.id))) {
    await fila.enfileirar({ id: msg.id, de: msg.from, tipo: msg.type, msg });
  }
  return new Response("ok"); // sempre 200, sempre rápido
};

3. Debounce: people write in bursts

On WhatsApp, the user sends "hi", then "I wanted to know", then "what's your plan" in three messages. Responding to each one generates three random responses and triples the cost.

The solution is a grouping window of 3 to 8 seconds per contact: it accumulates, resets the counter with each new message and only then calls the agent with the entire block. Along with this, a typing indicator and a lock per conversation to prevent two simultaneous executions of the same contact.

4. 24-hour window, templates and cost

After a message from the customer, you have 24 hours to respond freely. Outside this window, only previously approved templates. This changes the design of the product: follow-up, reminder and conversation resumption require a registered template and correct category.

Meta is charged per conversation initiated, varying by category — service, utility, marketing and authentication. Add this to the cost of agent tokens and you arrive at the real cost per service, which is the number to compare with the cost of the human agent.

  • Templates: submit early, approval takes hours to days and disapproval is common for promotional text.
  • Never launch cold list marketing — it’s the quickest path to low quality and restricted numbers.
  • Record the time of the contact's last message to know, at any time, whether the window is open.

5. Audio, image and document

In Brazil, audio is the norm. The agent needs to download the API-authenticated media, transcribe it, and treat the text as normal input. Images are usually proof, error prints or product photos — it's worth running a view only when the flow requires it, because it costs more.

Store the media on your infrastructure: Meta URLs expire, and you will need the file in your service history.

6. Human handoff without losing context

Every WhatsApp agent needs an exit door: explicit customer request, sensitive topic (legal, financial, serious complaint), low trust or repeat failure. During handoff, the agent stops responding to that contact, marks the conversation as human and delivers a summary, collected data and history to the agent.

Also define the return path: who returns the conversation to the agent, when and what the agent can already assume as known.

7. Integration with CRM and internal systems

The value is not in the conversation, it is in what it records. Each service must produce identified contact, qualified fields, funnel stage and event in CRM. The same tool rules apply here: scope per tenant on the server, idempotence in writing and auditable log.

This is what transforms the agent from a “nice chatbot” into a channel with a conversion number comparable to that of the sales team.

8. Metrics that matter

Track resolution rate without human, time to first response, handoff rate, cost per resolved conversation and conversion to meeting or sale. "Messages sent" metric says nothing.

Also monitor the quality of the number on the Meta platform: a drop in quality precedes the sending limit, and the sending limit brings down the operation.

Frequently asked questions

+Do I need a new number?

Recommended. A number already used on regular WhatsApp needs to be migrated and loses its history in the app. Number dedicated to Cloud API avoids conflict between manual and automated service.

+Does the customer realize it is AI?

Realize when the agent is shallow. With access to real data and well-done handoff, the experience is usually better than the human queue. Being transparent about being an assistant is good practice and reduces friction.

+What does it cost per month?

Add three lines: Meta conversation rate, model tokens, and infrastructure. In medium volume operations, the cost per resolved conversation is usually well below the cost of the same service provided per person.

+Can you use the same number for the human team?

Yes, with a shared inbox linked to the Cloud API. The agent answers first and the attendant takes over the conversation when the handoff triggers, on the same wire.

Want to discuss this architecture for your product? Get 30 minutes with our technical team, free of charge.

Talk to an engineer

OUR FACTORY

Inside our factory

Everything you need to build, maintain and automate real software, under a single team.

01 · Agents

Custom AI agents

Agents trained on your business knowledge to qualify leads, support customers and operate 24/7.

  • LLMs + your own data
  • WhatsApp, Web and API
  • Wired into your CRM
02 · Build

MVPs from zero to launch

From validation to delivery. Modern, scalable architecture designed to grow with your business.

  • Discovery + Design + Dev
  • Modern stack (React, Node, Cloud)
  • Go-live in weeks, not months
03 · Run

Web application support

Maintain, evolve and scale products in production with a dedicated squad, clear SLAs and zero headaches.

  • Dedicated monthly squad
  • Monitoring + fixes
  • Continuous evolution roadmap
04 · Automate

Process automation

We connect systems, remove manual work and give hours back to your team to focus on what matters.

  • SaaS-to-SaaS integrations
  • Workflows with n8n / Make
  • Measurable ROI

Behind the scenes

Behind every delivery, a team standing shoulder to shoulder with founders.

Moments from the Acelerabit team alongside founders and clients turning ideas into live products.

Why Acelerabit

Builder-first. No theatre.

An engineering team that ships real product. No agency layers, no middlemen, no rework.

7+ years accelerating startups

Real experience building MVPs and SaaS for founders. We know what to cut to validate fast without burning runway.

Our own BITLAB method

A protocol that structures every project from discovery to deploy, with real-time visibility into each delivery.

We build our own products

We're a software house that is also a product owner. We know how to build because we live it every day in our own SaaS.

The BITLAB Method

Precision engineering, from brief to deploy.

01

Discovery

We map business, users and metrics, then define the minimum viable scope.

02

Design

Technical architecture and UX prototyped before the first line of code.

03

Build

Short sprints, weekly releases and continuous feedback through our own tool.

04

Launch

Deploy, monitoring and post go-live tuning. Ready to scale.

Stories and products

Accelerated stories.

Products we built from scratch, maintain and scale, including our own AI agent.

Loopilot

Powered by Acelerabit

It qualifies. You only step in to close.

WhatsApp support + CRM + AI in one platform. Tailored by our team and ready to run in your operation. True omnichannel, conversation memory across channels, 24/7.

Result

Qualified leads in seconds, no queue and no opportunity lost outside business hours.

Explore Loopilot
Loopilot interface showing AI conversations
Alcance AI agent architecture: WhatsApp support flow
Alcance logo

AutoTech · AI for sales

Alcance

Digital transformation of an ecosystem with 4,000+ motorcycle salespeople in Brazil. Today AI sits at the heart of their support and sales.

Projects together

  • AI agents for support and sales: AI applied to inbound support, sales, prospecting and reactivation. 24/7, at scale.
  • 4,000+ salespeople ecosystem: A nationwide community of motorcycle salespeople supported by the agents and flows we built together.
  • Internal process automation: Where the relationship started: efficiency in operational and administrative routines.
Multimentoring interface: corporate mentoring program
Erlich logo

Corporate mentoring

Erlich

Organizational mentoring products used in day-to-day operations. Peer matching, development tracking, assessments and session records, all in one place.

Projects together

  • Multimentoring: Started as internal automation to unblock operations and became an end-to-end organizational mentoring platform.
  • Mentor Pilot: Boosts mentee outcomes and gives mentors real visibility.
QVende interface: hiring pipeline kanban
QVende logo

HR Tech · Sales recruiting

QVende

A recruiting platform for sales teams. Fit-based screening, stage kanban and full candidate management, from résumé review to final decision.

Projects together

  • QVende: Sales recruiting and selection in a living kanban.
  • Currículo Express: An AI agent that generates ready-to-send résumés in minutes.
  • Jobs portal: White-label version running at CREA-RN.

Other projects

FinTech · Personal credit

Kredia

A startup in the banking correspondent space on a mission to industrialize personal credit sales. We built several AI agents specialized in credit products that work the closing stage and help reps convert more deals.

AI

HealthTech · Corporate wellbeing

LifeSprint

A corporate healthtech producing health reports by hand, spreadsheet by spreadsheet. We automated the journey with custom questionnaires, reducing illness and raising quality-of-life scores at scale.

Startup

FinTech · Financial education

Bolo no Bolso

A financial education app we inherited from another shop that needed maturity to scale. We ran an end-to-end optimization, added more intelligence to the product and support the active customer base using it today.

Startup

HealthTech · Fundraising and management

Liga Contra o Câncer

A leading oncology institution that had to unblock fundraising and finance at once. Our discovery produced a gamified fundraising model based on physical activity, and an on-demand squad then built the finance system.

Consulting

HealthTech · School health

Bud Saúde

A school-health startup that needed operational muscle for its nursing and medical team. We built the platform that structures student health tracking and management in the school's daily routine.

Startup

AgroTech · Management BI

Baraúna Soluções Biológicas

A biological-solutions manufacturer for agriculture running its entire operation in Excel. We led the end-to-end digital transformation, planning the ecosystem and delivering a web platform, mobile app and management dashboard that supports decisions at the mills.

ConsultingInternal automation

Testimonials

The founders who accelerated with us say it best.

Founders and operators who trusted their products to Acelerabit and built real businesses.

The Acelerabit team understood not just the problem we posed, but the entire business. The project turned out fantastic!

Marcelo Bandiera

Marcelo Bandiera

CEO · QVende

Let's build

Let's design your next step.
Free strategy session.

A 30-minute conversation with our engineering team to understand your product, validate scope and map the shortest path to results. No strings attached.

Book your strategy session

No forms, no waiting. Talk straight to our engineering team on WhatsApp and pick a time.

Book a strategy session

Typical reply within minutes