How chodavon/ai-agent-for-receptionist works
This is a bilingual AI receptionist for school questions, accepting text and voice and returning streamed or complete answers. The main path is caller input through validation and optional transcription, skill and approved-answer routing, then a Gemini agent whose response streams to the browser; browser speech is sentence-based. Staff administer a separate approval loop for unanswered questions and negative feedback, producing versioned knowledge and routing examples. The README documents capabilities not fully visible in the excerpts; links based on it are cited there, and unsampled implementation details are not inferred.
Main entry points: chat/router.py Chat endpoints · client.py Gemini agent · admin/router.py Admin endpoints · service.py Feedback and review
Components 22
Public conversation
- Chat browser
web/js/app.js - Chat endpoints
src/receptionist/chat/router.py - Audio validation
src/receptionist/voice/validators.py - Speech to text
src/receptionist/voice/stt.py - Speech output
src/receptionist/voice/tts.py
Answering and content
- Gemini agent
src/receptionist/agent/client.py - Skill router
src/receptionist/router/service.py - Routing matchers
src/receptionist/router/embeddings.py - Skill registry
src/receptionist/skills/loader.py - Approved answer search
src/receptionist/router/knowledge.py - Approved Q&A
src/receptionist/knowledge/service.py - Agent tools
src/receptionist/agent/tools.py
Staff learning loop
- Staff browser
web/js/admin.js - Admin endpoints
src/receptionist/admin/router.py - Feedback and review
src/receptionist/learning/service.py - Staff messages
src/receptionist/messages/service.py - FAQ export
src/receptionist/admin/export.py
Platform services
- Application database
src/receptionist/database.py - Turn metrics
src/receptionist/metrics/service.py - Security controls
src/receptionist/security/auth.py
Other components
- Caller
- Gemini service
Connections 28
- Caller → Chat browser: asks question
- Chat browser → Chat endpoints: sends chat
- Chat endpoints → Audio validation: validates audio
src/receptionist/chat/router.py - Chat endpoints → Speech to text: transcribes audio
src/receptionist/chat/router.py - Chat endpoints → Gemini agent: requests answer
src/receptionist/chat/router.py - Gemini agent → Skill router: routes question
src/receptionist/agent/client.py - Skill router → Routing matchers: scores skills
src/receptionist/router/service.py - Skill router → Skill registry: loads skill index
src/receptionist/router/service.py - Gemini agent → Skill registry: reads skill content
src/receptionist/agent/client.py - Gemini agent → Approved answer search: checks approved answers
src/receptionist/agent/client.py - Approved answer search → Approved Q&A: searches entries
src/receptionist/router/knowledge.py - Gemini agent → Agent tools: dispatches tools
src/receptionist/agent/client.py - Gemini agent → Gemini service: generates reply
- Gemini agent → Chat endpoints: streams reply
src/receptionist/chat/router.py - Chat endpoints → Speech output: synthesizes voice
src/receptionist/chat/router.py - Chat endpoints → Turn metrics: records turn
src/receptionist/chat/router.py - Chat endpoints → Feedback and review: records feedback
src/receptionist/chat/router.py - Caller → Staff browser: staff review
- Staff browser → Admin endpoints: manages questions
- Admin endpoints → Feedback and review: approves drafts
src/receptionist/admin/router.py - Admin endpoints → Approved Q&A: manages entries
src/receptionist/admin/router.py - Admin endpoints → FAQ export: exports approved FAQ
src/receptionist/admin/router.py - Admin endpoints → Staff messages: manages messages
src/receptionist/admin/router.py - Feedback and review → Approved Q&A: creates approved entry
src/receptionist/learning/service.py - Feedback and review → Application database: persists review data
src/receptionist/learning/service.py - Approved Q&A → Application database: persists entries
src/receptionist/knowledge/service.py - Turn metrics → Application database: stores measurements
src/receptionist/metrics/service.py - Admin endpoints → Security controls: checks admin access
src/receptionist/admin/router.py