Skip to main content

sparephone

Give your spare phone to your agent.

Your agent's first phone. Sparephone lets your AI agent use a real iPhone and SIM. It places and answers calls, sends and reads texts, and reads the one-time codes that arrive for your own accounts, all on a mobile number that you own. Use it in place of a costly cloud calling service. Site: https://sparephone.abediaz.ai

  • You need: a spare iPhone with a $30/yr SIM plan, and a Linux laptop or a Mac with a small $9 USB Bluetooth adapter. A second phone helps for test calls. No phone yet? sparephone demo runs without one.
  • It stays inside your rules: an allowlist, hourly limits and a refusal of emergency numbers, enforced in code. No prompt or phone tool can change them.

Install

pip install sparephone              # the service, the command line, the MCP server, the pager, the demo: standard library only
pip install "sparephone[whisper]"   # adds faster-whisper: the recommended speech recognizer on Linux
pip install "sparephone[linux]"     # adds dbus-python and PyGObject for the Linux backend (often easier from your distro's packages)
pip install "sparephone[vosk]"      # adds the Vosk speech recognizer (needs a model folder you download yourself)
pip install "sparephone[all]"       # linux, vosk and whisper
sparephone --version

It needs Python 3.11 or newer and installs two commands: sparephone and sparephone-mcp (the same MCP server as sparephone mcp).

What works from the pip package: demo, page, mcp, voice, web, debug, paths, status, ctl (Linux) and migrate. On Linux the installed package imports the phone service and reads a running one (sparephone status), but it cannot set a service up: the systemd units, the audio routing files and the installers are in the source tree only.

What needs the source tree. setup, doctor, test, start, stop, check, gates, mac and the whole Mac Bluetooth route run only from a clone of the repository. They drive the systemd units, bin/mac-phone and the Bluetooth stack that the Mac route vendors under mac/bumble-probe, and none of that is in the pip package. From the package they print what to run instead. There is no mac extra, because that route cannot run from a pip install:

git clone https://github.com/abe238/sparephone
cd sparephone
bin/sparephone setup     # the guided setup; `bin/sparephone doctor` runs the same checks and changes nothing

Try it without a phone

sparephone demo --fast

The demo runs the real service and its real rules against a simulated phone. Every line starts with [SIMULATED]. Real output (abbreviated):

[SIMULATED] 4/11 The agent tries to dial +12065550199, which is NOT on the allowlist.
[SIMULATED]     Service answered: blocked_by_policy. Rule that decided: not_on_allowlist. ...
[SIMULATED] 5/11 The agent tries to dial 911.
[SIMULATED]     Service answered: blocked_by_policy. Rule that decided: emergency_number. ...
[SIMULATED] 11/11 The agent dials +12065550142 again.
[SIMULATED]     Service answered: rate_limited. Rule that decided: rate_limited. ...

To point your own agent at a simulated phone, run sparephone demo --keep-running. It prints the exact sparephone mcp --sim --runtime DIR command to register.

What it does

  • Calls. Place a call, answer one, hang up, send keypad tones: sparephone ctl dial owner --call-id first-1, ctl answer, ctl hangup, ctl dtmf DIGITS. A number must be on your allowlist to be dialed.

  • Texts. sparephone ctl sms-send and ctl sms-read. Message bodies stay hidden until you set sms_body_access = true in the config, and one-time codes are masked in bodies unless you turn mask_codes off.

  • An agent interface. sparephone mcp speaks MCP over stdio with these tools: phone_status, phone_dial, phone_answer, phone_hangup, phone_send_dtmf, phone_send_sms, phone_read_sms and phone_wait_for_event. There is no approve tool.

  • A voice agent. sparephone voice talks on a call: speech to text, a language model or a fixed script, then text to speech (--once, --check, --write-default-config).

  • Page the owner. One command phones only the owner when something breaks, says what happened, takes a spoken choice, reads it back and needs a spoken yes:

    sparephone page --choice "roll back" --choice "leave it" "Build 412 failed on main"
    

    Add --dry-run to print the plan and the speech engines without calling or texting.

  • A status page and debug log. sparephone web serves a read-only status page on 127.0.0.1 only. sparephone debug on|off|status|show|clear controls a debug log that is off by default.

Speech for the voice agent and the pager

Speech to text can use faster-whisper (Linux, the recommended engine), Vosk, or Parakeet (Apple silicon, needs the parakeet_mlx package). Text to speech can use flite, the Phonon speech server, or a speech service of your own over HTTP. With no engine, sparephone page --dry-run exits 13 and says so.

For Whisper on Linux:

pip install "sparephone[whisper]"
sparephone page --fetch-speech-model    # the one step that uses the network: downloads the configured model once
sparephone page --check-speech          # builds the engines from voice.toml and says which are active

The model is never downloaded during a call. Setting stt = "whisper" (or "auto") and the model name goes in voice.toml; sparephone voice --write-default-config writes a starting file. The repository's docs/SPEECH-LINUX.md has every step.

Is it safe?

These rules are in the service's code (sparephone/policy.py, service.py), not in a prompt. Give the agent no write access to the config file.

  • Only allowlisted numbers can be dialed or texted.
  • The service refuses emergency and short numbers, whatever the allowlist says. After it sees one (an incoming call from one included) it answers nothing for 60 minutes.
  • The default limits are 4 calls and 10 texts an hour, kept on disk.
  • Each dial needs a call id; a repeated id never redials.
  • Incoming calls are answered only if you set inbound_answer (default off). Text bodies are off by default.
  • The service leaves alone a call that you place or answer on the iPhone.
  • The service refuses a config file that is not mode 0600.
  • The pager phones only the owner number and needs a spoken yes before acting on a choice.

A code rule refuses every case that matches it, including some a person would allow. A wrong refusal costs a retry. Use sparephone to read codes for accounts you own; using it to get past someone else's verification is misuse. This service places real calls that can annoy or harm people. Consent, recording and AI-voice rules depend on where you and the other person are, and you are responsible for them. This is not legal advice.

What it does not do

  • It does not open apps or control the screen.
  • One phone means one line. For many numbers at once, use a cloud calling service.
  • If the Bluetooth link drops during a call, the iPhone can move the call to its own handset, and the far side can hear the room.

Hardware

  • Linux route: a Linux computer with Bluetooth, a spare iPhone with a SIM and a second phone to receive test calls.
  • Mac route: an Apple silicon Mac, plus one USB Bluetooth adapter with USB ID 2357:0604. The code refuses any other adapter. Run it from a clone, and sit at the Mac the first time: USB audio code has crashed Macs in other projects.

Other phones, systems and adapters are untested.

Contributing and license

Bug reports with a failing case are welcome: tell us your phone, system and adapter. The dated record is docs/JOURNEY.md and the decisions are in docs/DECISIONS.md in the repository: https://github.com/abe238/sparephone.

Apache 2.0.

Metadata

Release files for sparephone 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sparephone 0.1.0
File Size Uploaded Provenance Actions
sparephone-0.1.0.tar.gz 353.6 kB Without provenance Details for sparephone-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sparephone 0.1.0
File Interpreter ABI Platform Actions
sparephone-0.1.0-py3-none-any.whl Python 3 none any Details for sparephone-0.1.0-py3-none-any.whl

Total release size: 737.8 kB

Release files / sparephone-0.1.0.tar.gz

Download URL sparephone-0.1.0.tar.gz
Size 353.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a0a74c8d33934b5dd15ee05b21662c9684d0adceee0de332fbb632af22a409bf
BLAKE2b-256 checksum
How to use checksums
b9f266b4de3be7b0318f5b5f7b0a0b7317e8be08df184cfe815ac35b82864c42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / sparephone-0.1.0-py3-none-any.whl

Download URL sparephone-0.1.0-py3-none-any.whl
Size 384.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c33b179886ec5ded1b5a471647c40116897eecba9afc53d05077f6244ab99e3
BLAKE2b-256 checksum
How to use checksums
7e997822a964451533b07cf03470de7ca04e4ac4b45f6aa91ad246872c212ce6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for sparephone 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page