Inspiration
Everyone has a driving test horror story. We wanted to build the examiner from our nightmares: Examiner Dolores Krumm, 31 years at the Illinois DMV, zero first-time passes, and she can hear everything you say.
What it does
DMV: The Final Exam is a 3D driving test with a live ElevenLabs voice agent in the passenger seat.
- Pre-drive inspection, in first person. You sit in the car and must do seven checks in the right order: seatbelt, three mirrors, ignition, headlights, handbrake. Dolores says the order out loud, tells you each next step when you get one right, and insults you when you get one wrong. Nothing on screen gives away the order, so you have to listen to her. The radio, the horn, the glovebox, her coffee and Dolores herself are all traps.
- The road test. A golden-hour suburban loop that is very hard on purpose: a 15 mph school zone with a cone slalom, a minimum 45 mph zone through the bends, a stop sign hidden behind an oak tree, a 7 mph quiet zone, mirror checks every 9 seconds, and Ethel, a pedestrian who does not look before crossing.
- Every mistake costs points, written onto her clipboard with a buzzer and a pen scribble while she reacts in one withering sentence. Hold T to talk back, at your own risk: "um" costs 2 points, apologising costs 3, and complimenting her is −15 for attempted bribery of a state official.
- The verdict. A FAILED stamp (it's always FAILED), an official classification such as "Legally a pedestrian", and her final word.
How we built it
- ElevenLabs Agents platform: Dolores is a conversational agent with a system prompt, a first message and a knowledge base, connected from the browser over WebRTC with the
@elevenlabs/clientSDK. - Voice Design: her voice was generated from a text description ("weary, deadpan, middle-aged government clerk...").
- Knowledge base: a summary of Illinois Rules of the Road signs and rules, so she can quote the law at you.
- Client tools:
dock_pointslets her take points off for what you say, andshow_signputs a road sign on screen for a pop quiz. - Sound effects API: the buzzer, pen scribble, horn, rubber stamp and crash were all generated with ElevenLabs.
- The game: three.js and Vite. The game streams telemetry to the agent (infractions, speed, zone changes, inspection steps) as messages, and she reacts to them live.
Challenges we ran into
- The room kept interrupting her. At a busy build night the open mic picked up everyone around us, so Dolores kept getting cut off mid-sentence and eventually went silent. We switched to push-to-talk: the mic stays muted unless you hold T.
- Timing a voice agent against a game. Sending every event the instant it happened made her talk over herself. We batch infractions, wait for her to finish speaking, and give instructions priority over commentary.
- The first-person cockpit. The car's exterior body box became a flat "floor" at seat height in first person, so we built a separate interior with a real footwell for the inspection.
What we learned
How to drive a voice agent from game state: client tools for the agent to act on the game, user messages for the game to make the agent speak, and contextual updates for things she should know without saying.
What's next
More examiners (the overly enthusiastic F1 commentator, the backseat-driver grandma), parallel parking, and highway merging, which Dolores's late husband Gerald also could not do.
Built With
- agents
- ai
- code
- elevanlabs
- vibe