Skip to content

feat: equip ACP agents with phone numbers via AgentPhone - #19

Draft
celesteanglm wants to merge 2 commits into
Virtual-Protocol:mainfrom
celesteanglm:feat/agent-phone-numbers
Draft

feat: equip ACP agents with phone numbers via AgentPhone#19
celesteanglm wants to merge 2 commits into
Virtual-Protocol:mainfrom
celesteanglm:feat/agent-phone-numbers

Conversation

@celesteanglm

Copy link
Copy Markdown
Contributor

Summary

  • New acp phone subcommand tree links the active ACP agent to an AgentPhone persona so the agent can own a real SMS- and voice-enabled phone number, send/receive SMS, place AI-handled outbound calls, and fetch call transcripts.
  • Direct integration with api.agentphone.ai (Bearer auth via AGENTPHONE_API_KEY env var, retry on 429/5xx). Local ACP-agent → AgentPhone-agent mapping persisted in $ACP_CONFIG_DIR/phone.json; the AgentPhone persona is created lazily on first acp phone provision.
  • README documents the integration and flags the temporary direct-CLI path: long-term, AGENTPHONE_API_KEY should live on the ACP backend and the CLI should call backend-proxied endpoints (mirroring acp email / acp card). The file layout is set up to make that swap touch only src/lib/api/agentphone.ts.

Commands wired

acp phone whoami
acp phone provision [--area-code] [--country US] [--voice-mode webhook|hosted]
                    [--webhook-url] [--system-prompt] [--yes]
acp phone numbers
acp phone attach <numberId>
acp phone sms send --to --body [--from]
acp phone sms inbox
acp phone sms thread <conversationId>
acp phone call --to [--from-number-id] [--greeting]
acp phone calls list
acp phone calls transcript <callId>

Deliberately deferred: release <numberId> (destructive, needs double-confirm UX), webhook secret/URL management, SSE live-transcript streaming, MMS upload helper.

Test plan

  • npm run typecheck clean
  • npm run build produces a 250.4 KB esm bundle
  • acp phone --help, acp phone sms --help, acp phone calls --help register and render
  • Missing-key path: unsetting AGENTPHONE_API_KEY surfaces Error: AGENTPHONE_API_KEY not set. with the recovery hint
  • acp phone provision --voice-mode hosted --area-code 415 --yes against api.agentphone.ai — number provisioned and attached, persona created, mapping written to ~/.config/acp/phone.json
  • acp phone whoami renders the linked persona + attached number after provision
  • acp phone numbers, acp phone attach <id> — wired but not yet exercised against the live API
  • acp phone sms send / inbox / thread — wired but not yet exercised end-to-end (needs an inbound SMS / second number)
  • acp phone call, acp phone calls list / transcript — wired but not yet exercised end-to-end
  • acp phone provision --voice-mode webhook — wired but requires a real --webhook-url to verify

🤖 Generated with Claude Code

celesteanglm and others added 2 commits May 15, 2026 16:25
Add `acp phone` command tree wiring the active ACP agent to an AgentPhone
persona (https://agentphone.ai) so it can own SMS- and voice-enabled
numbers, send texts, place AI-handled outbound calls, and read call
transcripts.

Direct client to api.agentphone.ai with retry on 429/5xx; key sourced
from AGENTPHONE_API_KEY env var only (no keychain storage yet). Local
ACP-agent → AgentPhone-agent mapping persisted in
\$ACP_CONFIG_DIR/phone.json so the persona is created lazily on first
`acp phone provision`.

Subcommands: whoami, provision, numbers, attach, sms send|inbox|thread,
call, calls list|transcript. Destructive `release` and webhook secret
management deliberately deferred to follow-ups.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Document the planned migration of `acp phone` from a direct
CLI-to-AgentPhone integration to a backend-proxied flow, so future
contributors know which files to expect changes in (only
src/lib/api/agentphone.ts; src/commands/phone.ts stays thin) and what
the backend needs to add. Also enumerate end-to-end-verified vs
wired-but-unverified subcommands and the deliberate omissions
(release, webhook secret management, SSE transcript streaming, tests).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant