Your smart voice-powered butler for research, scheduling & smart updates via calls & messages.
- Research Management: Initiate and retrieve research on any topic
- Smart Scheduling: Event planning with contextual reminders
- Task Management: Create and track tasks with customizable priorities
- Contact Management: Store and manage contact information
- SMS & Call Integration: Automated notifications and voice interactions
- Timezone Support: Global timezone handling for events and reminders
- Python 3.11+
- PostgreSQL (via Supabase)
- Twilio Account (for SMS/calls)
-
Clone the repository:
git clone <repository-url> cd jarvoice-api
-
Create and activate virtual environment:
python -m venv venv source venv/bin/activate # Unix/macOS # or .\venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
cp .env.example .env.local
Required environment variables:
SUPABASE_URL=your_supabase_url SUPABASE_ANON_KEY=your_supabase_key TWILIO_ACCOUNT_SID=your_twilio_sid TWILIO_AUTH_TOKEN=your_twilio_token
uvicorn main:app --reloadThe API will be available at http://localhost:8000
Once running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
POST /users: Create new userGET /users/{user_id}: Retrieve user detailsPOST /tasks: Create new taskPOST /events: Create calendar eventPOST /contacts: Add new contactPOST /1/process: Process tool calls for AI interactions
jarvoice-api/
├── main.py # FastAPI application and routes
├── base_models.py # Pydantic models
├── tool_functions.py # AI tool implementations
├── scheduler.py # Task scheduling logic
├── outbound_caller.py # Voice call handling
├── twilio_sms.py # SMS functionality
└── tool_registry.py # Tool function registry
Tools in Vapi are implemented through server URLs and function calls, enabling your assistant to interact with external services.
Server URLs allow real-time communication between Vapi and your application. They enable you to:
- Receive conversation events (status updates, transcripts, function calls)
- Get dynamic assistant configurations
- Receive end-of-call reports
To set up a server URL:
- Configure the URL in your assistant settings.
- Implement an endpoint on your server to handle POST requests from Vapi.
- Process the received data and respond as needed.
Function calls allow your assistant to trigger specific actions during a conversation. You can define custom functions that your assistant can invoke, such as:
- Forwarding calls
- Hanging up
- Accessing external databases or APIs
For testing server URLs in a local development environment, you can use ngrok:
- Install ngrok.
- Run your local server.
- Use ngrok to create a public URL for your local server.
- Set the ngrok URL as your server URL in Vapi.
You can plug in your own Language Model by configuring a custom LLM URL, allowing you to use specialized or proprietary models for your assistant.
To integrate with external services (e.g., specific TTS, LLM, or STT vendors), add your API keys in the Vapi dashboard.
Assistants can be customized with various components:
- Transcriber: For speech-to-text conversion
- Model: The language model powering the assistant's responses
- Voice: The text-to-speech voice for the assistant
By leveraging these tools and configurations, you can create highly customized and powerful voice AI assistants using Vapi.
- Define new models in
base_models.py - Implement business logic in appropriate modules
- Add new endpoints in
main.py - Register new tool functions in
tool_registry.py
# Run tests
pytest
# Test specific functionality
python -m pytest tests/test_specific.pyKey packages:
fastapi: Web frameworkpydantic: Data validationuvicorn: ASGI serversupabase: Database clienttwilio: SMS/Voice capabilitiesvapi: Voice API integrationapscheduler: Task scheduling
- CORS middleware configured
- Environment-based configuration
- Supabase authentication
- E.164 phone number validation
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
For support or queries, please open an issue in the repository.
Let me know if you'd like further adjustments!