All posts

1 July 2026 · 7 min read

Running a WhatsApp agent in production: setup, upkeep, and pitfalls

The work is not the first message. It is reconnection, state durability, cost ceilings and the guardrails that stop your number getting flagged.


Running a WhatsApp agent in production is an operations problem wearing an AI costume. The first message is easy. The ninetieth day is the test.

Upkeep, ranked by how often it bites

  • Reconnection after a dropped link — and alerting the user, because a silent disconnect looks exactly like a quiet week.
  • Media handling: voice notes, images and PDFs arriving faster than you transcribe them.
  • Timezone and DST correctness for every scheduled thing you own.
  • Cost drift as chat volume grows, especially for anything that classifies every inbound message.
  • Model and dependency upgrades that quietly change behaviour your rules relied on.

The guardrails you cannot add later

Bulk-send caps, bulk-delete caps, and outright refusal of mass group-adds have to be in the send path from the first commit. Bolted on afterwards, they are always circumventable — usually by the agent itself, splitting the work across turns to be helpful.

Cheap gates before expensive models

Do not send every message to a large model. Match exact triggers with plain code, use a small classifier as the gate for anything requiring judgment, and reserve the expensive path for work that has already earned it. This is the difference between a hobby bill and a business one.

Observability without surveillance

If you promise no activity logs, you cannot debug by reading conversations. That constraint is workable: keep structured, non-content telemetry on the control plane only, and make debugging inside the user's environment something the user's own agent performs on request.

Try KKHS Assist

Your Executive Assistant on WhatsApp. 14 days free, then ₹1,099/month.

Get Access
NextSelf-hosted WhatsApp agents: how to set one up and why most setups break