feat: equip ACP agents with phone numbers via AgentPhone#19
Draft
celesteanglm wants to merge 2 commits into
Draft
feat: equip ACP agents with phone numbers via AgentPhone#19celesteanglm wants to merge 2 commits into
celesteanglm wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
acp phonesubcommand 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.api.agentphone.ai(Bearer auth viaAGENTPHONE_API_KEYenv 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 firstacp phone provision.AGENTPHONE_API_KEYshould live on the ACP backend and the CLI should call backend-proxied endpoints (mirroringacp email/acp card). The file layout is set up to make that swap touch onlysrc/lib/api/agentphone.ts.Commands wired
Deliberately deferred:
release <numberId>(destructive, needs double-confirm UX), webhook secret/URL management, SSE live-transcript streaming, MMS upload helper.Test plan
npm run typecheckcleannpm run buildproduces a 250.4 KB esm bundleacp phone --help,acp phone sms --help,acp phone calls --helpregister and renderAGENTPHONE_API_KEYsurfacesError: AGENTPHONE_API_KEY not set.with the recovery hintacp phone provision --voice-mode hosted --area-code 415 --yesagainstapi.agentphone.ai— number provisioned and attached, persona created, mapping written to~/.config/acp/phone.jsonacp phone whoamirenders the linked persona + attached number after provisionacp phone numbers,acp phone attach <id>— wired but not yet exercised against the live APIacp 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-endacp phone provision --voice-mode webhook— wired but requires a real--webhook-urlto verify🤖 Generated with Claude Code