JT / SAGE IDEAS Work with me

03 Evidence

Automation · Owned project · private repo

Automation that knows when to stop talking.

A bot whose one job is to qualify a visitor and book a call, with every guardrail placed before the model is allowed to speak.

Built + tested · deploy pendingCounted November 21, 2026

FinishedThe pipeline from webhook to human handoff is built and covered by 56 tests.NextDeploy behind a staging number and record a week of real traffic.

tests across 15 files
56
languages: English, Portuguese
2
qualifying questions, then a booking link
3

The problem

A chat bot on a business number can do real damage: reply twice to one message, keep messaging someone who opted out, run up an LLM bill overnight, or argue with a person who asked for a human.

I built the pipeline so each of those has a named stage that runs before any model call.

Constraints

  • WhatsApp may deliver the same message more than once.
  • Opt-out must win over everything else.
  • Model spend has a hard daily ceiling.
  • The bot never quotes a firm price.

Architecture

request path / whatsapp-conciergeBuilt + tested · deploy pending
Message to reply, guardrails first1. Webhook: verify signature, dedupe message id. 2. Postgres queue: worker claims the job. 3. Consent + opt-out: stop words end the thread. 4. Cost cap: daily LLM ceiling, rate limit. 5. Human handoff: operator ping, bot goes silent. 6. Qualify + grounded reply: 3 questions, then booking link01Webhookverify signature, dedupe message id02Postgres queueworker claims the job03Consent + opt-outstop words end the thread04Cost capdaily LLM ceiling, rate limit05Human handoffoperator ping, bot goes silent06Qualify + grounded reply3 questions, then booking link
Message to reply, guardrails first

Deduplication is a database constraint on processed message ids, so a redelivered webhook is a no-op rather than a second reply.

What shipped

  • Fastify webhook, Postgres-backed queue and a separate worker process.
  • Consent, cost cap, rate limit, handoff and a three-question qualifying state machine.
  • Grounded follow-up answers from an inlined knowledge base; a deploy runbook.

Evidence and receipts

What I would do differently

  • Deploy behind a staging number first and record a week of real traffic before tuning prompts.
  • Move CI to a self-hosted runner.

Honest limitations

01 Input

Next step

Bring an AI feature or workflow that has to keep working. We scope the first verifiable step on a 15-minute call, and I give an honest answer on fit either way.

Book a 15-minute call Not sure what you need? Answer 3 questions

Have a system that needs to work?

Tell me the problem. I will tell you honestly whether I am the right engineer for it.

Book a 15-minute call Run a free audit Not sure what you need? Answer 3 questions