2026-09-24

Dropping the agent framework

The first version of a WhatsApp booking assistant I worked on ran on an agent framework. It worked, and it was also framework-heavy, had no tests, had no evals, had no Chatwoot integration wired up, and came with a scraping pipeline complicated enough that nobody wanted to touch it.

The rebuild started from a one-page plan whose key decision was blunt: no framework. No ADK, no CrewAI, no LangGraph.

The shape of the replacement

WhatsApp → Twilio → Chatwoot (self-hosted) → agent-bot webhook
  → intent classifier (fast, cheap model)
  → router (plain Python)
  → handler (conversational model) + tools (database queries)
  → reply through Chatwoot

Nothing in that diagram needs a framework. Each box is a function I can put a test around.

What “no framework” bought

Multi-tenant from day one

Each business gets its own Chatwoot account, and a table maps that account to the tenant. The webhook resolves the tenant before anything else runs. Retrofitting tenancy into a single-tenant agent is the kind of change that touches everything.

Composable configuration

The other lesson was about where the agent’s behaviour lives. Business info, tone and FAQs could be edited through an API, but the agent’s identity and its guardrails were baked into Python strings, so changing a rule meant a deploy. I split behaviour into independent pieces (identity, personality, rules, knowledge) so each can change without touching the others.

The operational booking backend and the agent’s database also stay separate systems with no sync. Each is populated on its own, and the dashboard resolves a user to their business with a single lookup, which avoided a synchronisation problem I did not want to own.

Planning it

The plan had five phases, each with a milestone I could check from a terminal: a curl returns a formatted reply; a WhatsApp message round-trips through Chatwoot; a website URL populates every tenant table; pytest and the eval runner pass; docker compose up brings up a first business end to end. Milestones you can run keep a rebuild honest.

When I’d still reach for a framework

I wouldn’t say never. If the workflow is genuinely long-running, needs durable pause and resume, or has many cooperating agents, a framework earns its weight. A chatbot that classifies, replies and calls a few tools isn’t that.

← All posts