Context
Restaurants, massage studios, nail salons and pet groomers run by Chinese-speaking owners in the UK miss calls because everyone is working. Missed calls are missed bookings. Existing phone bots are English-only, generic, and need a developer to configure. Kelay is a receptionist you set up in a form.
Constraints
- Non-technical owners. Setup had to be a wizard, not a config file, and the owner had to hear the agent before going live.
- Retries everywhere. Telephony webhooks retry, so storing a call had to be idempotent: the same event processed twice must never create a second record.
- Two languages. Many callers are more comfortable in Mandarin; the same agent had to handle English and Mandarin.
- Two founders, no funding. Every component had to be a managed service with a free tier until pilots paid.
My role
Everything technical: multi-tenant data model, authentication, onboarding wizard, Retell agent provisioning, tool implementations, webhook handling, subscription billing, the owner dashboard, and the test calls used to tune the agent.
Architecture
- Tenants own their services, staff, opening hours and a booking calendar in PostgreSQL (Drizzle). Industry templates (
verticals) seed sensible defaults. - Onboarding wizard collects the business profile and, on completion, provisions a Retell agent with a generated prompt and a set of tools. The owner places a browser test call before going live; Twilio number provisioning is built and waiting for its first live run.
- Tools exposed to the agent: check availability, book, amend (reschedule or cancel), find a booking, and table availability and booking for restaurants. Each is an HTTP endpoint the agent calls with a shared secret.
- Call storage: recordings, transcripts and outcomes are stored per call with an upsert keyed on the Retell call ID, so a retried webhook never creates a second record.
- Billing is Stripe subscriptions and minute top-ups. The agent is told never to take payment on the phone; deposits are on the roadmap.
Three decisions
1. Provision agents from data, not by hand. The agent prompt, voice and tool set are generated from the tenant record. Change the opening hours and one click brings the agent up to date. This is what makes onboarding a form instead of a service engagement.
2. Idempotency where retries land. Telephony providers retry webhooks. Call storage is an upsert keyed on the provider's call ID, so processing the same event twice is harmless: one invariant instead of a class of duplicate-record bugs.
3. Choose the model on measured latency. Early test calls felt slow. I compared models on how quickly they answered in real test calls and kept the faster one (GPT-4.1) over a newer model that looked better on paper. On a phone line, a pause sounds like a broken line.
Outcome
- Pilot-ready: a business can sign up, configure its agent and hear it on a test call in one sitting; restaurants are the first market.
- One agent handling English and Mandarin.
- Booking, rescheduling, cancellation and table bookings completed in-call without a human.
What I'd do differently
Build a call-replay tool first. Replaying a recorded call against a new prompt or tool version, offline, would have saved days of test calls; it is the pattern I would start any voice product with.
Stack
Next.js, TypeScript, PostgreSQL on Neon, Drizzle, better-auth, Retell (GPT-4.1), Twilio, Stripe, Resend.