Skip to content

About

AI call assistant using Google Gemini, integrating search techniques like Search-R1 for query reformulation, retrieval, and real-time reasoning, and ngrok for secure voice and API integration. Currently adding ticket management to automate the entire workflow from telephone conversations to creating support tickets.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

AI Call MVP

A minimal Flask service for handling AI-powered voice calls via Twilio.

Project Structure

app/
  __init__.py  # create_app() factory
  backend/
    __init__.py
    ngrok_control.py   # Utility functions for managing ngrok server
    routes.py          # health + /voice endpoints
    rag.py             # retrieval + Gemini integration
    convo.py           # ConversationController
    scraper.py         # Web scraper for online knowledge base
  frontend/
    ...        # React app files
cli.py         # helper commands
run.py         # Flask app launcher

Setup

Build from source

  1. Install dependencies and set up the project:
pip install -e .
cd app/frontend && npm install
  1. Run the Flask application:
# Option 1: Using run.py
python run.py

# Option 2: Using Flask CLI
flask --app app run

# Option 3: With debug mode
flask --app app run --debug
  1. Start React app from inside the frontend folder
npm run dev

Docker container

docker compose up --build

Endpoints

  • GET /health - Health check endpoint
  • POST /voice - Twilio webhook for voice calls
  • POST /ngrok/start - Start a new ngrok server
  • POST /ngrok/stop - Stop the current ngrok server
  • GET /ngrok/status - Get ngrok server status

CLI Commands

# Test call service
python cli.py calltest

# Scrape a website
python cli.py scrape <url>

# Ingest a document
python cli.py ingest

# Start ngrok service
python cli.py ngrok

# Show all configurations
python cli.py --help

Web App Demo

Main Page Ngrok Inactive Settings Page Document/Website Upload Page Main Page Ngrok Active

Environment Variables

Create a .env file with the necessary API keys:

GOOGLE_API_KEY=<your-gemini-api-key>
TWILIO_ACCOUNT_SID=<your-twilio-account-sid>
TWILIO_AUTH_TOKEN=<your-twilio-auth-token>
TWILIO_PHONE_SID=<your-twilio-number-sid>
NGROK_AUTH_TOKEN=<your-ngrok-auth-token>

About

AI call assistant using Google Gemini, integrating search techniques like Search-R1 for query reformulation, retrieval, and real-time reasoning, and ngrok for secure voice and API integration. Currently adding ticket management to automate the entire workflow from telephone conversations to creating support tickets.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages