Classifying WhatsApp HR messages with a router agent.
Our biggest win on GoPeople wasn’t a smarter answer — it was a smarter router. We split intent classification from response so each agent stays cheap and inspectable.
GoPeople team
WhatsApp HR

When we launched GoPeople we built one big agent that read the message, figured out what the employee wanted, and answered it. It was clever. It was also expensive, slow, and impossible to audit. Splitting that one agent into a cheap router and a small zoo of workflow agents gave us back the latency budget — and it gave HR an actual log of what we did.
One brain is too many brains
The all-in-one agent was using a top-tier model on every turn, even for messages like ‘yes’ or ‘bana izin günü kaldı mı?’. It was also conflating two completely different jobs: deciding what kind of request this is, and serving that request. Those want different prompts, different tools, and very different cost profiles.
The router agent
Our router agent is a small, fast model that does one thing: classify the message into one of N intents. It returns a label and a confidence. If confidence is below a threshold, the orchestrator escalates to a clarification agent — never to a workflow agent. Workflow agents only ever see classified intents.
// Router output is a value, not a sentence.
type Intent =
| "leave.request"
| "leave.balance"
| "payroll.payslip"
| "doc.request"
| "policy.lookup"
| "smalltalk"
| "unknown";
const { intent, confidence } = await router.classify(message);
if (confidence < 0.6) return clarify(message);
return workflow[intent].run(message, ctx);Why this routing pattern wins
- The router is cheap. We can afford to call it on every message, even ‘ok’.
- The workflow agents are dumber. They don’t need to second-guess intent — that decision is upstream.
- Clarification has its own agent. We don’t pollute leave-request prompts with ‘maybe ask the user what they meant.’
- Auditing is trivial. The audit log shows the intent, not just the reply, so HR knows what the system thought we were doing.
Multi-tenancy at the router
Holdings often run multiple sub-companies under one WhatsApp number. The first decision the router makes isn’t intent — it’s tenant. We classify the employee against the directory before we run the intent classifier. That way each sub-company’s policies, leave balances, and payroll lookups are isolated by construction.
What we measured
After moving to the router pattern, our average cost per message dropped by ~3.4x, and HR auto-classification rate climbed past 94%. Edge cases still escalate to a human, but the human now sees the system’s best guess — they’re reviewing, not re-doing.
“The biggest model isn’t a router. The smallest, cheapest, fastest model is the router.”