Telephony

From raphaelmansuy/edgecrab · View interactive version

Telephony is an AI agent skill from the GitHub repository raphaelmansuy/edgecrab. Give Hermes phone capabilities without core tool changes. Provision and persist a Twilio number, send and receive SMS/MMS, make direct calls, and place AI-driven outbound calls through Bland.ai or Vapi.

How to use this skill

Skill file

Telephony — Numbers, Calls, and Texts without Core Tool Changes

This optional skill gives Hermes practical phone capabilities while keeping telephony out of the core tool list.

It ships with a helper script, scripts/telephony.py, that can:

What this solves

This skill is meant to cover the practical phone tasks users actually want:

It does not turn Hermes into a real-time inbound phone gateway. Inbound SMS is handled by polling the Twilio REST API. That is enough for many workflows, including notifications and some one-time-code retrieval, without adding core webhook infrastructure.

Safety rules — mandatory

  1. Always confirm before placing a call or sending a text.
  2. Never dial emergency numbers.
  3. Never use telephony for harassment, spam, impersonation, or anything illegal.
  4. Treat third-party phone numbers as sensitive operational data:
  1. It is fine to persist the agent-owned Twilio number because that is part of the user's configuration.
  2. VoIP numbers are not guaranteed to work for all third-party 2FA flows. Use with caution and set user expectations clearly.

Decision tree — which service to use?

Use this logic instead of hardcoded provider routing:

1) "I want Hermes to own a real phone number"

Use Twilio.

Why:

Use cases:

2) "I only need the easiest outbound AI phone call right now"

Use Bland.ai.

Why:

Tradeoff:

3) "I want the best conversational AI voice quality"

Use Twilio + Vapi.

Why:

Recommended flow:

  1. Buy/save a Twilio number
  2. Import it into Vapi
  3. Save the returned VAPI_PHONE_NUMBER_ID
  4. Use ai-call --provider vapi

4) "I want to call with a custom prerecorded voice message"

Use Twilio direct call with a public audio URL.

Why:

Files and persistent state

The skill persists telephony state in two places:

`~/.edgecrab/.env`

Used for long-lived provider credentials and owned-number IDs, for example:

`~/.edgecrab/telephony_state.json`

Used for skill-only state that should survive across sessions, for example:

This means:

Locate the helper script

After installing this skill, locate the script like this:

SCRIPT="$(find ~/.edgecrab/skills -path '*/telephony/scripts/telephony.py' -print -quit)"

If SCRIPT is empty, the skill is not installed yet.

Install

This is an official optional skill, so install it from the Skills Hub:

hermes skills search telephony
edgecrab skills install official/productivity/telephony

Provider setup

Twilio — owned number, SMS/MMS, direct calls, inbound SMS polling

Sign up at:

Then save credentials into Hermes:

python3 "$SCRIPT" save-twilio ACXXXXXXXXXXXXXXXXXXXXXXXXXXXX your_auth_token_here

Search for available numbers:

python3 "$SCRIPT" twilio-search --country US --area-code 702 --limit 5

Buy and remember a number:

python3 "$SCRIPT" twilio-buy "+17025551234" --save-env

List owned numbers:

python3 "$SCRIPT" twilio-owned

Set one of them as the default later:

python3 "$SCRIPT" twilio-set-default "+17025551234" --save-env
# or
python3 "$SCRIPT" twilio-set-default PNXXXXXXXXXXXXXXXXXXXXXXXXXXXX --save-env

Bland.ai — easiest outbound AI calling

Sign up at:

Save config:

python3 "$SCRIPT" save-bland your_bland_api_key --voice mason

Vapi — better conversational voice quality

Sign up at:

Save the API key first:

python3 "$SCRIPT" save-vapi your_vapi_api_key

Import your owned Twilio number into Vapi and persist the returned phone number ID:

python3 "$SCRIPT" vapi-import-twilio --save-env

If you already know the Vapi phone number ID, save it directly:

python3 "$SCRIPT" save-vapi your_vapi_api_key --phone-number-id vapi_phone_number_id_here

Diagnose current state

At any time, inspect what the skill already knows:

python3 "$SCRIPT" diagnose

Use this first when resuming work in a later session.

Common workflows

A. Buy an agent number and keep using it later

  1. Save Twilio credentials:
python3 "$SCRIPT" save-twilio AC... auth_token_here
  1. Search for a number:
python3 "$SCRIPT" twilio-search --country US --area-code 702 --limit 10
  1. Buy it and save it into ~/.edgecrab/.env + state:
python3 "$SCRIPT" twilio-buy "+17025551234" --save-env
  1. Next session, run:
python3 "$SCRIPT" diagnose

This shows the remembered default number and inbox checkpoint state.

B. Send a text from the agent number

python3 "$SCRIPT" twilio-send-sms "+15551230000" "Your deployment completed successfully."

With media:

python3 "$SCRIPT" twilio-send-sms "+15551230000" "Here is the chart." --media-url "https://example.com/chart.png"

C. Check inbound texts later with no webhook server

Poll the inbox for the default Twilio number:

python3 "$SCRIPT" twilio-inbox --limit 20

Only show messages that arrived after the last checkpoint, and advance the checkpoint when you're done reading:

python3 "$SCRIPT" twilio-inbox --since-last --mark-seen

This is the main answer to “how do I access messages the number receives next time the skill is loaded?”

D. Make a direct Twilio call with built-in TTS

python3 "$SCRIPT" twilio-call "+15551230000" --message "Hello! This is Hermes calling with your status update." --voice Polly.Joanna

E. Call with a prerecorded / custom voice message

This is the main path for reusing Hermes's existing text_to_speech support.

Use this when:

Generate or host audio separately, then:

python3 "$SCRIPT" twilio-call "+155****0000" --audio-url "https://example.com/briefing.mp3"

Recommended Hermes TTS -> Twilio Play workflow:

  1. Generate the audio with Hermes text_to_speech.
  2. Make the resulting MP3 publicly reachable.
  3. Place the Twilio call with --audio-url.

Example agent flow:

Good hosting options for the MP3:

Important note:

F. Navigate a phone tree / IVR with Twilio direct calling

If you need to press digits after the call connects, use --send-digits.

Twilio interprets w as a short wait.

python3 "$SCRIPT" twilio-call "+18005551234" --message "Connecting to billing now." --send-digits "ww1w2w3"

This is useful for reaching a specific menu branch before handing off to a human or delivering a short status message.

G. Outbound AI phone call with Bland.ai

python3 "$SCRIPT" ai-call "+15551230000" "Call the dental office, ask for a cleaning appointment on Tuesday afternoon, and if they do not have Tuesday availability, ask for Wednesday or Thursday instead." --provider bland --voice mason --max-duration 3

Check status:

python3 "$SCRIPT" ai-status <call_id> --provider bland

Ask Bland analysis questions after completion:

python3 "$SCRIPT" ai-status <call_id> --provider bland --analyze "Was the appointment confirmed?,What date and time?,Any special instructions?"

H. Outbound AI phone call with Vapi on your owned number

  1. Import your Twilio number into Vapi:
python3 "$SCRIPT" vapi-import-twilio --save-env
  1. Place the call:
python3 "$SCRIPT" ai-call "+15551230000" "You are calling to make a dinner reservation for two at 7:30 PM. If that is unavailable, ask for the nearest time between 6:30 and 8:30 PM." --provider vapi --max-duration 4
  1. Check result:
python3 "$SCRIPT" ai-status <call_id> --provider vapi

Suggested agent procedure

When the user asks for a call or text:

  1. Determine which path fits the request via the decision tree.
  2. Run diagnose if configuration state is unclear.
  3. Gather the full task details.
  4. Confirm with the user before dialing or texting.
  5. Use the correct command.
  6. Poll for results if needed.
  7. Summarize the outcome without persisting third-party numbers to Hermes memory.

What this skill still does not do

Those would require more infrastructure than a pure optional skill.

Pitfalls

Verification checklist

After setup, you should be able to do all of the following with just this skill:

  1. diagnose shows provider readiness and remembered state
  2. search and buy a Twilio number
  3. persist that number to ~/.edgecrab/.env
  4. send an SMS from the owned number
  5. poll inbound texts for the owned number later
  6. place a direct Twilio call
  7. place an AI call via Bland or Vapi

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.