Prerequisites
Before starting, make sure you have:- Python 3.11 or higher installed
- A terminal/command line interface
- 10 minutes of your time
Install Agentic AI
Clone the repository and install the package:Verify the installation:You should see the CLI help menu with available commands.
Get Your API Keys
You’ll need credentials from these services:
Twilio (Required)
- Sign up at console.twilio.com
- Get a phone number from the Twilio console
- Copy your Account SID and Auth Token from the dashboard
OpenAI (Required)
- Create an API key at platform.openai.com/api-keys
- Make sure your account has access to the Realtime API
- Copy your API Key (starts with
sk-proj-)
Gemini (Required)
- Get an API key from aistudio.google.com/apikey
- Copy your Gemini API Key
Telegram (Optional)
- Message @BotFather on Telegram
- Create a new bot with
/newbotand copy the Bot Token - Message your bot (say “hi”)
- Visit
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Find
"chat":{"id":123456789}- that’s your Chat ID
Configure Environment
Run the interactive setup wizard:The wizard will guide you through entering all your credentials and create a Fill in your
.env file automatically.Or configure manually:.env file:.env
Test Your Configuration
Verify all your credentials are working:This will test connections to:
- Twilio API
- Gemini configuration
- OpenClaw Gateway (optional)
Start a Tunnel
Twilio needs to reach your local server via a public URL. Start ngrok:Copy the public URL that appears (e.g.,
https://xxxx-xx-xx-xxx-xxx.ngrok-free.app).Set the webhook URL in your environment:Start the Server
In a new terminal window (keep ngrok running), start the Agentic AI server:You should see output like:
The server must stay running while making calls. Keep this terminal window open.
Make Your First Call
In a third terminal window, trigger your first AI call:Replace:Your phone will ring! 🎉Answer it and have a conversation with your AI agent. Try saying:
+1YOURNUMBERwith your actual phone number (E.164 format)https://xxxx.ngrok.iowith your ngrok URL from Step 5
- “Hello, who is this?”
- “What can you help me with?”
- “Play Zayn Dusk Till Dawn on YouTube” (requires ClawdBot setup)
Receive Incoming Calls (Optional)
Configure your Twilio number to answer incoming calls automatically:
- Go to Twilio Console
- Navigate to Phone Numbers → Manage → Active numbers
- Click on your phone number
- Scroll to Voice & Fax section
- Under “A call comes in”, select Webhook
- Enter:
https://xxxx.ngrok.io/twilio/voice(your ngrok URL +/twilio/voice) - Set method to HTTP POST
- Click Save
What’s Next?
Installation Guide
Deep dive into installation options, service setup, and production deployment
ClawdBot Integration
Enable command execution during calls - play music, send messages, and more
Configuration Reference
Customize voice options, system instructions, and advanced settings
API Reference
Explore all CLI commands and programmatic API usage
Troubleshooting
Call not connecting
Call not connecting
Symptoms: Phone doesn’t ring or call immediately disconnectsSolutions:
- Verify your Twilio credentials in
.envare correct - Check that your ngrok tunnel is running:
curl https://xxxx.ngrok.io/health - Ensure the webhook URL matches your ngrok URL exactly
- Check that your Twilio number has voice capabilities enabled
- View server logs for errors:
agenticai service logs -f
No audio / AI not speaking
No audio / AI not speaking
Symptoms: Call connects but you hear silence, or AI doesn’t respondSolutions:
- Verify
OPENAI_API_KEYis set correctly and has Realtime API access - Check the OpenAI model name is correct:
gpt-4o-realtime-preview-2024-12-17 - Look for WebSocket errors in server logs
- Ensure your OpenAI account has sufficient credits
- Try a different voice option in
config.yaml
Server won't start
Server won't start
Symptoms: Error when running
agenticai serverSolutions:- Check port 8080 is not already in use:
lsof -i :8080 - Verify all required environment variables are set:
agenticai status - Ensure Python version is 3.11 or higher:
python --version - Reinstall dependencies:
pip install -e .
ClawdBot not responding
ClawdBot not responding
Symptoms: AI doesn’t execute commands during callsSolutions:
- Ensure OpenClaw Gateway is running on port 18789
- Start ClawdBot agent:
clawdbot agent --session-id agent:main:main - Verify gateway URL in
config.yaml:ws://127.0.0.1:18789 - Check that the skill you’re using is configured in ClawdBot