How aksh0411/ai_receptionist works
FrontDesk AI is a dental-clinic receptionist backend. A customer chats through the web page or POST /chat; the agent builds a prompt from clinic data, asks an OpenAI-compatible model for a reply or tool calls, and the executor runs those calls. Booking is confirmed only when the booking tool saves it and returns a reference. The JSON file is the system of record for clinic data, appointments, conversations, and tool-call logs. The README documents capabilities beyond the sampled excerpts; those are represented where the tool registry and README support them.
Main entry points: json_store.py JSON clinic store · executor.py Tool executor · controller.py Agent loop · chat.py Chat API
Components 17
Chat entry
- Chat page
app/static/chat.html - Chat API
app/channels/chat.py - App startup
app/main.py
Reception agent
- Agent loop
app/agent/controller.py - Prompt builder
app/agent/prompts.py - Tool schemas
app/agent/tool_specs.py - Tool executor
app/agent/executor.py - LLM settings
app/config.py
Clinic operations
- Availability checks
app/tools/booking.py - Book appointment
app/tools/booking.py - Cancel and reschedule
app/tools/booking.py - Customer lookup
app/tools/booking.py - Clinic information
app/tools/booking.py - Human escalation
app/tools/booking.py
Clinic state
- JSON clinic store
app/db/json_store.py
Other components
- Customer
- LLM provider
Connections 27
- Customer → Chat page: chats through
README.md - Customer → Chat API: sends message
README.md - Chat page → Chat API: submits chat
README.md - App startup → Chat API: mounts route
app/main.py - App startup → JSON clinic store: initializes
app/main.py - Chat API → Agent loop: creates and calls
app/channels/chat.py - Agent loop → Prompt builder: builds prompt
app/agent/controller.py - Agent loop → Tool schemas: provides tools
app/agent/controller.py - Agent loop → LLM settings: reads settings
app/agent/controller.py - Agent loop → JSON clinic store: loads and saves chat
app/agent/controller.py - Prompt builder → JSON clinic store: reads clinic data
app/agent/prompts.py - Agent loop → LLM provider: sends prompt and tools
app/agent/controller.py - LLM provider → Agent loop: returns reply or calls
app/agent/controller.py - Agent loop → Tool executor: dispatches tool calls
app/agent/controller.py - Tool executor → Availability checks: dispatches availability
app/agent/executor.py - Tool executor → Book appointment: dispatches booking
app/agent/executor.py - Tool executor → Cancel and reschedule: dispatches changes
app/agent/executor.py - Tool executor → Customer lookup: dispatches lookup
app/agent/executor.py - Tool executor → Clinic information: dispatches information
app/agent/executor.py - Tool executor → Human escalation: dispatches escalation
app/agent/executor.py - Tool executor → JSON clinic store: logs tool attempts
app/agent/executor.py - Availability checks → JSON clinic store: reads clinic and bookings
app/tools/booking.py - Book appointment → JSON clinic store: saves customer and booking
app/tools/booking.py - Cancel and reschedule → JSON clinic store: reads and updates bookings
app/tools/booking.py - Customer lookup → JSON clinic store: reads customer records
app/tools/booking.py - Clinic information → JSON clinic store: reads clinic details
app/tools/booking.py - Human escalation → JSON clinic store: records escalation
app/tools/booking.py