ProjectBuild an AI Voice Receptionist: the explanation · Module 4: High-level design: processes, paths and state · part 6 of 23
Part 6 · Module 4: High-level design: processes, paths and state

Module 4: High-level design: processes, paths and state

23 min read·
About 45 minutes · Needs: Module 2 (the voice loop) and Module 3 (infrastructure and Docker Compose) · Code: backend/app/main.py, backend/app/voice/ws.py, backend/app/agent/runtime.py, backend/app/workers/worker.py, frontend/nginx.conf.template

Where this fits

WHERE THIS FITS The Medilane voice receptionist this module CLIENT React API LAYER FastAPI SAFETY SPEECH IN BRAIN LangGraph SPEECH OUT KNOWLEDGE AND DATA pgvector OPERATIONS Langfuse, Prometheus Caller app browser mic Staff app desk and admin REST API staff, sessions Voice socket audio both ways Auth + RBAC staff roles, voice tokens Guardrails emergency, PII VAD Silero, turns Whisper speech to text Language en, hi, Hinglish Agent tools, confirm Open models Groq: gpt-oss, Qwen Kokoro TTS en + hi voices Retrieval multilingual Ingestion clinic documents PostgreSQL clinic, calls, vectors Redis events, limits Front desk live events, hand-offs Observability traces, metrics Evaluation WER, safety, latency
Every part is highlighted (blue: our system): this module draws the whole map and the paths that requests, calls and documents take through it.

This module draws the whole map. Every later module opens one box; here you see how the boxes connect, which process each one runs in, and which paths a staff request, a call and an uploaded document take. With this picture in your head you always know where a bug can live.

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.

Or open everything with a plan