How shakthiswaran-m/voice-calling-agent works
This is a customer-support assistant for browser chat and phone calls, sharing an LLM-backed agent with customer, appointment, service, consultation, FAQ, case-study, and website-search tools. In web chat, a user submits a message through the React chat UI and FastAPI chat route; the agent obtains a response and conversation data is persisted. Browser voice adds audio transcription and speech playback. Phone calling uses Exotel with STT and TTS as communication services. The phone-to-agent orchestration and chat-route implementation were not sampled, so those documented connections are marked unverified.
Main entry points: voice.py Voice API · App.tsx App shell · llm.py LLM response engine · database.py Conversation and content store
Components 24
Web experience
- App shell
frontend/src/App.tsx - Chat interface
frontend/src/components/chat/ChatArea.tsx - Thread navigation
frontend/src/components/chat/ThreadNav.tsx - Browser voice
frontend/src/components/chat/SpeechToSpeechMode.tsx - Shared conversations
frontend/src/components/chat/SharedConversationPage.tsx - Chat state
frontend/src/store/useChatStore.ts - API client
frontend/src/lib/api.ts - Browser speech
frontend/src/lib/speechSynthesisService.ts
Agent backend
- Chat API
backend/app/api/chat.py - LLM response engine
backend/app/providers/llm.py - Agent instructions
backend/app/agent/prompts.py - Agent tools
backend/app/agent/tools.py - API startup
backend/app/main.py
Voice services
- Voice API
backend/app/api/voice.py - Speech recognition
backend/app/providers/stt.py - Speech generation
backend/app/providers/tts.py - Exotel adapter
backend/app/providers/exotel.py
Knowledge and persistence
- Website scraper
backend/app/website_scraper.py - Conversation and content store
backend/app/database.py
Other components
- Chat user
- LLM provider
- PostgreSQL
- Phone caller
- Exotel telephony
Connections 29
- Chat user → App shell: opens
README.md - App shell → Chat interface: renders
frontend/src/App.tsx - App shell → Thread navigation: renders
frontend/src/App.tsx - App shell → Chat state: reads state
frontend/src/App.tsx - Browser voice → Chat state: uses state
frontend/src/components/chat/SpeechToSpeechMode.tsx - Browser voice → API client: calls
frontend/src/components/chat/SpeechToSpeechMode.tsx - Browser voice → Browser speech: uses fallback
frontend/src/components/chat/SpeechToSpeechMode.tsx - API client → Chat API: sends chat
README.md - Chat API → LLM response engine: requests response
README.md - LLM response engine → LLM provider: calls
README.md - LLM response engine → Agent instructions: uses instructions
backend/app/providers/llm.py - LLM response engine → Agent tools: dispatches tools
backend/app/providers/llm.py - Agent tools → Conversation and content store: queries data
backend/app/agent/tools.py - Chat API → Conversation and content store: persists conversations
README.md - API startup → Chat API: registers
backend/app/main.py - API startup → Voice API: registers
backend/app/main.py - API startup → Conversation and content store: connects
backend/app/main.py - API startup → Website scraper: schedules
backend/app/main.py - Website scraper → Conversation and content store: saves content
backend/app/website_scraper.py - Conversation and content store → PostgreSQL: stores records
README.md - Browser voice → Voice API: submits audio
README.md - Voice API → Speech recognition: transcribes
backend/app/api/voice.py - Voice API → Speech generation: streams speech
backend/app/api/voice.py - Voice API → Exotel adapter: initiates call
backend/app/api/voice.py - Phone caller → Exotel telephony: calls through
README.md - Exotel telephony → Voice API: streams audio
README.md - Voice API → LLM response engine: forwards recognized speech
README.md - Speech generation → Exotel telephony: returns audio
README.md - App shell → Shared conversations: routes shared links
frontend/src/App.tsx