Skip to main content
Directly initiate an outbound phone call with a custom prompt. This command creates a temporary call manager session and waits for the call to complete.
For quick calls to a running server, use agenticai trigger instead. The call command is useful for standalone call execution without a persistent server.

Usage

agenticai call --to <phone-number> \
  --prompt <instructions> \
  --webhook-url <public-url>

Options

--to
string
required
Phone number to call in E.164 format (e.g., +15551234567)Short form: -tExample:
agenticai call -t +15551234567 --prompt "..." --webhook-url https://...
--prompt
string
required
Instructions or system prompt for the AI agent during the callShort form: -pExample:
agenticai call -t +15551234567 -p "You are a helpful assistant" -w https://...
--webhook-url
string
required
Public webhook base URL for Twilio to connect to (from ngrok or Cloudflare tunnel)Short form: -wExample:
agenticai call -t +15551234567 -p "..." -w https://abc123.ngrok.io
--config
string
default:"config.yaml"
Path to configuration file (global option)Short form: -cExample:
agenticai --config /path/to/config.yaml call -t +15551234567 -p "..." -w https://...

How It Works

  1. Loads configuration from config.yaml and .env
  2. Creates CallManager instance with your Twilio and AI credentials
  3. Initiates the call to the specified phone number
  4. Waits for completion - the command blocks until the call ends
  5. Cleans up the CallManager session automatically
Unlike agenticai trigger, this command doesn’t require a running server. It creates a temporary session just for this call.

Examples

Basic Call

agenticai call \
  --to +15551234567 \
  --prompt "You are a friendly assistant helping with customer support" \
  --webhook-url https://abc123.ngrok.io

Call with Custom Config

agenticai --config production.yaml call \
  -t +15551234567 \
  -p "You are scheduling an appointment" \
  -w https://calls.yourdomain.com

Call with Multi-line Prompt

agenticai call -t +15551234567 \
  -p "You are a helpful assistant. Your goals:
1. Ask about their day
2. Take notes if needed
3. Be friendly and professional" \
  -w https://abc123.ngrok.io

Output

Initiating call to +15551234567
Prompt: You are a friendly assistant helping with...

✓ Call initiated! Call ID: CA1234567890abcdef1234567890abcd

Waiting for call to complete... (Ctrl+C to exit)

✓ Call completed.

Use Cases

One-off Calls

Perfect for making single calls without running a persistent server

Testing

Test your prompts and configuration quickly during development

Scripted Calls

Integrate into shell scripts for automated calling workflows

Debug Sessions

Debug call behavior in isolation without service complexity

Difference from agenticai trigger

Featureagenticai callagenticai trigger
Requires running server❌ No✅ Yes
Session managementTemporary, auto-cleanupUses server’s persistent CallManager
Waits for completion✅ Blocks until call ends❌ Returns immediately
Best forSingle calls, scripts, testingMultiple calls, production, API usage

Troubleshooting

  • Verify Twilio credentials in .env are correct
  • Ensure webhook URL is publicly accessible
  • Check that your Twilio number has voice capabilities
  • Test with agenticai test-connection first
  • The command waits for the call to complete
  • Press Ctrl+C to cancel and cleanup
  • Check if the call connected in Twilio Console logs
  • Ensure ngrok or Cloudflare tunnel is running: agenticai tunnel start
  • Verify the URL is accessible: curl https://your-url.ngrok.io/health
  • Make sure the URL doesn’t have a trailing slash

Build docs developers (and LLMs) love