How harshachakravarthy/voice-agent works
This is a managed AI voice-agent service with a business-operations dashboard. A caller reaches the Twilio webhook; the service loads business context, streams audio through speech recognition and AI response generation, speaks back over the call, and processes call outcomes afterward. The dashboard supports login, knowledge, calendar, notifications, and settings. The graph also shows the API, service, and persistence layers. Several route and service implementations were not excerpted, so documented capabilities are included without speculative internal call links.
Main entry points: webhook_service.py Call orchestration · routes Business and call routes · notification_service.py Notifications · App.tsx Dashboard routes
Components 27
Dashboard
- Dashboard routes
frontend/src/App.tsx - Dashboard auth
frontend/src/context/AuthContext.tsx - Business dashboard
frontend/src/pages - Typed API client
frontend/src/lib/api.ts
API and Services
- API router
src/app/api/router.py - Business and call routes
src/app/api/routes - Voice webhooks
src/app/api/routes/webhooks.py - Appointments
src/app/services/appointment_service.py - Knowledge management
src/app/services/knowledge_service.py - Calendar connection
src/app/services/calendar_oauth_service.py - Notifications
src/app/services/notification_service.py - Notification outbox
src/app/workers/outbox_worker.py
Voice Runtime
- Call orchestration
src/app/services/webhook_service.py - Media stream
src/app/services/media_stream_service.py - Business context
src/app/services/business_context_service.py - AI response
src/app/services/ai_service.py
Persistence and Integrations
- Speech recognition
src/app/integrations/stt/client.py - AI provider
src/app/integrations/ai/client.py - Speech synthesis
src/app/integrations/tts/client.py - Voice provider
src/app/integrations/voice/client.py - Google Calendar
src/app/integrations/calendar/client.py - Email provider
src/app/integrations/email/client.py - Business repositories
src/app/repositories - Supabase data store
src/app/db/supabase.py
Other components
- Business operator
- Incoming caller
- Twilio
Connections 28
- Business operator → Dashboard routes: uses dashboard
frontend/src/App.tsx - Dashboard routes → Dashboard auth: provides auth
frontend/src/App.tsx - Dashboard routes → Business dashboard: routes to
frontend/src/App.tsx - Business dashboard → Typed API client: requests data
frontend/src/pages/CalendarPage.tsx - Typed API client → API router: calls API
frontend/src/lib/api.ts - API router → Business and call routes: registers routes
src/app/api/router.py - Incoming caller → Twilio: places call
README.md - Twilio → Voice webhooks: posts call events
README.md - Voice webhooks → Call orchestration: delegates calls
src/app/api/routes/webhooks.py - Call orchestration → Business context: loads context
src/app/services/webhook_service.py - Call orchestration → Media stream: starts stream
src/app/api/routes/webhooks.py - Business context → Business repositories: loads business data
src/app/services/business_context_service.py - Call orchestration → Speech recognition: transcribes audio
src/app/services/webhook_service.py - Call orchestration → AI provider: requests response
src/app/services/webhook_service.py - Call orchestration → Speech synthesis: synthesizes speech
src/app/services/webhook_service.py - Media stream → Twilio: streams audio
README.md - Call orchestration → Voice provider: uses voice provider
src/app/services/webhook_service.py - Call orchestration → Appointments: handles booking
src/app/services/webhook_service.py - Business and call routes → Appointments: serves appointments
- Business and call routes → Knowledge management: serves knowledge
- Business and call routes → Calendar connection: serves calendar
- Calendar connection → Google Calendar: exchanges tokens
src/app/services/calendar_oauth_service.py - Appointments → Google Calendar: manages events
src/app/services/appointment_service.py - Business and call routes → Notifications: serves notifications
- Notification outbox → Notifications: dispatches notices
src/app/workers/outbox_worker.py - Notifications → Email provider: sends email
src/app/services/notification_service.py - Call orchestration → Notifications: sends call alerts
src/app/services/webhook_service.py - Business repositories → Supabase data store: reads and writes
src/app/repositories/base.py