After-Hours Desk is an autonomous voice agent designed to solve the after-hours booking bottleneck for healthcare clinics. Built specifically for the AssemblyAI Voice Agent Hackathon, this project acts as a fully capable digital front desk for "Riverside Family Dental." Patients can call in to book, cancel, or move appointments using natural conversation. The core voice interaction is powered by the AssemblyAI Voice Agent API (utilizing the alba voice at 24 kHz PCM) integrated with custom function tools. To ensure the agent only books valid slots, it runs strict lookups against a live clinic database. Technical Architecture & Security: The application is split into a Next.js App Router frontend and a Python FastAPI backend. A key engineering focus was security and resilience: Key Protection: The browser never sees the AssemblyAI API key. The Python backend securely mints single-use tokens for the client to establish the WebRTC connection. Cost Control: The client explicitly sends a session.end signal upon call termination to prevent runaway billing. Database Fallback: The system synchronizes with a primary PostgreSQL database. If PostgreSQL goes down, the FastAPI backend automatically logs a warning and gracefully degrades to a local SQLite fallback (clinic.db), ensuring zero downtime for the front desk. Agent Tooling: The agent executes real-time function calls including lookup_patient, list_available_slots (restricted to factual open slots to prevent hallucination), book_appointment (which mandates a caller_confirmed boolean before committing), and get_prep_instructions. Categories*
Category tags: