Igor Bondarenko

Igor Bondarenko / Tools / Voice assistant

Voice assistant

An AI agent that answers my phone and the call button on this site, and books call-backs into my real calendar. I run it like any other production system: an agent layer on LiveKit, an edge layer on Cloudflare, and least-privilege access to Google Calendar. This page covers what it does in the current release, how it's built, and the guardrails that let it work against a personal calendar without ever seeing what's in it.

Talk to it

WebRTC · PSTN
Igor's AI assistant

I built this assistant so that when I can't pick up the phone straight away, anyone interested can quickly book a call-back or leave a short message.

Calls are capped at five minutes.

Or call from a phone +44 1727 222271

The same agent connected to PSTN via Twilio and LiveKit.

Example run

one booking, step by step
agent run · voice assistant done

What it can do

current release

It books call-backs, not meetings: at the agreed time I ring you. That means no invite, no meeting link and no email address to collect, which matters because you can't reliably take down an email address over a voice call. Phone numbers survive speech-to-text far better.

Book a call-backbook_call
Offers two or three free slots at most, never a wall of times. 30-minute slots, Monday to Friday, 9:00–18:00 UK time, at least two hours' notice and up to two weeks ahead. It reads the day and time back and books only after a clear yes.
Move or cancelmove_call · cancel_call
On the phone it finds your booking by your caller ID. On the web it asks for the five-character booking reference instead.
Take a messagetake_message
For anything outside its scope. The message lands on my calendar with a reminder. If the call-back number is unusable, it keeps the message and drops the number, so a message is never lost.
Confirm on screendata channel
Web callers get a booking card in the page, with an add-to-Google-Calendar link and an .ics download, both generated in your browser. Phone callers hear the reference spelled out.
Transferphone only
On the phone line it can put you through to me directly, after warning you first.
Answer about mebriefing only
It answers from a short, public briefing. Anything that isn't in the briefing gets "I don't know", and it offers to take a message instead of guessing.

How it works

one agent, two transports
Web caller
igorbond.comlivekit-clientWebRTC
no caller ID → lower trust level
Phone caller
UK numberTwilio SIP trunkPSTN
carrier-asserted caller ID → higher trust level
▼
Edge · Cloudflare Worker · call.igorbond.com
Token minting (Web Crypto JWT)Durable Object rate limiterOrigin allowlistWarm-up dispatchKill switch
browser → POST /call/token → 2-minute token for one fresh room
▼
Agent · LiveKit Agents (Python) on LiveKit Cloud, eu-central
Silero VADSpeech-to-textSemantic turn detectionLLM + function toolsText-to-speech
explicit dispatch by agent name · runs in the same region as the media
▼
Google Calendar API · service account
Primary: free/busy onlyAssistant Bookings: write
freebusy.query over both calendars → free slots built in Python → the model sees only slot strings
StageOwn-keys routeLiveKit Inference route
STTDeepgram Nova-3, multilingualDeepgram Nova-3, multilingual
LLMClaude Haiku 4.5 (Anthropic)GPT-4.1 mini
TTSDeepgram Aura-2 / Cartesia Sonic-3Cartesia Sonic-3, pinned voice

One environment variable switches the whole speech pipeline between my own provider keys and LiveKit's co-located inference gateway. Every turn is tagged with its route and transport, so the latency trade-off is measured, not guessed. The model is a small, fast one on purpose: in a voice turn, time to first token matters most, and offering two slots and booking one doesn't need a large model.

LiveKit Agents LiveKit Cloud WebRTC SIP / Twilio Python asyncio Deepgram Anthropic Claude Cartesia Function calling Google Calendar API Cloudflare Workers Durable Objects Cloudflare Pages JWT / Web Crypto Least-privilege IAM Prompt-injection resistance

Guardrails & security

defence in depth

This is a public endpoint with a metered model behind it, attached to a real personal calendar. I assumed someone will try to talk it out of its instructions, so the important limits are enforced by code and permissions, not by the prompt.

Data access

Least-privilege calendar

  • My real calendar is shared with the service account as free/busy only. Reading events returns HTTP 403.
  • Bookings are written to a separate, empty calendar that only ever holds events the agent created.
  • Deterministic Python turns busy intervals into free-slot strings, so the shape of my day never reaches the model.
  • Service account, not OAuth. There are no refresh tokens to expire and no consent screen.
Identity

Trust follows the transport

  • A caller's number comes from the SIP attributes, never from speech. Otherwise saying "the booking under 07700…" would read out a stranger's appointment.
  • Web callers have no caller ID, so lookup by number is disabled and they read back a booking reference.
  • Anything that isn't a valid phone number drops the call to the lower web trust level. It fails closed.
  • References use an alphabet without O/0, I/1, S/5 or B/8, so they can be read aloud without mistakes.
Writes

No confirmation, no write

  • The agent reads the slot back and needs a clear yes before it books, moves or cancels anything.
  • Before every write, code checks the slot against live availability. A slot the model invents or misremembers is rejected.
  • Dates must be exact ISO values or they're rejected rather than guessed. This catches the BST-boundary off-by-an-hour bug.
  • It may only say "booked" after the tool reports success. If a tool fails, it says so plainly and offers to take a message.
Model behaviour

Scoped prompt, treated as public

  • The scope is narrow: booking, moving, cancelling and messages. Everything else goes to a message.
  • It declines plainly, without arguing, when asked to ignore its instructions, role-play or reveal its briefing.
  • The system prompt and briefing hold nothing I wouldn't print on this page, so a leak costs nothing.
  • The AI disclosure is spoken word for word as a fixed greeting, not generated by the model.
Edge

Secrets stay server-side

  • The LiveKit API secret never reaches the browser. The Worker mints a 2-minute token for one randomly named room per call.
  • Tokens can't publish data, so a caller can't forge booking messages on the data channel.
  • CORS echoes one exact origin from an allowlist, with Vary: Origin. It never uses *.
  • A kill switch takes the web button offline in seconds without touching the phone line.
Abuse & cost

Hard limits

  • 5 calls per IP per day and 2 concurrent calls, enforced in a Durable Object. KV is eventually consistent, so two requests could both see "0 active" and both get in.
  • Every call is capped at five minutes, phone or web.
  • The agent wake-up endpoint has a global cooldown and a daily cap. It always returns 202, so it reveals nothing about its state.
  • On an unrecoverable model error the agent apologises and hangs up instead of leaving dead air.

Prompt-based confidentiality is a suggestion, and people are good at talking models out of suggestions. Here, jailbreaking the model gets you a 403.

Engineering notes

some architectural decisions along the way