ProjectBuild an AI Voice Receptionist: the explanation · Module 11: The agent: tools, identity and confirmation · part 13 of 23
Part 13 · Module 11: The agent: tools, identity and confirmation
Module 11: The agent: tools, identity and confirmation
23 min read·
About 50 minutes · Needs: Module 2 (the voice loop and tool calling), Module 7 (slots and safe booking), Module 10 (language handling) · Code: backend/app/agent/graph.py, backend/app/agent/tools.py, backend/app/agent/runtime.py, backend/app/agent/events.py
Where this fits
The agent (blue: this module) turns each caller turn into model calls and tool calls, and keeps the call's memory in Postgres.
The voice session hands the agent one caller turn as text, with its language. The agent decides what to do, calls the model and the clinic tools, and streams checked speech back. It is the only part that can change an appointment, so it is also where the rules about identity and confirmation must hold, whatever the model says.
The rest of this project is yours to keep
This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.