Skip to main content

Prerequisites

  • Python 3.8+
  • Docker and Docker Compose (optional, for full deployment)
  • API keys for your preferred AI provider (Gemini, OpenAI, etc.)
  • Twilio/Plivo account for phone numbers
  • Supabase account for data persistence

1. Clone and Setup

git clone <your-repo-url>
cd callintel-livekit
cp .env.example .env

2. Configure Environment Variables

Edit .env with your credentials:
# AI Provider
GEMINI_API_KEY=your_gemini_key
OPENAI_API_KEY=your_openai_key

# Telephony
TWILIO_ACCOUNT_ID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_token

# Database
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key

# Server
SERVER_DOMAIN=your_domain.com
PORT=8010
Environment=local

3. Install Dependencies

pip install -r requirments/requirements-app.txt

4. Initialize Database

from Service.Supabase import get_supabase_client

supabase = get_supabase_client()
# Tables will be auto-created on first run

5. Start the Server

python app.py
The API will be available at https://py.callai.rejoicehub.com

6. Create Your First Agent

curl -X POST https://py.callai.rejoicehub.com/api/agents \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First Agent",
    "initial_message": "Hello! How can I help you today?",
    "ai_provider": "gemini",
    "voice_provider": "twilio"
  }'

7. Make Your First Call

curl -X POST https://py.callai.rejoicehub.com/api/calls \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent-id-from-previous-step",
    "to_phone": "+1234567890",
    "from_phone": "+0987654321"
  }'

Next Steps

Docker Deployment

Deploy with Docker Compose for production use.

Configuration

Learn about all configuration options.

API Reference

Explore all available endpoints.

Agent Setup

Create advanced agents with custom prompts.

Troubleshooting

Port Already in Use

lsof -i :8010  # Find what's using the port
kill -9 <PID>   # Kill the process

Import Errors

pip install --upgrade pip
pip install -r requirments/requirements-app.txt --force-reinstall

Supabase Connection Failed

  • Verify your SUPABASE_URL and SUPABASE_KEY are correct
  • Check your Supabase project is active
  • Ensure network connectivity to Supabase
Need help? Check our troubleshooting guide or contact support.