All projects

AVA

A WhatsApp lead-qualification agent, ported from a 74-node no-code workflow to a real service.

2026 · Solo build — the graph, the structured-output contract, the stage machine, and the port itself.

PythonLangGraphOpenAIPostgreSQL

The problem

Inbound leads arrived on WhatsApp and were qualified by a 74-node visual workflow. It worked, but every message cost three model calls, a failure halfway through booking could double-book a calendar, and changing the model meant editing the canvas by hand.

What it does

The same conversation — identity, problem, services, vision, budget, meeting — rebuilt as a LangGraph service with a stage machine, a qualification gate, and a meeting flow that books a call once the budget threshold is met.

Engineering decisions

Three model calls collapsed into one

The original workflow ran a small language detector, the agent itself, and a second model to repair malformed output. Language became a field on the structured-output schema and the provider enforces the schema, which removes the other two calls entirely. Roughly sixty to seventy percent off per message, for a change that made the contract clearer rather than more clever.

The booking flow is a graph with no model in it

Scheduling a meeting involves no reasoning, so nothing in that subgraph calls a model. It's a graph for one reason: if the brief document fails to generate after the calendar event already exists, it resumes at the failed step instead of booking the meeting a second time. Idempotent resumability was worth the structure; nothing else there was.

Business choices live in the database, not the environment

The environment file holds infrastructure only — connection strings, keys, port. Which model to use, the budget floor, the WhatsApp number and the message templates all live in a config row that's re-read on a timer. Swapping the model is an UPDATE, not a deploy, and a failed reload keeps the last good config rather than interrupting a live conversation.

Where it landed

  • Six-stage qualification run end to end on WhatsApp, in the lead's own language
  • ~60–70% lower model cost per message than the workflow it replaced
  • Booking is resumable, so a mid-flow failure can't produce a duplicate meeting
  • Model, budget floor and templates change without a deploy