← Home

AI Apprentice: a voice agent that asks an expert why

Work Map: every step links the screen moment, the decision, the expert's words and the guardrails

The part of AI Apprentice I would reuse is a storage format: every rule an expert explains is saved twice, in her words and as a when → must check, and one JSON file drives a tutor, an agent and an export. The evidence behind it is thin. The 23-of-23 eval is one scripted scenario with Gemini playing the expert, and personal data is masked only after a changed frame has already reached Gemini.

The short version

The brief

Hack-Nation’s 7th Global AI Hackathon ran from Saturday 3 October to a 06:00 PT deadline on Sunday 4 October 2026, online and through local hubs; I worked from the Stanford hub at the Nordic Innovation House in Palo Alto. I took Challenge 01, set by ElevenLabs, “The AI Apprentice”, and built it in about 18 hours in a team of two.

The brief came with one scene. Sabine has run accounts payable at a machine builder for 24 years. She moves one invoice to capex without a word, holds a second because that supplier double-bills every December, and sends a third for a second approval because it comes from the Czech subsidiary. Lena, who started on Monday, catches half of it. Sabine retires in 18 months.

A screen recording shows what Sabine clicked and says nothing about why. The brief asked for three working modules: a capture session where a voice agent asks at least three questions at natural pauses, one of them about a guardrail; a debrief with at least three follow-ups and a teach-back the expert confirms; and a tutor that catches at least one wrong decision before it is saved, on a case the expert never showed. “Interrupts mid-typing” and “summary written afterwards” were listed as the weak answers.

What I built

One Next.js 16 app with a sandbox accounts-payable screen full of invented data, an ElevenLabs agent, and Gemini for vision and synthesis. The server pipeline runs on Effect 4 (typed errors, retry, timeout, key rotation), the schemas are Effect Schema, and the session lives in the browser’s IndexedDB.

The part I would build again is how guardrails are stored. The synthesis writes each rule twice: in the expert’s words and as a check. That one JSON file feeds three consumers. The tutor’s checker runs it against the new hire’s screen state. It exports as instructions an agent can load. And in the stretch module, an agent works a queue of five new invoices from it: codes the €6,400 spindle to capex with the asset number from the invoice text, holds the December freight bill, saves the routine one, and stops at a supplier the expert never mentioned, with a button for the controller to approve and continue.

pnpm eval drives the real ElevenLabs agent over a text-only WebSocket, with Gemini playing the expert and scripted screen events, then checks the brief’s requirements as invariants: at least three questions at pauses, never asking what the screen shows, every Work Map step with a frame, quotes verbatim, the off-the-record part absent, the tutor stepping in before the save. The last run passed 23 of 23. Letting a model play the human turned “did the agent ask at a natural pause” into something a script can assert at 2 a.m. The same run writes the demo session a judge without a microphone sees.

What does not hold yet

Demo and result

The project went in at 00:32 PT, the Google Form at 00:38, with three videos of 29, 39 and 43 seconds narrated with ElevenLabs text-to-speech. The rest of the night went to keeping the demo alive for judges who would open it later. A full capture run needs about 30 Gemini requests, so the server rotates over five models and two keys, and a Keys button lets a visitor paste their own ElevenLabs and Gemini keys, stored only in their browser. From 01:50 PT I stopped running smoke tests so the remaining quota went to the judges, and watched production until the deadline: every page answered 200 for four hours.

How this was put together

Written from the repo and its docs (README, plan, pitch, demo script, the challenge brief, the eval case). I wrote the code; my teammate tested it and played the new hire in the demo. The submission went to the HackOS platform: three videos of up to 60 seconds each, a team photo, a public repo and a live URL, plus a separate Google Form. Placement and judges’ feedback were not recorded, and I kept no survey of the other Hack-Nation submissions, so there is no field to compare against here.

The same Sunday, a few hours later, I built neon-personal-agents-life2film-director-2026, where a user’s corrections become durable rules for a video agent: the same idea pointed at taste instead of procedure. Masking personal data on the device, before anything leaves it, became the whole product in superset-hackathon-consentshield-2026. Every event: hackathons.

Links: repo · live demo · architecture page · related: schema-guided-reasoning.

Related