Voice AI Foundations
Build a dental clinic AI receptionist from scratch
Build a dental clinic receptionist from scratch — greets callers, answers FAQs, checks appointment availability, books appointments, and handles edge cases. Your complete introduction to voice AI on LiveKit.
What You Build
A dental clinic receptionist that greets callers, answers FAQs, checks appointment availability via tool calls, books appointments by collecting patient name/time, confirms bookings, handles edge cases. Deployed to LiveKit Cloud and testable from Playground.
Prerequisites
- →Python 3.10+ or Node.js 20+
- →Basic programming
What is voice AI? Why WebRTC matters
15mThe STT→LLM→TTS pipeline, latency budgets, and why WebRTC is the only transport that works for real-time voice AI. Pipeline vs realtime models.
Project setup & your first agent
20mInstall the CLI, scaffold the dental receptionist project, understand the generated code, run your first agent, and speak to it in Playground.
Understanding AgentSession
20mThe AgentSession lifecycle, configuring STT/LLM/TTS models, VAD setup, and the events that let you react to everything happening in the conversation.
Writing great agent instructions
15mVoice prompting is different from text. Learn the structure: Identity → Output rules → Tools → Goals → Guardrails. Hear the difference.
Adding your first tool: check availability
25mDefine @function_tool for check_availability. Type hints become schema. Docstrings become descriptions. Watch the LLM call your tool in real time.
RunContext, state & the booking tool
25mBuild the book_appointment tool with RunContext for state, wait_for_playout for confirmation speech, ToolError for failures, and interruption control.
Noise cancellation & room configuration
15mConfigure RoomOptions with noise cancellation, audio input options, linked participants, and room lifecycle management.
Testing your agent
25mBehavioral tests with pytest. Run agents in test mode, assert on messages and function calls, use judge() for intent matching, mock tools for error paths.
Turn detection deep dive
20mVAD-only, STT endpointing, multilingual turn detection. Configure interruption handling, false interruption recovery, and backchanneling.
Conversation context & multi-turn state
20mRead and manipulate the conversation context. Inject returning patient info. Trim context to stay within token limits.
Beyond audio: the data plane
20mSend booking confirmations via text stream, appointment details via byte stream, and track conversation state with participant attributes.
Deploy to LiveKit Cloud
20mCreate the agent on Cloud, configure the Dockerfile, set secrets, deploy, and monitor with Cloud Insights transcripts and traces.
Polish & production readiness
20mText transforms, prompt guardrails, away timeout, data hooks, cached TTS greetings, background audio, and a complete project review.
What You Walk Away With
Deployed dental receptionist with appointment booking, noise cancellation, adaptive turn detection, behavioral tests, data plane integration, and production error handling. Full understanding of rooms, sessions, agents, tools, context, turn detection, testing, and deployment.