How genzpreparation/nexoagent works
NexoAgent is a multi-tenant voice-AI telecalling SaaS: workspace users or lead platforms initiate calls, campaigns, or account actions through a FastAPI API; calls are placed through telephony, recorded in a call ledger, and billed against prepaid wallet balances. The voice worker handles live conversations and WhatsApp actions; post-call intelligence and secure recordings support review. The README documents voice, compliance, and SaaS capabilities not all visible in the sampled excerpts, so those links are marked as documented or unverified rather than implying inspected implementation. Evidence is limited to the README, SOURCE INDEX, and excerpts provided.
Main entry points: main.py FastAPI application · calls.py Call dispatch and ledger · webhooks.py Telephony and lead webhooks · wallet.py Prepaid wallet
Components 31
API and tenancy
- FastAPI application
backend/app/main.py - Authentication
backend/app/api/v1/auth.py - Tenant access
backend/app/core/deps.py - JWT security
backend/app/core/security.py - Workspace API
backend/app/api/v1/workspace.py - Voice agent API
backend/app/api/v1/agents.py - API key management
backend/app/api/v1/api_keys.py - Integrations API
backend/app/api/v1/integrations.py
Calling operations
- Campaign API
backend/app/api/v1/campaigns.py - Campaign dispatcher
backend/app/services/campaign.py - Call dispatch and ledger
backend/app/api/v1/calls.py - Telephony service
backend/app/services/telephony.py - Telephony and lead webhooks
backend/app/api/v1/webhooks.py
Voice experience
- Live voice worker
backend/voice_agent/agent.py - Conversation tools
backend/voice_agent/tools.py - WhatsApp API
backend/app/api/v1/whatsapp.py - WhatsApp dispatch
backend/app/services/whatsapp.py - Call intelligence
backend/app/services/intelligence.py
Billing and records
- Prepaid wallet
backend/app/services/wallet.py - Billing API
backend/app/api/v1/billing.py - Razorpay integration
backend/app/services/razorpay_service.py - Recording storage
backend/app/services/storage.py - Async database
backend/app/core/database.py - Platform records
backend/app/models/call.py
Other components
- Workspace user
- Lead platform
- Telephony carrier
- Voice AI providers
- WhatsApp provider
- S3 or R2
- Razorpay
Connections 41
- Workspace user → FastAPI application: uses API
backend/app/main.py - Lead platform → Telephony and lead webhooks: submits leads
backend/app/api/v1/webhooks.py - FastAPI application → Authentication: registers routes
backend/app/main.py - FastAPI application → Call dispatch and ledger: registers routes
backend/app/main.py - FastAPI application → Campaign API: registers routes
backend/app/main.py - FastAPI application → Telephony and lead webhooks: registers routes
backend/app/main.py - FastAPI application → WhatsApp API: registers routes
backend/app/main.py - FastAPI application → Billing API: registers routes
backend/app/main.py - FastAPI application → Voice agent API: registers routes
backend/app/main.py - FastAPI application → Workspace API: registers routes
backend/app/main.py - FastAPI application → API key management: registers routes
backend/app/main.py - FastAPI application → Integrations API: registers routes
backend/app/main.py - Authentication → JWT security: hashes and signs
backend/app/api/v1/auth.py - Authentication → Async database: reads and writes
backend/app/api/v1/auth.py - Tenant access → JWT security: decodes JWT
backend/app/core/deps.py - Tenant access → Async database: resolves tenant
backend/app/core/deps.py - Call dispatch and ledger → Prepaid wallet: checks balance
backend/app/api/v1/calls.py - Call dispatch and ledger → Telephony service: places call
backend/app/api/v1/calls.py - Call dispatch and ledger → Call intelligence: analyzes transcript
backend/app/api/v1/calls.py - Call dispatch and ledger → Recording storage: requests stream URL
backend/app/api/v1/calls.py - Call dispatch and ledger → Async database: reads and writes
backend/app/api/v1/calls.py - Campaign API → Campaign dispatcher: dispatches campaign
backend/app/api/v1/campaigns.py - Campaign dispatcher → Telephony service: places calls
backend/app/services/campaign.py - Campaign API → Prepaid wallet: checks balance
backend/app/api/v1/campaigns.py - Telephony and lead webhooks → Telephony service: dials lead
backend/app/api/v1/webhooks.py - Telephony and lead webhooks → Campaign dispatcher: uses campaign logic
backend/app/api/v1/webhooks.py - Telephony and lead webhooks → Prepaid wallet: deducts usage
backend/app/api/v1/webhooks.py - Telephony and lead webhooks → Async database: persists call
backend/app/api/v1/webhooks.py - Telephony carrier → Telephony and lead webhooks: sends call events
backend/app/api/v1/webhooks.py - Telephony service → Telephony carrier: initiates calls
- Live voice worker → Conversation tools: invokes tools
backend/voice_agent/agent.py - Conversation tools → WhatsApp dispatch: dispatches messages
backend/voice_agent/tools.py - WhatsApp API → WhatsApp dispatch: sends messages
backend/app/api/v1/whatsapp.py - WhatsApp dispatch → WhatsApp provider: sends WhatsApp
- Live voice worker → Voice AI providers: runs voice pipeline
- Billing API → Prepaid wallet: credits wallet
backend/app/api/v1/billing.py - Billing API → Razorpay integration: creates payments
backend/app/api/v1/billing.py - Razorpay integration → Razorpay: processes payments
- Prepaid wallet → Async database: updates balances
backend/app/services/wallet.py - Recording storage → S3 or R2: signs object URLs
backend/app/services/storage.py - Call dispatch and ledger → Platform records: reads call records
backend/app/api/v1/calls.py