Courses/Track 1: Foundations
1.1beginner4h 30m13 chapters

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
Chapters
01

What is voice AI? Why WebRTC matters

15m

The STT→LLM→TTS pipeline, latency budgets, and why WebRTC is the only transport that works for real-time voice AI. Pipeline vs realtime models.

STT→LLM→TTSWebRTCSFURooms+2 more
02

Project setup & your first agent

20m

Install the CLI, scaffold the dental receptionist project, understand the generated code, run your first agent, and speak to it in Playground.

LiveKit CLIlk agent initAgentServer@rtc_session+3 more
03

Understanding AgentSession

20m

The AgentSession lifecycle, configuring STT/LLM/TTS models, VAD setup, and the events that let you react to everything happening in the conversation.

Session lifecycleSilero VADTurn detectionModel config+2 more
04

Writing great agent instructions

15m

Voice prompting is different from text. Learn the structure: Identity → Output rules → Tools → Goals → Guardrails. Hear the difference.

System prompton_enter()generate_reply()Voice prompting
05

Adding your first tool: check availability

25m

Define @function_tool for check_availability. Type hints become schema. Docstrings become descriptions. Watch the LLM call your tool in real time.

@function_toolTool schemaArgumentsReturn values+1 more
06

RunContext, state & the booking tool

25m

Build the book_appointment tool with RunContext for state, wait_for_playout for confirmation speech, ToolError for failures, and interruption control.

RunContextsession.userdatawait_for_playout()ToolError+1 more
07

Noise cancellation & room configuration

15m

Configure RoomOptions with noise cancellation, audio input options, linked participants, and room lifecycle management.

BVC/BVCTelephonyRoomOptionsAudioInputOptionsLinked participant
08

Testing your agent

25m

Behavioral tests with pytest. Run agents in test mode, assert on messages and function calls, use judge() for intent matching, mock tools for error paths.

pytestsession.run()RunResultjudge()+2 more
09

Turn detection deep dive

20m

VAD-only, STT endpointing, multilingual turn detection. Configure interruption handling, false interruption recovery, and backchanneling.

TurnHandlingOptionsEndpointingAdaptive interruptionsFalse interruptions+1 more
10

Conversation context & multi-turn state

20m

Read and manipulate the conversation context. Inject returning patient info. Trim context to stay within token limits.

ChatContextupdate_chat_ctx()Context injectionContext trimming
11

Beyond audio: the data plane

20m

Send booking confirmations via text stream, appointment details via byte stream, and track conversation state with participant attributes.

Text streamsByte streamsParticipant attributesData plane
12

Deploy to LiveKit Cloud

20m

Create the agent on Cloud, configure the Dockerfile, set secrets, deploy, and monitor with Cloud Insights transcripts and traces.

lk agent createDockerfileSecretslk agent deploy+1 more
13

Polish & production readiness

20m

Text transforms, prompt guardrails, away timeout, data hooks, cached TTS greetings, background audio, and a complete project review.

tts_text_transformsuser_away_timeoutData hooksGuardrails+2 more

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.