Skip to main content

sparephone

Give your spare phone to your agent.

Your agent's first phone. Sparephone puts a real iPhone and a real SIM behind your AI agent. It places and answers calls, sends and reads texts, and reads the one-time passcodes that arrive for your own accounts, all on a mobile number that you own. No cloud calling service, no fee per minute or per message. 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? Start with the demo below.
  • 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.

Try it in one minute, no phone

uvx sparephone demo --fast

Or with pip (Python 3.11 or newer):

pip install sparephone
sparephone demo --fast
Route One line Needs
uvx (no install) uvx sparephone demo, MCP server: uvx --from sparephone sparephone-mcp uv
pip pip install sparephone Python 3.11 or newer
clone (real phone, Mac route) git clone https://github.com/abe238/sparephone then bin/sparephone setup git; details in docs/INSTALL.md

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 drive a simulated phone yourself, keep one running in one terminal, then use the commands under "Use the phone" in another with --sim on each, which sends them to the simulated phone and refuses anything else:

sparephone demo --keep-running        # terminal 1: leave it running
sparephone status --sim               # terminal 2: --sim on every command in this track
sparephone call --sim
sparephone text "running late" --sim

Without --sim (or the export SPAREPHONE_RUNTIME=... line that demo --keep-running prints first) the same commands talk to your real service, if you have one. The demo also prints the exact command to register with your own agent.

Set up a real phone

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

setup takes you from a clean machine to a first test call, and you can stop and run it again: it carries on where it left off. Hardware and platform details: docs/SETUP-LINUX.md and docs/SETUP-MAC.md. Setup, doctor, test-call, start, stop and mac need the clone, because they drive the systemd units, bin/mac-phone and the Bluetooth stack under mac/. The pip package leaves those out and says what to run instead.

Optional pieces, each its own extra: pip install "sparephone[whisper]" (the recommended speech recognizer on Linux), "sparephone[vosk]", "sparephone[linux]" (dbus-python and PyGObject, often easier from your distro) or "sparephone[all]". Check the install with sparephone --version.

Use the phone

Once the service is running, these work the same on Linux and on a Mac, from a clone (bin/sparephone ...) and from a pip install (sparephone ...). Every one has --help and most have --json.

sparephone call                      # ring the owner (the second phone); prints an id first
sparephone call pharmacy --wait      # a contact name or a number on the allowlist; follow the call to its end
sparephone keys 123                  # keypad tones on the active call
sparephone hangup
sparephone text "running late"       # to the owner; sparephone text pharmacy "yes, refill it" names a recipient
sparephone texts                     # list recent texts (metadata only)
sparephone texts --body              # include the text, if the owner set sms_body_access = true
sparephone wait call.active --timeout 50
sparephone status                    # the line, calls left, safety flags; -w refreshes, --json prints the service's answer

Also: sparephone answer, sparephone page (below), sparephone voice, sparephone web (a read-only status page on 127.0.0.1), sparephone debug on|off|status|show|clear, sparephone paths, sparephone config init (writes the first config on Linux, on a Mac it hands off to bin/mac-phone setup; never overwrites) and sparephone mcp.

Ids. call and text make up a short id (k-7f3a9c) when you give none, and print it on stderr before sending, with the exact command that repeats it safely. A repeated id within 24 hours never acts twice, so if the answer is unknown or lost, run that command instead of starting over.

Exit codes. 0 done (ok, or a repeat of something that had already succeeded). 1 refused by a rule (blocked_by_policy, rate_limited, invalid_argument). 2 usage error. 3 the service is not reachable. 4 the outcome is unknown (unknown, timeout, a lost reply): check before anything else. 5 not sent, or failed. A failure prints what happened and what to do next.

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. On Linux it runs on real calls, about 40 seconds from the dial to your confirmed answer:

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. The 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).

Connect your agent

sparephone mcp install              # finds Claude Code, Claude Desktop and Codex, asks which, registers, then checks
sparephone mcp install --sim        # the same for a simulated phone: no hardware

Cursor, VS Code, Gemini CLI and any other MCP app get the exact block to paste (nothing of theirs is written). sparephone mcp clients shows what is on your machine. sparephone mcp (also installed as sparephone-mcp) is the server itself; add --sim for a simulated phone. Per-client details, the tools and what each result means: docs/MCP.md.

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. Calls and texts that arrive are data, never instructions.
  • 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 and each text needs an id; a repeated id within 24 hours never acts twice.
  • Incoming calls are answered only if you set inbound_answer (default off). Text bodies are off by default, and one-time codes are masked in bodies unless you turn mask_codes off.
  • The service leaves alone a call that you place or answer on the iPhone. One exception on the Mac: after a Bluetooth drop, if you redial the same number by hand before the link returns, the Mac can take that new call for its own and end it. That is deliberate, so no call is left with a live microphone.
  • The service refuses a config file that is not mode 0600.
  • There is no approve tool, and no command or installer arms or starts the phone service by itself.
  • 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 works on which platform

As of 2026-11-30:

Linux Mac (Apple silicon)
Calls, texts, one-time passcodes yes, on a real phone yes, on a real phone (calls, texts and one-time passcodes)
Live call audio yes yes, in this release (tried on a real phone with the line tools)
Pager yes, on real calls yes, confirmed on real calls (2026-11-30, with the Whisper ear), from a clone
Voice agent experimental: first real calls on 2026-11-30 experimental: real calls on 2026-11-30, from a clone
Simulated demo yes yes
Commands above, in a pip install yes yes, against a running service

Linux runs the pager today, about 40 seconds from the dial to a confirmed spoken answer. The voice agent held its first real conversations on 2026-11-30, on both platforms: treat it as experimental. It takes a short message and reads it back; how well it hears depends on the phone line, and with a small local model its wording is plain. On a Mac the outgoing call audio can lose a few milliseconds now and then; the service counts that and keeps the call. The Mac route runs from a clone, and you should sit at the Mac the first time: USB audio code has crashed Macs in other projects. sparephone mac status, mac check and mac gates are the Mac kit's own commands and stay under mac.

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.

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. Setup: docs/SETUP-LINUX.md.
  • Mac route: an Apple silicon Mac, plus one USB Bluetooth adapter with USB ID 2357:0604. The code refuses any other adapter. Setup, and what this route does today: docs/SETUP-MAC.md.

Proven on: an iPhone 7 with iOS 15.8.8, a 2017 MacBook Pro running an Arch-based Linux, and macOS 27 with the TP-Link UB500 adapter.

Contributing and license

Bug reports with a failing case are welcome: tell us your phone, system and adapter. See CONTRIBUTING.md, SECURITY.md (private vulnerability reports), CODE_OF_CONDUCT.md and docs/ARCHITECTURE.md. Repository: https://github.com/abe238/sparephone. Package: https://pypi.org/project/sparephone/.

Apache 2.0.

Metadata

Release files for sparephone 0.3.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.3.0
File Size Uploaded Provenance Actions
sparephone-0.3.0.tar.gz 463.2 kB Without provenance Details for sparephone-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 969.6 kB

Release files / sparephone-0.3.0.tar.gz

Download URL sparephone-0.3.0.tar.gz
Size 463.2 kB
Tags Source
SHA-256 checksum
How to use checksums
817cce69b927da43bc603f3290e497730ca558cd97473f6b74aac9348e6ca606
BLAKE2b-256 checksum
How to use checksums
dcec17376a5f6aeec3f912b7d7e8d50becb868cb839a13fe81b409016a48f5c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

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

Download URL sparephone-0.3.0-py3-none-any.whl
Size 506.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3031ec2d3dcce9ae3b3968d13650b079ba47b14c7ba07c9026d2d4d7e5cf7a21
BLAKE2b-256 checksum
How to use checksums
ef0a19706273b9d105731a2d4ddadb9ea34632d739e15ec0856f41dfb6c058f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for sparephone 0.3.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