How sksahilkhan67sh/ai-callingagent works
AI Calling Agent imports contacts, organizes campaigns, and admits eligible calls to a durable dialing workflow. Calls use either the native voice stack or the optional Dograh integration; terminal outcomes feed recovery or post-call analysis. Operators monitor campaigns, calls, analytics, and system health through an authenticated Next.js dashboard. The README documents the principal flows and capabilities; source excerpts and the index confirm selected wiring. Several worker and route implementations were not sampled, so uncertain internal connections are omitted.
Main entry points: routes Public routes · dialer_worker.py Dialer worker · telephony Telephony provider · orchestrator.py Conversation engine
Components 21
Operations UI
- Admin dashboard
frontend/app/admin - Admin API client
frontend/lib/admin-api.ts
API and domain
- Admin routes
backend/app/api/routes - Admin services
backend/app/services/admin - FastAPI app
backend/app/main.py - Public routes
backend/app/api/routes - Contacts and campaigns
backend/app/services - Suppression checks
backend/app/repositories/suppression_repository.py - Postgres domain data
backend/app/models
Outbound calling
- Outbound queue
backend/app/services/queue - Dialer worker
backend/app/services/queue/dialer_worker.py - Telephony provider
backend/app/services/telephony
Voice and recovery
- Conversation engine
backend/app/services/ai/conversation/orchestrator.py - Speech and language
backend/app/services/ai - Recovery manager
backend/app/services/recovery/manager.py
Post-call analysis
- Analysis admission
backend/app/services/analysis/admission.py - Analysis queue
backend/app/services/analysis/queue.py - Analysis worker
backend/app/services/analysis/worker.py - Call intelligence
backend/app/models/call_analysis.py
Other components
- Operator
- Dograh service
Connections 23
- Operator → Admin dashboard: uses
README.md - Admin dashboard → Admin API client: requests data
frontend/lib/admin-api.ts - Admin API client → Admin routes: calls API
README.md - FastAPI app → Admin routes: mounts
backend/app/main.py - FastAPI app → Public routes: mounts
backend/app/main.py - Admin routes → Admin services: wraps
README.md - Public routes → Contacts and campaigns: manages
README.md - Contacts and campaigns → Postgres domain data: persists
backend/app/services/ai/policy/engine.py - Dialer worker → Outbound queue: claims jobs
- Outbound queue → Dialer worker: dispatches jobs
- Dialer worker → Telephony provider: places calls
README.md - Telephony provider → Dograh service: triggers calls
README.md - Dograh service → Public routes: posts outcomes
README.md - Telephony provider → Conversation engine: connects call
- Conversation engine → Speech and language: runs voice loop
README.md - Conversation engine → Recovery manager: requests recovery
backend/app/services/recovery/manager.py - Recovery manager → Analysis admission: admits terminal calls
README.md - Public routes → Analysis admission: receives webhook outcome
- Analysis admission → Analysis queue: publishes jobs
backend/app/services/analysis/admission.py - Analysis queue → Analysis worker: feeds jobs
backend/app/services/analysis/worker.py - Analysis worker → Call intelligence: stores analysis
README.md - Analysis worker → Postgres domain data: loads conversation
README.md - Suppression checks → Postgres domain data: reads and writes
backend/app/repositories/suppression_repository.py