Agents & MCP · A staffing platform · 2026
A voice agent that takes a job order by conversation
A realtime voice assistant that interviews a hiring manager and fills a structured job order as they talk, plus AI-suggested interview questions. Built in forward-deployed work.
Hiring managers can describe a role out loud and review a filled, structured job order. The model writes nothing directly: every value passes code-side guards first.
- Role
- Forward-deployed AI engineer
- Stack
- OpenAI Realtime API · WebRTC · Function calling · Vue · Nuxt · Laravel · PHP · TypeScript · Vitest · PHPUnit
Context
A staffing platform asked for a faster way for clients to raise a job order. The order is a long form: role, reason for the hire, headcount, start date, location, hours, duties, success criteria and more. I built a voice assistant that asks for this in conversation and fills the form as the client talks. In the same engagement I built AI interview-question suggestions for the hiring pipeline.
The problem
A speech model is good at conversation and bad at being a database. It mishears, it fills gaps with plausible guesses, and it tends to wander or loop. The job order feeds recruiting work downstream, so a confident wrong value costs more than a blank one. The client also needed to be able to talk naturally: answer two questions at once, correct an earlier answer, ask "what do most people do?" in the middle of a question.
What I built
A server endpoint mints a short-lived credential and configures a realtime session: the persona, the tool schemas and a snapshot of the form so far. The browser connects over WebRTC, with a data channel for events and tool calls.
The model has a few narrow tools. One saves every field the client's last answer gave, in a single call, with the client's own words for each value. Others record the answer to the recap card, match a named team member for a replacement hire, and hand back a question the client asked so the app can say what the model may answer.
The browser app owns the state. An intake planner in code decides the next question from what is still empty, so the order of questions never depends on the model's memory of the conversation. When the record is complete, a recap card reads it back. On the review page, every field the voice filled is highlighted so the client checks those first.
For the rest of the hiring flow, I built an assistant that proposes interview questions through a tool, each with poor, good and excellent sample answers for the interviewer to score against. A person approves before anything lands on the order.
How it works / key decisions
- Provenance before acceptance. Every value the model sends must carry the client's words, and code checks those words against what the client actually said. A value without that evidence is rejected, not saved.
- Rejections say why. A rejected value comes back with a reason code: not understood, outside policy, or invalid. The model can then say the right thing instead of a generic "sorry, I didn't catch that".
- Corrections are explicit. An existing value changes only when the tool call marks it as a correction. That stops a later, vaguer answer from overwriting a good one.
- The planner is code. The model asks the question it is told to ask. A narrow follow-up is asked once, and a field still empty after that goes to the recap card as still needed, so the conversation can't loop.
- Turn-taking tuned for read-backs. Voice activity detection runs on the server, and the model finishes its sentence when the client talks over it, so a cough or an "mm-hm" doesn't cut off a recap.
Results
The voice intake went through repeated rounds of simulated client conversations. Each round's failures became fixes and unit tests for the guards, the planner and the transcript handling. It then went out to beta clients, and their feedback ran through the same loop.
What I'd do next
I would turn the simulated-client rounds into a standing regression suite that scores every prompt or model change on field accuracy and on how many questions it took to finish.