A platform that allows configuring a user profile, agent profile, and supporting documents, and can then engage over audio in a video call with one or more human attendees.
The application consists of two main modules:
- Agent Module - Handles real-time audio processing, conversation management, and AI interactions
- Server Module - Manages API endpoints, database operations, and business logic
- Python 3.9 or higher
- PostgreSQL
- Docker (optional)
- Node.js 18+ (for frontend)
-
Navigate to the agent directory:
cd finance-assistant/agent -
Create a virtual environment and install dependencies:
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -U pip pip install -r requirements.txt
-
Download required AI models:
python3 download_files.py
-
Create
.envfile from template:cp env.template .env # Update the .env with your credentials -
Start the agent:
python3 src/assistant.py start
-
Navigate to the server directory:
cd finance-assistant/server -
Create a virtual environment and install dependencies:
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -U pip pip install -r requirements.txt
-
Set up environment variables:
cp env.template .env # Update the .env with your credentials -
Apply database migrations:
alembic upgrade head
-
Start the FastAPI server:
uvicorn src.main:app --reload
Both modules require the following environment variables:
# LiveKit Configuration
LIVEKIT_URL=
LIVEKIT_API_KEY=
LIVEKIT_API_SECRET=
LIVEKIT_WSS_URL=
# API Keys
DEEPGRAM_API_KEY=
OPENAI_API_KEY=
ELEVEN_API_KEY=
# Database Configuration
DB_USER=
DB_PASSWORD=
DB_HOST=
DB_PORT=
DB_NAME=
# Admin Configuration
ADMIN_USERNAME=
ADMIN_PASSWORD=
SECRET_KEY=
# Misc
FRONTEND_BASE_URL=
LITELLM_LOG=
- Ensure Docker and Docker Compose are installed
- Copy environment templates:
cp env.template .env
- Start all services:
docker compose up --build -d
To run only the PostgreSQL database:
docker compose up -d postgresalembic revision --autogenerate -m "Description of changes"alembic upgrade headalembic downgrade -1 # Roll back one migration
alembic downgrade base # Roll back all migrations# Install development dependencies
pip install ruff
# Format code
ruff format .
ruff check --fix .# Run linter
ruff check .# Install test dependencies
pip install pytest pytest-asyncio
# Run tests
pytestOnce the server is running, access the API documentation at:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
To test the application:
- Start both agent and server modules
- Access the LiveKit Playground
- Connect using your configured credentials
Common issues and solutions:
-
Database Connection Issues:
- Verify PostgreSQL is running
- Check database credentials in .env
- Ensure database exists and is accessible
-
Model Download Failures:
- Check internet connection
- Verify disk space availability
- Try running download_files.py with sudo if permission issues
-
Agent Connection Issues:
- Verify LiveKit credentials
- Check if required ports are open
- Ensure WebSocket URL is accessible
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details