Rapida Voice AI Platform - Developer Guide
Welcome to Rapida! This guide will help you set up and run the complete Rapida Voice AI Platform on your machine. Whether you prefer Docker or manual setup, we’ve got you covered.What is Rapida?
Rapida is an open-source, end-to-end voice orchestration platform for building, deploying, and managing voice agents at scale. It provides:- Voice Agents: Build intelligent voice bots with LLM integration
- Real-time Audio Processing: Stream audio with low-latency processing
- Orchestration: Manage complex voice workflows and interactions
- Integration: Connect with 50+ LLM, STT, TTS, and telephony providers
- Observable: Deep insights into calls, metrics, and performance
Architecture Overview
Rapida consists of several microservices working together:- web-api (9001) - Dashboard backend and core orchestration
- assistant-api (9007) - Voice agent management and conversation handling
- integration-api (9004) - Third-party service integrations
- endpoint-api (9005) - Webhook and callback management
- document-api (9010) - Knowledge base and RAG capabilities
- ui (3000) - React dashboard
- nginx (8080) - Reverse proxy and load balancer
- PostgreSQL (5432) - Primary database (relational data)
- Redis (6379) - Cache and message queue
- OpenSearch (9200) - Full-text search and analytics
Quick Start - Docker (Recommended)
The fastest way to get Rapida running is with Docker Compose.Prerequisites
- Docker Desktop or Docker Engine
- Docker Compose (v2.0+)
- ~4GB available RAM
- macOS, Linux, or Windows with WSL2
Step 1: Clone the Repository
Step 2: Initial Setup
Create the required directories and set permissions:~/rapida-data/assets/db- PostgreSQL data~/rapida-data/assets/redis- Redis data~/rapida-data/assets/opensearch- OpenSearch data
Step 3: Start All Services
- PostgreSQL database
- Redis cache
- OpenSearch search engine
- All API services (web, assistant, integration, endpoint, document)
- UI dashboard
- Nginx reverse proxy
Step 4: Verify Services
Check that all services are running:Up.
Step 5: Access the Dashboard
Open your browser and navigate to: Dashboard: http://localhost:3000 You should see the Rapida dashboard login page.Viewing Logs
To monitor service logs:Services Overview
Core Services
web-api (Port 9001)
Purpose: Core platform orchestration and dashboard backend- User and organization management
- Workspace and project management
- Authentication and authorization
- Dashboard API endpoints
SERVICE_NAME: web-apiPORT: 9001LOG_LEVEL: debug/info/warn/errorENV: development/productionSECRET: Encryption secret
web_db in PostgreSQL
assistant-api (Port 9007)
Purpose: Voice agent and conversation management- Create and manage voice assistants
- Handle real-time conversations
- Process audio streams
- Integrate with LLMs
- Audio processing (VAD, STT, TTS)
SERVICE_NAME: workflow-apiPORT: 9007OPENSEARCH__HOST: opensearchOPENSEARCH__PORT: 9200
assistant_db in PostgreSQL
Search Index: OpenSearch
Features:
- Real-time audio streaming
- Voice activity detection (VAD)
- Speech-to-text integration
- LLM interaction
- Text-to-speech synthesis
integration-api (Port 9004)
Purpose: Third-party integrations and credential management- Manage provider credentials (OpenAI, Anthropic, etc.)
- Handle OAuth flows
- Integration configuration
- Provider management
PORT: 9004INTEGRATION_CRYPTO_KEY: Encryption key for credentials
integration_db in PostgreSQL
Integrated Providers:
- LLMs: OpenAI, Anthropic, Cohere, Google AI, Azure OpenAI, AWS Bedrock, Mistral, HuggingFace
- STT: Google Speech, Deepgram, Cartesia, AssemblyAI, Sarvam AI
- TTS: Azure Speech, Google TTS, ElevenLabs, Deepgram, Cartesia, Sarvam AI
- Telephony: Twilio, Vonage, Exotel
endpoint-api (Port 9005)
Purpose: Webhook and callback management- Webhook configuration
- Callback handling
- Event routing
- External API integration
PORT: 9005
endpoint_db in PostgreSQL
document-api (Port 9010)
Purpose: Knowledge base and RAG (Retrieval Augmented Generation)- Document upload and processing
- Text chunking and embedding
- Similarity search
- Knowledge base management
- Support for multiple file formats (PDF, DOCX, XLSX, CSV, MD, HTML)
- Automatic chunking and embedding
- Entity extraction
- Full-text search
ui (Port 3000)
Purpose: Web dashboard for managing Rapida- React-based single-page application
- Tailwind CSS styling
- Real-time updates via WebSocket
- Responsive design
- Assistant management
- Conversation viewing
- Analytics and monitoring
- Credential management
- Knowledge base management
nginx (Port 8080)
Purpose: Reverse proxy and load balancing- Route traffic to appropriate services
- SSL/TLS termination (when configured)
- Static file serving (UI)
- Load balancing
Infrastructure Services
PostgreSQL (Port 5432)
Purpose: Primary relational database Databases:web_db- Web API data (users, organizations, projects, credentials)assistant_db- Assistant and conversation dataintegration_db- Integration configurationsendpoint_db- Webhook and endpoint data
~/rapida-data/assets/db
Redis (Port 6379)
Purpose: Cache and message queue Features:- Session caching
- Rate limiting
- Job queue (Celery for document processing)
- Real-time data
- Database query caching
- DB 0: General cache
- DB 1: Session cache
- DB 2+: Reserved for future use
~/rapida-data/assets/redis
Connection:
OpenSearch (Port 9200)
Purpose: Full-text search and analytics Features:- Conversation search
- Log analysis
- Metrics aggregation
- Document indexing
- Real-time search
assistant-conversations- Conversation transcriptslogs-*- Service logsdocuments-*- Knowledge base documents
~/rapida-data/assets/opensearch
Health Check:
Configuration
Environment Configuration
Each service has environment variables defined indocker/{service}/.{service}.env:
Common Variables
Database Configuration
Redis Configuration
OpenSearch Configuration
Modifying Configuration
-
Edit the environment file:
-
Restart the service:
Common Docker Commands
Service Management
Viewing Status
Database Management
Cleaning Up
Manual Setup (Without Docker)
For development or if you prefer not to use Docker, follow these steps:Prerequisites
- Go 1.25 or later
- Python 3.9+
- Node.js 22+
- PostgreSQL 15+
- Redis 7+
- OpenSearch 2.11+
Step 1: Install Dependencies
macOS
Linux (Ubuntu/Debian)
Step 2: Configure Databases
PostgreSQL Setup
Redis Setup
OpenSearch Setup
Step 3: Setup Environment Files
Copy environment template files and configure them:Step 4: Build Go Services
Build each microservice:Step 5: Run Database Migrations
Step 6: Setup Frontend
Step 7: Start Services
Open separate terminal windows for each service:Terminal 1: Web API
Terminal 2: Assistant API
Terminal 3: Integration API
Terminal 4: Endpoint API
Terminal 5: Document API
Terminal 6: UI (Already running from Step 6)
The UI should be running at http://localhost:3000Step 8: Verify Services
Check that all services are running:Troubleshooting
Service Won’t Start
Problem: Service container exits immediately Solution:Database Connection Issues
Problem:connection refused errors
Solution:
Memory Issues
Problem: OpenSearch or container running out of memory Solution:Redis Connection Issues
Problem: Redis connection refused Solution:Performance Optimization
For Development
For Production
- Increase connection pools
- Enable caching
- Set LOG_LEVEL to info
- Use managed databases (AWS RDS, Azure Database)
- Configure OpenSearch for production
- Use separate Redis instances for different purposes
Next Steps
- Create Your First Assistant: See Assistant Documentation
- Integrate LLMs: See LLM Integrations
- Add Knowledge Base: See Knowledge Management
- Deploy: See Deployment Options
Getting Help
- GitHub Issues: https://github.com/rapidaai/voice-ai/issues
- Documentation: https://rapida.ai/docs
- Community: https://github.com/rapidaai/voice-ai/discussions
- Support Email: prashant@rapida.ai