← Selected work
In production (client work)

Vapi · TypeScript · Netlify Functions · Cal.com API · Twilio · Resend · n8n

AI voice agents

Phone agents for local service businesses that answer, check real availability, book, and alert a person when an outcome is uncertain.

AI voice agents: architectureCaller to Vapi agent; Vapi agent to Tool endpoint (tool calls); Tool endpoint to Cal.com; Tool endpoint to SMS / email; Vapi agent to Lead record (call report); Lead record to Team alerttool callscall reportCallerphone numberVapi agentvoice + LLMTool endpoint4 allowlisted toolsLead recordBlobs, ETag mergeCal.comavailability, bookingSMS / emailcaller's number onlyTeam alerthot lead / follow-up
Scroll sideways for the full diagram →

The problem

Small service businesses miss calls and leads after hours. A voice agent has to book real appointments, follow up by text, and never claim it did something it didn't, while staying inside consent rules for texting and calling.

Key decisions

A thin, allowlisted tool layer
The agent sees four business-level tools (capture lead, get availability, book, send follow-up), never the calendar, SMS or email providers directly, so a provider can change without touching the agent.
Texts go only to the caller's own number
Never to a number the model supplies, and the tool takes no free-form message or URL. That keeps texting within consent rules and stops the agent from being used to message strangers.
Honest outcomes over confident ones
Every tool answers within 15 seconds. When a result is unknown or unconfirmed, the agent is told not to claim success and the team gets a follow-up alert; it never promises a callback it can't guarantee.
Safe repeats
Lead writes are ETag-conditional with retry, notifications carry a per-tool-call idempotency key and a per-channel cap, and the outbound caller lets only the first claim for a lead dial.

What I built

  • The tool and call-event endpoints as Netlify Functions, with lead records in Netlify Blobs and booking through the Cal.com API.
  • Follow-ups by SMS (Twilio) and email (Resend), and hot-lead and needs-follow-up alerts to the team, driven by the end-of-call report.
  • An outbound flow in n8n that calls new web leads only with consent, inside a 9am–8pm window in the lead's time zone, with a test-mode guard.

Verification

  • About 317 test cases across 16 files for the tool and event backend, including several review-round regression suites, plus a request-contract check script.
  • 22 offline unit tests and a 79-check live self-test for the outbound calling flow.

Links

Client deployments are private, so no client is named here. Happy to walk through the architecture and code in an interview.