A production-ready AI voice assistant that handles inbound and outbound calls with seamless Salesforce CRM integration.
- Intelligent Call Handling: 24/7 AI-powered voice assistant
- Salesforce Integration: Automatic contact management and lead qualification
- Real-time Performance: Sub-2-second response times
- Security & Compliance: SOC 2, GDPR, CCPA ready architecture
- Monitoring & Analytics: Comprehensive health checks and metrics
- Python 3.11+
- PostgreSQL (or SQLite for development)
- Redis (optional, for caching)
- Clone the repository:
git clone <repository-url>
cd ai-calling-agent-mvp
- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env with your API keys and configuration
- Initialize database:
alembic upgrade head
- Run the application:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
Copy .env.example
to .env
and configure the following:
- Salesforce: Client ID, Secret, Username, Password, Security Token
- Twilio: Account SID, Auth Token, Phone Number
- ElevenLabs: API Key for speech services
- OpenRouter: API Key for LLM services
- PostgreSQL:
DATABASE_URL=postgresql://user:password@localhost:5432/ai_calling_agent
- SQLite (dev):
DATABASE_URL=sqlite:///./ai_calling_agent.db
- Health Check:
GET /health
- Metrics:
GET /metrics
- Twilio Webhook:
POST /api/v1/webhooks/twilio/incoming-call
- Salesforce Webhook:
POST /api/v1/webhooks/salesforce/lead-created
Run with auto-reload:
uvicorn app.main:app --reload
Run tests:
pytest
Format code:
black app/
isort app/
The application is designed for deployment on:
- Railway
- Render
- AWS ECS
- Docker containers
See deployment documentation for platform-specific instructions.
- Backend: FastAPI with Python 3.11+
- Database: PostgreSQL with SQLAlchemy ORM
- Telephony: Twilio Voice API
- Speech: ElevenLabs STT/TTS
- LLM: OpenRouter with Claude-3.5-Sonnet
- CRM: Salesforce REST API
- Monitoring: Structured logging with Sentry integration
- Data encryption at rest and in transit
- OAuth 2.0 for Salesforce authentication
- Webhook signature verification
- Comprehensive audit logging
- Security headers and CORS protection
MIT License - see LICENSE file for details.