AgentCall CLI: Phone Numbers for AI Agents in Your Terminal
The AgentCall CLI gives developers and coding agents all 62 AgentCall tools from a terminal: phone numbers, SMS, OTP codes, AI voice calls, call memory and schedules. An agent can look up one tool at a time instead of loading the full tool list, which is about 45,000 tokens, into its context.
Install the AgentCall CLI
The CLI requires Node.js 20 or later.
npm install -g @agentcall/cli
agentcall login
agentcall whoamiOr run it once without installing:
npx @agentcall/cli tools otpLog In with Your AgentCall API Key
Create a key on the API Keys page, then run agentcall login and paste it at the hidden prompt. The CLI checks the key before saving it to a file only your user account can read.
The CLI uses AGENTCALL_API_KEY first, then the saved key. API keys are never accepted as command-line flags, because arguments can appear in shell history and process listings.
printf '%s' "$AGENTCALL_API_KEY" | agentcall loginThe saved key is at %APPDATA%\agentcall\config.json on Windows and ~/.config/agentcall/config.json on macOS and Linux. Run agentcall logout to delete it.
Discover AgentCall Tools on Demand
Search the catalog, then read only the tool you need.
agentcall tools sms
agentcall schema send_sms
agentcall schema send_sms --jsonCLI Commands for Phone Numbers, SMS and Calls
| Command | What it does |
|---|---|
| agentcall tools [search] | List or search all tools |
| agentcall schema <tool> | Show one tool's flags and JSON Schema |
| agentcall tool <tool_name> [flags] | Run any tool |
| agentcall numbers list|get|provision|label|release | Manage phone numbers |
| agentcall sms send|inbox|get|threads|thread|reply | Send and read texts |
| agentcall otp wait|list | Receive verification codes |
| agentcall calls list|get|start|ai|hangup|transcript|report | Place and inspect calls |
| agentcall usage [--period YYYY-MM] | Show usage and costs |
| agentcall plan [upgrade] | Show your plan or get a Pro checkout link |
| agentcall login|whoami|logout | Manage the saved API key |
agentcall numbers list
agentcall sms inbox num_abc123 --limit 5
agentcall otp wait num_abc123 --timeout 90000
# Preview an action, then run it
agentcall sms send --from +14155550100 --to +14155550101 --body "Your table is ready" --dry-run
agentcall sms send --from +14155550100 --to +14155550101 --body "Your table is ready"Pass CLI Flags and JSON Input
Each tool input becomes a flag. numberId is --number-id, and --numberId also works.
agentcall tool get_inbox --number-id num_abc123 --limit 10 --otp-only
agentcall tool initiate_call --from +14155550100 --to +14155550101 --no-record
agentcall tool create_webhook --url https://example.com/hook --events sms.inbound --events call.transcript- Booleans:
--record,--no-recordor--record=false. - Lists: repeat the flag.
- Clear a nullable field:
--label null. - A value that starts with dashes:
--body=--hello.
Six tools have nested inputs: configure_inbound_ai, update_number_label, initiate_ai_call, create_webhook, update_contact and create_schedule. They also accept JSON from a file or stdin, and flags override the JSON.
agentcall tool initiate_ai_call --input call.json --dry-run
cat call.json | agentcall tool initiate_ai_call --input - --yesConfirmation and Safety for Coding Agents
Actions that spend money, contact someone or remove data ask first. In a non-interactive run they stop with exit code 4 unless --yes is passed.
- 27 read-only tools run directly.
- 12 tools that only change your own records or settings run directly.
- 23 tools need confirmation, including all 10 destructive tools.
The other 13 tools that need confirmation are:
provision_number, send_sms, reply_to_sms_conversation, initiate_call, initiate_ai_call, synthesize_speech, create_schedule, upgrade_to_pro, request_agentfm_callback, configure_inbound_ai, set_premium_voice, create_webhook, rotate_webhook_secret.
--dry-run shows the tool and arguments without calling it and needs no API key. Plan limits and abuse controls still apply on the server to every request.
The CLI does not replay a write that could run twice. If a write ends with exit code 7, it may have completed, so check its state before running it again.
JSON Output and Exit Codes for Scripts
With --json, stdout contains one JSON document and errors go to stderr.
{ "ok": true, "tool": "get_plan", "data": { "plan": "pro" }, "warnings": [] }{
"ok": false,
"error": {
"code": "plan_limit_voice_ai",
"message": "Outbound AI requires Pro.",
"exitCode": 5,
"statusCode": 403,
"upgradeUrl": "https://agentcall.co/billing",
"upgradeToolName": "upgrade_to_pro",
"hint": "Upgrade at https://agentcall.co/billing"
}
}| Exit code | Meaning |
|---|---|
| 0 | Success |
| 1 | General or API error |
| 2 | Invalid command, flags or input |
| 3 | Missing or rejected API key |
| 4 | Confirmation required or declined. Nothing ran |
| 5 | Plan limit. See upgradeUrl |
| 6 | Rate limited |
| 7 | Network failure, timeout, or a write with an unknown outcome |
| 8 | Not found |
AgentCall CLI Environment Variables
| Variable | Purpose |
|---|---|
| AGENTCALL_API_KEY | API key. Takes priority over a saved key |
| AGENTCALL_BASE_URL | API URL override. Must be https, or http on localhost |
| AGENTCALL_TIMEOUT_MS | Per-request timeout in milliseconds |
| AGENTCALL_CONFIG_DIR | Directory for the saved key |
AgentCall CLI vs MCP Server vs Node.js SDK
| Option | Best for | Requires |
|---|---|---|
| CLI | Coding agents, shell scripts and quick tasks in a terminal | Node.js 20+ |
| Hosted MCP | Claude Desktop, Cursor, Windsurf and other MCP clients | None |
| Node.js SDK | Calling AgentCall from your own application code | Node.js |
| REST API | Any language or platform | None |
The CLI uses the same tool catalog as the AgentCall MCP server, so both expose the same 62 tools.