Skip to content
Projets

À propos

Give Hermes Agent your Android phone's senses via Termux:API: notifications, SMS, UPI money, scam checks, find my phone

IA et apprentissage automatique

Comment ces chiffres sont mesurés

What you can do

  • "Anything important on my phone?" - A digest of notifications, missed calls and SMS. Noise is filtered out and OTPs are hidden.
  • "How much did I spend this week?" - A spending table by category, built from bank, card and UPI SMS
  • "How much did I receive by UPI today?" - Today's incoming payments: handy for shop owners
  • "Text Rahul I'm 10 minutes late" - Looks up Rahul. If there are two, it asks which one. Then Hermes shows an approval prompt with the exact number and text.

Progression mesurée des étoiles

in 24h
0
in 7 days
Historique en cours
in 15 days
Historique en cours
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Phone Senses

Give Hermes Agent and Claude the senses of your own Android phone.
Notifications, SMS, UPI money, a live scam tripwire and find my phone, through Termux:API.
Your rules, fingerprint countersign and receipts for every agent. And an Android app and WhatsApp helper
that stop phone scams before the money leaves, with your family, in English and Hindi.

tests GitHub stars latest release 32 tools Hermes Agent 0.23+ PyPI Python 3.11+ stdlib only MIT

Website · Install · See it work · App for families · Money was taken? · Privacy


  • No screen tapping. Each question is one Android API call, not 15 screenshots and taps.

  • Your own phone, your own SIM. No cloud phone numbers, no third-party services.

  • Safe by design. Signed requests over HTTPS with a pinned certificate, approval for every send, OTPs hidden, no SMS text stored, and a privacy mode that keeps message text from the model.

  • Catches a scam while it happens. The scam tripwire links an unsaved caller (SIM or WhatsApp), a screen-sharing app or sideloaded APK, an OTP and money leaving, then warns you out loud on the phone. How it works ↓

  • Does more than warn. It checks a caller through the real person's saved number, brings in a trusted person before a risky payment, and builds the recovery pack if money has left.

  • Keeps every agent in line, not only itself. Your rules in plain words ("ask me before anything over 200", "no payments after 10 pm") apply to every tool any agent calls in Hermes. Approve with your fingerprint on the phone, keep one-time codes out of every agent's email and web reads, and keep tamper-evident receipts. How ↓

  • An app for the whole family. Check a message or screenshot, ask "is it really them?" on WhatsApp, and get a pause before paying, in English or Hindi, with big text and read-aloud. The app ↓

  • Works with Claude too. The same tools as an MCP server: Claude Code plugin, Claude Desktop, and claude.ai over a Cloudflare tunnel. How ↓

phone-harness gives Hermes hands on your phone. Phone Senses gives it the phone's senses.

Contents

Phone Senses app: scam protection for families

Scammers call pretending to be the bank, the police, the electricity office or your own son. They rush you, and they ask for a code or a payment now. Phone Senses helps you stop, check, and ask family first.

Home: four big buttons: Check a message, Is it really them?, My family, Money was taken A scam message checked: red, This looks like a scam, with the reasons in plain words A Hindi screenshot checked on the phone: be careful, it threatens to cut your electricity Kin Verify: red, Raju says this is NOT them. Do not pay. Pause: Wait a moment before you pay, with one big button to call Raju

🔍 Check a message. Not sure about an SMS, a WhatsApp message, a link or a screenshot? Share it to Phone Senses, or paste it. You get a clear answer in English or Hindi, and the reasons in plain words:

  • 🔴 "This looks like a scam."
  • 🟠 "Be careful."
  • 🟡 "We're not sure. Ask family."
  • 🟢 "We didn't find signs of a scam."

🤝 Is it really them? Someone calls saying they are your son and needs money urgently. Phone Senses asks your real son on WhatsApp, on the number you saved, "Is this really you?":

  • He says no: you see red, "Raju says this is NOT them. Do not pay."
  • He hasn't answered yet: you see "Not confirmed yet. Don't send money until Raju confirms." Silence never makes anyone a scammer; he may simply be driving.

👨‍👩‍👧 My family. Add a son, daughter or friend. They join with one WhatsApp message. They only ever get "Is this really you?" questions, never your messages.

✋ Wait before you pay. After a call from a number that isn't saved, or a risky message, Phone Senses can warn you if you open a payment app such as PhonePe, Google Pay or Paytm: "Wait a moment before you pay." There's one big button to call family. Turn on "Protect me automatically after calls", and this also covers WhatsApp calls from unsaved numbers. That part is still to be confirmed on real phones with real WhatsApp.

Made for everyone, not just "tech people": big text, one clear choice on each screen, Hindi or English, and it can read everything aloud.

What Phone Senses never does

  • It never reads your SMS inbox or your call history.
  • It never blocks or cuts a call. It only warns you.
  • It never shows your family your messages.
  • It never keeps the text of the messages you check, or your screenshots. Screenshots are read on your phone.
  • It never calls a real person a scammer because they didn't answer.

Status, honestly: Phone Senses is not on the Play Store yet, and the WhatsApp helper is not live. The app runs and is tested on an Android emulator. Before release it needs a test on real phones, a review of the Hindi by a native speaker, and approvals from Google Play, Meta (WhatsApp) and India's SMS registry (DLT). The full list is in VERIFY_BEFORE_RELEASE.md.

Your data in the app

  • Kept until you delete it:
    • your mobile number;
    • the name your family calls you (optional);
    • your language;
    • your family list;
    • when you last used Phone Senses, and which optional protections are on (on/off only).
  • Kept for 24 hours, then deleted automatically:
    • Kin Verify questions and answers;
    • your "Was this right?" answers, with your optional note.
  • Never stored:
    • the text of messages you check;
    • your screenshots;
    • your sign-in codes (only a scrambled check value is kept, for 5 minutes).
  • Anonymous daily totals (for example "120 messages checked today") measure the pilot; they aren't linked to anyone.
  • Before anything goes to our server, the app tells you what and why, and waits for "I agree".
  • To delete everything: Settings → Delete my data. On WhatsApp, send DELETE.
  • Full privacy policy (draft): site/privacy.html.

If money was taken

Act at once: money is more often stopped when it is reported within hours.

  1. Call 1930, India's National Cyber Crime Helpline.
  2. Call your bank on the number printed on your card or in its official app, and block UPI, cards and net banking.
  3. Report at cybercrime.gov.in and keep the complaint number.
  4. Report the scam number on Sanchar Saathi (Chakshu).

Nobody can get your money back for a fee. Anyone who offers to is running a second scam.

The app's Money was taken button has a "Call 1930" button and these steps, and works without internet.

See it work

Every clip is a real Hermes Agent session, step by step. Left: Hermes exactly as it looked in the terminal, in its own colours. Right: the phone, recorded at the same moment. Steps along the top show where you are: you ask, Hermes reads the phone, Hermes asks first (when it would act), the answer.

  • REAL PHONE: a moto g34 (Android 15) over Termux:API. Phone numbers, amounts and other people's names are blurred. Texts marked RE-CREATED were sent to my own number for the demo.
  • DEMO PHONE: bills and subscriptions ran on the built-in mock helper (I had no real bills that week).

Morning brief

Hermes reads the phone and gives a morning brief with the scam text flagged first; the phone shows the scam SMS on top

Scam tripwire: a scam call caught while it happens

The "AnyDesk installed" signal is staged (a labelled test notification); the phone's spoken warning is real. Hermes runs the scam tripwire; the phone shows a warning and says it out loud; Hermes answers STOP, this is a scam

It asks before it acts

Text Mom: Hermes shows the approval panel with the exact number and words, allowed once, sent from the SIM A second text: denied in the approval panel, nothing is sent and Hermes does not retry

Money from bank and UPI SMS

Spending this week by category, built from bank SMS (amounts blurred) UPI money received this week (amounts blurred)

Scam texts and one-time codes

Scam scoring covers the English/Indian patterns (fake KYC, UPI refunds, parcel re-delivery fees) and the Chinese ones (impersonating police, "safe account", deposit-before-refund, screen sharing, task/rebate and loan bait); links on carrier, bank and government domains are not treated as phishing, and official anti-fraud advisories are not reported as scams. Is this SMS a scam: high risk, with the reasons The OTP stays hidden: revealing it needs approval, nobody approved, so it stayed hidden

Bills and subscriptions (demo phone)

Bills due soon, from SMS, on the mock phone Subscriptions and the monthly total, on the mock phone

Watch rules, battery and find my phone

A watch rule catches the delivery SMS once A battery_below watch rule set up and verified Find my phone: it rings, speaks, vibrates and flashes
More real sessions: calls, photos, unattended mode, speak, clipboard, location, the helper log
Call approval panel, allowed once
real phone · place a call
Photo approval panel, allowed once
real phone · take a photo
Approval-gated tool refused in unattended mode
real phone · unattended (cron or -q): refused, nobody can approve
The phone helper's request log
real phone · helper log: paths only, never message text
Speak aloud
real phone · "Say 'dinner is ready' on my phone."
Clipboard bridge
real phone · "Copy this link to my phone."
Battery status
real phone · "What's my phone battery?"
Phone location with a Maps link
demo phone · "Where is my phone?"

Scam tripwire

Phone frauds ("KYC update", "digital arrest", fake bank support, "Hi Mum, new number") follow a sequence, not a single message. No single SMS looks bad enough, but the order and timing give the scam away:

unsaved caller (6 min)  →  "AnyDesk installed"  →  screen being shared  →  OTP SMS  →  ₹24,999 debited
        high                      high                    high              CRITICAL       CRITICAL

phone_scam_guard reads calls, notifications, SMS and bank debits together and decides in four steps:

  1. Signals. Unsaved callers on the SIM and on WhatsApp, Telegram, Signal, Zoom or Meet (from their call notifications); screen-sharing apps; sideloaded APKs (the "Smart Meter.apk" sent on WhatsApp) and apps asking to "see and control your screen"; scam scripts by SMS or chat, in English, Hindi and Hinglish, including "digital arrest" threats; OTPs, UPI collect requests and debits.
  2. One running incident, not a 30-minute window. The setup of a scam (a screen-sharing app, an APK, a scam script, a long call with a stranger) is remembered for a week and fades over a day or two, so the OTP that arrives tomorrow still connects to today's call.
  3. A probability, and an honest "unsure". A small, explainable score gives p_scam and a level: clear, low, watch (unsure, keep watching, no alarm), high or critical. A delivery call plus a delivery OTP is not an alarm. When you say an alert was the courier (phone_incident_mark), that caller counts as known and the same pattern needs more evidence next time.
  4. An action by what is at stake: stay quiet, keep watching, verify first (phone_verify texts the real person's saved number, which a voice clone cannot answer), a trusted pause (text your guardian before you pay) or recover (the evidence pack, 1930 and the deadlines).

With alert_phone the phone shows a warning and says it out loud, right in the middle of the call; with notify_guardian your guardian gets a text (after your approval). The OTP itself never leaves the plugin.

  • On demand: "Someone from my bank is on the phone, is this a scam?" or /phone guard.
  • Always on: add a scam_guard watch rule and run phone_watch_check with notify_phone (and notify_guardian) from a Hermes cron job every few minutes. Each incident alerts once, and again only if it escalates.
  • Try it without a scam: python phone_helper/helper.py --mock --mock-scenario scam plays a full scam call in progress with synthetic data.

A screen-tapping agent only sees one screen at a time, and a single-message scam filter only sees one SMS. The tripwire needs both history and every sensor at once, which is why it lives here. Limits: the call log shows a SIM call only after it ends, so during the call the warning comes from WhatsApp call notifications, the screen-sharing app, the OTP or the debit. The weights are hand-set and explainable, then tuned by your own verdicts: a warning, not a guarantee. Nothing here can hold a payment; only your bank can.

Your rules for every agent

Agents now pay, book, message and log in for people. Phone Senses sits in front of every tool call in Hermes (its own and every other plugin's or built-in tool), through Hermes's pre_tool_call, post_tool_call and transform_tool_result hooks:

Piece What it does
Your rules Plain words in the rules setting, which only you can edit: ask me before anything over 200, ask before payments over Rs 5000, no payments after 10 pm, no new payees at night, ask before messages, ask before logins, block email. Tools are matched by what their names say they do (money, messages, identity, or a word you name), amounts are read from their arguments. A rule either blocks the call or asks you. phone_rules shows how each rule was understood and can dry-run a call.
Countersign With countersign on, "ask" means the fingerprint prompt on your phone, which shows exactly what is being approved, instead of the prompt on the computer. An agent on the computer cannot answer it for you. Cancel, failure or 20 s without an answer blocks the call.
Code vault One-time codes are masked in the results of other tools that read mail, messages or the web (Gmail, IMAP, browsers, web_extract, Slack...), so an agent cannot read your emailed OTP to approve itself. Files, code and terminal output are never touched. phone_otp_reveal releases a code only after approval, with a stated purpose and, if you like, only from a named sender.
Receipts Every decision (asked, countersigned, blocked by a rule, refused on the phone, code hidden) and what then ran (done or failed) goes into a hash-chained log with no message text. phone_receipts checks the chain and matches paid amounts against your bank's own SMS. The morning brief opens with what your agents did and what was stopped.
Agent wants:  shop_checkout  amount 250  merchant "New Store"   (23:10)
Your rules:   "ask me before anything over 200"  → ask
              "no payments after 10 pm"          → block   ← the stricter rule wins
Result:       blocked, the agent is told why, a receipt is written. Nothing was paid.

/phone rules and /phone receipts show both from the chat.

What you can ask

You say What happens
"Anything important on my phone?" A digest of notifications, missed calls and SMS. Noise is filtered out and OTPs are hidden.
"How much did I spend this week?" A spending table by category, built from bank, card and UPI SMS
"How much did I receive by UPI today?" Today's incoming payments: handy for shop owners
"Text Rahul I'm 10 minutes late" Looks up Rahul. If there are two, it asks which one. Then Hermes shows an approval prompt with the exact number and text.
"Is this SMS a scam?" A risk level and the reasons: fake KYC, disconnection threats, look-alike links
"A caller from my bank asked me to install AnyDesk" The scam tripwire: the call, apps, codes and debits together, with a spoken warning on the phone
"Someone says he is my son calling from a new number" phone_verify texts your son's saved number: "reply YES with this code if it is really you"
"I just lost ₹25,000, what do I do?" phone_recovery_pack: call 1930 first, then the bank, the complaint text and the 5-day RBI deadline
"That alert was just the courier" phone_incident_mark: that number counts as known, the same pattern needs more evidence
"How safe is my phone set up?" phone_shield_score: a 0-100 score and the next thing to fix
"What did my agents do yesterday?" phone_receipts or the brief: done, asked, blocked, codes hidden, bank-confirmed payments
"Would my rules let an agent pay ₹500 at night?" phone_rules dry-runs the call against your rules
"Who is +91 70000 00999?" phone_scam_check with a number: saved contact, marked safe, seen in a scam alert, or unknown
"Tell me when my order is out for delivery" A watch rule. Run phone_watch_check from a Hermes cron job to get alerts.
"Find my phone" The phone rings at full volume, speaks, vibrates and flashes. Then the volume is restored.
"What bills are due soon?" Electricity, broadband, mobile and card bills found in your SMS, overdue ones first
"What subscriptions am I paying for?" Recurring charges (Spotify, Netflix, …) with cadence, next expected date and the monthly total
"Where are my parcels?" Latest status per shipment from courier and shop SMS: shipped, out for delivery, delivered
"Tell me when my battery drops below 20%" A battery_below watch rule: one alert, re-armed after the phone charges
"Good morning, brief me" Battery, missed calls, SMS from people, important notifications, scam alerts and yesterday's spending
"Where is my phone?" / "Read this aloud" / "Copy this link to my phone" Location with a Maps link / text-to-speech / clipboard

Slash command: /phone, /phone ring, /phone money week, /phone received today, /phone guard, /phone shield, /phone recover, /phone rules, /phone receipts, /phone brief, /phone pair.

Tools

Tool What it does Approval
phone_status Battery, charging, temperature, Wi-Fi, helper reachability
phone_notifications Notification digest with noise filter and app filter
phone_sms_list Search SMS (query, sender, days) with scam_risk per message
phone_sms_send Send an SMS from your SIM. Names return contact choices; nothing is sent until there is a number. yes
phone_calls Call log: missed, incoming, outgoing
phone_contacts Find contacts by name or number
phone_location Location with a Google Maps link
phone_ring Find my phone
phone_speak Text-to-speech on the phone
phone_clipboard Get or set the phone clipboard reading
phone_photo Take a photo for Hermes to see yes
phone_call Place a call yes
phone_otp_reveal Reveal the latest OTP for a stated purpose, optionally only from a named sender (off by default; needs the setting) yes
phone_money_sync Parse bank/UPI SMS into transactions; warns about duplicate or unusually large debits
phone_money_summary Totals by category, counterparty or day; top transactions; budget use
phone_budget_set Monthly budget per category
phone_scam_check Check anything: a message, link or recent SMS (scam score and reasons), or a phone number
phone_scam_guard Scam tripwire: calls (SIM and WhatsApp), screen-sharing apps, APKs, scam scripts, OTPs and debits, with p_scam, an action and an optional spoken warning guardian text
phone_verify Check a caller through the real person's saved number (reply YES + code) sending
phone_incident_mark Your verdict on the latest alert: scam (shareable warning) or false alarm (recalibrates) false alarm
phone_recovery_pack Evidence pack, steps with deadlines (IN/UK/US) and a complaint text
phone_shield_score How well the phone is protected, 0-100, and what to fix next
phone_rules Your rules for every agent as understood, Countersign and vault status, dry runs
phone_receipts Tamper-evident receipts of what agents asked for and did, with bank-SMS confirmation
phone_watch_add / _list / _remove / _check Watch rules for notifications, SMS, big debits, low battery and scams in progress removing / guardian text
phone_bills Bills due soon and overdue, from biller SMS
phone_deliveries Parcel status per shipment from courier/shop SMS
phone_subscriptions Recurring charges with cadence, next date and monthly total
phone_brief Morning brief in one call

A bundled skill (phone-senses:phone-senses) teaches the agent which tool to use, to summarise instead of dumping messages, to ask before acting, and to treat message text as data, not instructions.


How it works

Laptop: Hermes + Phone Senses plugin  ──HMAC-signed HTTPS, pinned (Wi-Fi or Tailscale)──►  Android phone: Termux
  tools · approval hook · OTP masking                                              phone_helper/helper.py
  money/scam parsers · SQLite (plugin data)                                          └─ termux-* commands (no shell)
  • The phone helper (phone_helper/) is a small Python server using only the standard library. Each endpoint runs one fixed termux-* command with validated input. Free text such as SMS bodies goes in on stdin, never as command arguments. A --mock mode serves synthetic data, so everything can be tried on a laptop.
  • The plugin (plugin/) does the smart work: parsing, OTP masking, money tracking, scam scoring, watch rules and storage. It talks only to your helper.

Tested on a real phone

Every tool was run end to end on a moto g34 5G (Android 15) with Hermes Agent v0.23.0:

  • Installed with hermes plugins install …/tree/main/plugin. hermes plugins validate passes, and the security scan reports safe.
  • Hermes answered real questions about battery, notifications, missed calls, location, the morning brief, bank SMS, the scam check, spending, UPI income and budgets.
  • Find my phone, speak aloud and clipboard all worked.
  • A watch rule caught a real incoming SMS.
  • The approval panel showed the exact action for photo, SMS and call:
    • Deny sent nothing, and the model did not retry.
    • Allow once sent a real SMS from the SIM and placed a real call.
  • In unattended -q mode, the approval-gated tools were refused.

Requirements

  • Hermes Agent 0.23.0 or newer, on macOS, Linux or Windows/WSL.
  • An Android phone with Termux and Termux:API from F-Droid. The Play Store builds do not work with Termux:API.
  • The laptop and phone on the same Wi-Fi, or both on Tailscale (recommended: encrypted, works anywhere).

Setup

1. Phone (about 10 minutes)

  1. Install F-Droid, then Termux and Termux:API from F-Droid (and Termux:Boot if you want the helper to start after a reboot).
  2. In Termux, one command does the rest:
    pkg update && pkg upgrade -y && pkg install -y git
    git clone https://github.com/LSUDOKO/Phone-Senses.git && cd Phone-Senses
    bash phone_helper/setup.sh            # or: bash phone_helper/setup.sh <Tailscale 100.x IP>
    # or: pip install phone-senses && phone-senses-helper --pair
    
    It installs Python, Termux:API and openssl, prints one pairing line (ps1|https://…), registers the Termux:Boot start script and starts the helper over HTTPS.
  3. Android permissions for Termux:API: SMS, Phone, Call logs, Contacts, Location and Camera. Also turn on Notification access for Termux:API.
  4. Battery: set Termux and Termux:API to Unrestricted. On Xiaomi phones also enable Autostart.
  5. Later starts (setup.sh already started it once):
    termux-wake-lock
    python phone_helper/helper.py --host 0.0.0.0 --port 8765    # or --host <Tailscale 100.x IP>
    
    A notification "Phone Senses helper running" stays visible while it runs. By hand instead of setup.sh: pkg install python termux-api openssl-tool, then python phone_helper/helper.py --pair.

More detail and troubleshooting: docs/06-phone-setup-termux.md and phone_helper/README.md.

Android 14/15 notes (found on a real phone):

  • Play Protect warns that Termux "was built for an older version of Android". That is expected for the F-Droid build; the install still goes through.
  • Allow Termux:API location all the time. The helper reads location in the background.
  • If text-to-speech ever stops responding, force-stop Termux:API once in Android settings.
  • If Android asks which app should place calls (for example Phone or Zoom), choose Phone.

USB instead of Wi-Fi: with USB debugging on, adb forward tcp:8765 tcp:8765 lets the laptop reach a helper started with --host 127.0.0.1. This is handy for demos when the phone is on mobile data.

2. Hermes

hermes plugins install https://github.com/LSUDOKO/Phone-Senses/tree/main/plugin
hermes plugins enable phone-senses

In Settings → Plugins → Phone Senses (or config.yaml), paste the whole pairing line into Pairing code. It carries the phone's address, the secret and the certificate fingerprint to pin, so there is nothing else to set. Hermes stores it as a secret (PHONE_SENSES_TOKEN). Optionally set a guardian for trusted pauses.

Then ask Hermes "what's my phone battery?", type /phone, and /phone shield to see what to turn on next.

Settings

Setting Default Meaning
helper_url http://127.0.0.1:8765 Where the phone helper listens (the pairing line sets it; set this only to override)
helper_token Pairing line `ps1
allow_otp_reveal false Allow phone_otp_reveal (it still goes through the approval prompt)
money_enabled true Money tracker
scam_check_enabled true Add scam_risk to SMS results
notifications_exclude_apps [] Apps to hide from digests
share_message_text true When off, SMS and notification text never reaches the model; senders, scam risk, money, bills and deliveries still do
guardian_name / guardian_number The trusted person for trusted pauses. Only you set these, never the model
country IN IN, UK or US: helplines, reporting links and deadlines in recovery packs
rules [] Your rules for every agent, one sentence each (see above). Only you can change them
countersign false Approve with your fingerprint on the phone instead of in Hermes
vault_other_tools true Mask one-time codes in other tools' mail, message and web results

Choosing a model

Any Hermes provider works. On a Nous Portal account without credits, free models such as meituan/longcat-2.5:free handled every Phone Senses tool in testing:

hermes config set model.provider nous
hermes config set model.default "meituan/longcat-2.5:free"

Alerts on a schedule (cron)

Watch rules work with Hermes cron. For example, to get alerts on Telegram:

hermes cron create "every 15m" "Run phone_watch_check and tell me about any matches. Say nothing if there are none." --deliver telegram
hermes cron create "every 1d at 08:00" "Give me my phone brief with phone_brief" --deliver telegram

Sending tools are never auto-approved in cron runs. With nobody there to approve, Hermes refuses them. To let the cron tripwire text your guardian, answer always once to the "text your guardian" prompt (rule phone_guardian_alert); that covers guardian alerts only.

Use with Claude (Claude Code, Claude Desktop, any MCP client)

The same 26 tools also run as an MCP server (mcp_server/server.py, standard library only), with the same OTP masking and scam scoring. Set up the phone first (Setup, step 1).

Claude Code (plugin with the MCP server and the skill):

/plugin marketplace add LSUDOKO/Phone-Senses
/plugin install phone-senses@phone-senses

Claude Code asks for the Phone helper URL and the Pairing code when you enable it. Then ask "what's my phone battery?".

Claude Desktop or another MCP client: clone the repo and add to the client's MCP config (claude_desktop_config.json for Claude Desktop):

{
  "mcpServers": {
    "phone-senses": {
      "command": "python3",
      "args": ["/path/to/Phone-Senses/mcp_server/server.py"],
      "env": { "PHONE_SENSES_URL": "http://<phone-ip>:8765", "PHONE_SENSES_TOKEN": "<pairing code>" }
    }
  }
}

Approvals: phone_sms_send, phone_call, phone_photo and phone_otp_reveal never run silently. If the client supports MCP elicitation, the server shows you the exact number and text and waits for Allow. Otherwise the client's own permission prompt is the approval: these tools are marked destructive, so do not add them to an allow list if you want to be asked each time. Money and watch data go to ~/.phone-senses-mcp/ (change it with PHONE_SENSES_DATA).

Not in the MCP server yet: your rules for every agent, Countersign, the code vault and receipts work through Hermes's hooks, so they apply in Hermes only. Under Claude the approval is the client's prompt (or MCP elicitation) for the tools that send, call or reveal.

Remote: claude.ai, the Claude apps, any remote MCP client

Run the MCP server on the phone itself and give it an HTTPS address with a free Cloudflare quick tunnel (no Cloudflare account needed). In Termux, from the Phone-Senses folder:

pkg install cloudflared
bash scripts/phone-remote.sh                  # read-only tools
bash scripts/phone-remote.sh --allow-actions  # also SMS send, call, photo, OTP reveal

It prints a connector URL like https://<random>.trycloudflare.com/mcp/<key>. In claude.ai or the Claude app open Settings → Connectors → Add custom connector and paste it. In Claude Code: claude mcp add --transport http phone-senses <url>. Try it on a laptop first with PS_HELPER_ARGS=--mock bash scripts/phone-remote.sh.

  • The URL is the password. Anyone holding it can read your phone. The key lives in ~/.phone-senses/mcp-key; delete that file to get a new key on the next start. Authorization: Bearer <key> against /mcp works too.
  • Action tools are off by default in remote mode: they appear only with --allow-actions, and then the client's own tool-approval prompt is the only check, so keep "ask every time" on for them.
  • What leaves the phone: there is no Phone Senses server in the middle. The tunnel runs on Cloudflare's network, which carries the traffic (HTTPS to the phone ends at Cloudflare's edge), and the tool results go to whichever Claude client you connected. The quick-tunnel URL changes on every start; for a fixed address use a named tunnel on your own Cloudflare account.

Try it without a phone

python phone_helper/helper.py --pair --secret-file /tmp/ps-secret
python phone_helper/helper.py --mock --secret-file /tmp/ps-secret &
PHONE_SENSES_SECRET=/tmp/ps-secret python scripts/try_tool.py /phone money week
PHONE_SENSES_SECRET=/tmp/ps-secret python scripts/try_tool.py phone_notifications limit=5

All mock data is synthetic: fake names and +91 9000000xxx numbers.

Or run the mock helper from the container image (amd64 and arm64). The first start prints a pairing code for the helper_token setting:

docker run -d --name phone-senses-mock -p 8765:8765 -v phone-senses:/home/ps/.phone-senses ghcr.io/lsudoko/phone-senses-mock
docker logs phone-senses-mock          # pairing code

Privacy and disclosures

What Phone Senses does on your devices

  • Phone helper: runs a small Python HTTP server inside Termux on your Android phone, on the address you choose (your Wi-Fi or Tailscale IP). It runs fixed Termux:API commands, with no shell, to read notifications, SMS, the call log, contacts, location, battery and Wi-Fi info. When you approve, it also sends SMS, takes photos or places calls. Every request must be signed with your pairing secret (HMAC-SHA256 with a timestamp and a one-time nonce). The secret itself is never sent. With openssl installed (setup.sh does it) the helper serves HTTPS and the plugin pins its certificate from the pairing line, so nobody on the same Wi-Fi can read or change the traffic.
  • Network: the Hermes plugin talks only to your own phone helper. No data goes to any third-party service. Your model provider sees the tool results Hermes sends it, as with any tool. Turn off Share message text to keep SMS and notification text out of those results entirely.
  • Approvals: sending SMS (including identity checks and guardian alerts), placing calls, taking photos, revealing OTPs, reading the clipboard, removing a watch rule and marking an alert as a false alarm always ask you first through Hermes's approval prompt, which shows exactly what will happen. The plugin has no auto-approve option. If you answer always in Hermes's prompt, Hermes stops asking for that tool, so choose once or session if you want to be asked every time.
  • Every tool call: Phone Senses' pre_tool_call hook sees the name and arguments of every tool call in Hermes, to apply your rules; it acts only on calls your rules or its own tools name, and keeps no arguments beyond the receipt summary (tool, amount, payee; never message text). Its transform_tool_result hook rewrites only one-time codes, only in tools that read mail, messages or the web, and can be turned off (vault_other_tools).
  • OTPs: one-time codes are hidden from Hermes by default ([OTP hidden]), including spaced (4 8 2 9 1 3) and Hindi-worded ones. Searches and watch rules match the masked text, so a code cannot be found digit by digit.
  • Stored data: parsed transactions (amount, date, counterparty, account last 4 digits; no message text), budgets, watch rules, the tripwire's memory of scam signals (kinds, apps and caller numbers for 30 days, no message text), your verdicts on alerts, the receipts (tool, decision, amount, payee, rule; no message text) and photos you approved are stored locally in Hermes's plugin data folder (<HERMES_HOME>/plugin-data/phone-senses/). The pairing secret is stored by Hermes as a secret setting, and on the phone in ~/.phone-senses/secret (mode 600).
  • Background: only the helper you start in Termux. Stop it with Ctrl+C. Nothing runs in the background on the Hermes computer.
  • Limits: the helper allows 10 signed requests per second and 5 SMS or calls per minute. Unsigned requests have their own bucket, so a flood from the network cannot block the paired plugin.
  • Telemetry: none.
  • Use it only on your own phone.

Threat model: docs/10-security-and-privacy.md.

Limitations

  • Android only (Termux does not exist on iPhone).
  • Needs Termux and Termux:API from F-Droid, plus several Android permissions.
  • Some phone brands kill background apps. Turn off battery optimisation for Termux.
  • Bank SMS formats vary. The money parser covers the common Indian bank, card and UPI formats. Unknown formats are skipped, never guessed.
  • Scam rules cover English, Hindi and Hinglish, Indian scams, Chinese scam patterns and the common global ones ("Hi Mum", gift cards, investment tips, task jobs). Detection is a warning, not a guarantee.
  • WhatsApp and other app calls are seen through their notifications, so their wording matters.
  • The tripwire can warn, verify, bring in your guardian and help you recover. It cannot hold a payment; that needs your bank.
  • Rules see tools by their names and arguments. A payment tool named oddly, or an amount hidden in free text without a currency, can slip past a rule: use Countersign and tight rules together.
  • The code vault covers tools that read mail, messages and the web, not files or a terminal that reads mail by hand. Receipts are tamper-evident, not tamper-proof: someone with access to the data folder could rewrite the whole chain.
  • Countersign needs the phone reachable and a fingerprint or screen lock set up in Android.

FAQ

Does it work on iPhone? No. It needs Termux and Termux:API, which exist only on Android.

Does my phone need root? No. Termux:API uses normal Android permissions that you grant once.

Does my SMS go to some server? The plugin talks only to the helper on your own phone. Nothing goes to a third-party service. Your model provider sees the tool results Hermes sends it, as with any Hermes tool. OTPs are hidden first.

Can Hermes send a text or place a call on its own? No. phone_sms_send, phone_call, phone_photo and phone_otp_reveal always go through Hermes's approval prompt, which shows the exact number and text. In unattended cron runs they are refused.

Do the phone and the laptop need to be on the same Wi-Fi? Either the same Wi-Fi, or both on Tailscale (works from anywhere), or USB with adb forward. See Setup.

My bank's SMS is not picked up. What now? Unknown formats are skipped, never guessed. Open an issue with a made-up example in the same format (never paste a real message), or add a parser and a test: see Contributing.

Can I try it without a phone? Yes. The helper has a --mock mode with synthetic data: Try it without a phone.

Why APIs instead of the screen

Research on mobile agents (Gu et al., 2026, "Beyond the GUI Paradigm") compared two approaches. On tasks that suit commands, command-line agents scored 60.7–68.9% and needed ~10.7 steps. Screen-based agents scored 22.2–33.3% and needed ~18.6 steps. Phone Senses is that API layer for Hermes. It pairs well with screen-driving plugins for visual tasks.

Development

python -m pytest -q                                  # no phone needed, about 2 seconds
hermes plugins validate plugin --install-deps        # catalog checks

Repository layout: plugin/ (the Hermes plugin, catalog subdir), phone_helper/ (runs on the phone), site/ (the landing page, deployed to Cloudflare Pages), brand/ (logo mark and banner), tests/, scripts/ (try_tool.py to call tools without Hermes, make_gifs.py to rebuild the GIFs) and docs/ (the project plan).

Project layout

Phone Senses is five parts in one repository. They share one decision engine.

Part What it is Start here
Android app (android/) Kotlin + Jetpack Compose. Sign-in with SMS Retriever, Check anything (ML Kit OCR on the phone), Kin Verify, family, Pause, Recover. Call screening and an optional notification listener; no SMS or call-log permissions. android/README.md, android/PLAY_POLICY_NOTES.md
Backend and WhatsApp bot (backend/) FastAPI with SQLite (dev) or Postgres. Signed app API, signed WhatsApp webhook, mock WhatsApp transport and dev OTP provider, Tesseract OCR for the bot. backend/README.md, docs/WHATSAPP_TEMPLATES.md
Decision engine (plugin/kinward_core/) Standard library only. Scam and link checks, OTP and UPI parsers, typed decisions with the act-or-escalate cascade, the Kin Verify state machine, Pause rules, and every sentence in English and Hindi. docs/04-architecture.md
Hermes Agent plugin (plugin/, phone_helper/) The original Phone Senses: your Android phone's senses for Hermes Agent through Termux:API, with a live scam tripwire, and rules, fingerprint countersign, a code vault and receipts for every agent. Setup
MCP server and Claude Code plugin (mcp_server/, .claude-plugin/) The same phone_* tools as the Hermes plugin for Claude and other MCP clients, locally or over a Cloudflare tunnel. Tools that send, call or reveal anything ask first, by MCP elicitation or the client's own prompt. The phone helper installs with pip install phone-senses. Setup

Deploying for ₹0 (Render + Neon, Singapore): DEPLOY_FREE.md; later to a paid India server: MOVE_TO_PAID.md. Pilot: PILOT_PLAN.md, the setup guides (English, हिंदी), android/PLAY_DATA_SAFETY.md. Agents (design only): docs/AGENT_LAYER.md.

Run it locally

# Backend (dev: sign-in codes come back to the app; WhatsApp messages go to an in-memory mock)
cp .env.example .env           # set SERVER_KEY (32+ random characters)
set -a; . ./.env; set +a
uv run --group backend uvicorn backend.main:app --port 8000

# Android app on an emulator (JDK 17, Android SDK 35); it reaches the host at 10.0.2.2:8000
cd android && ./gradlew :app:installDebug

Tests

uv run --group backend --group dev python -m pytest            # Python: engine, backend, bot, plugin
cd android && ./gradlew :app:testDebugUnitTest                  # Android JVM tests
./gradlew :app:connectedDebugAndroidTest -Pphonesenses.webhookSecret=<WHATSAPP_APP_SECRET>   # on an emulator

Latest results:

  • Python: 431 passed, 1 expected failure (a documented OTP-detection limit), 1 skipped (the backup test, which needs a local Postgres). The backend tests also pass on PostgreSQL 16, and inside the backend Docker image against PostgreSQL 17. GitHub runs the tests on Python 3.11 and 3.13.
  • Android: 6 JVM tests, and 8 instrumented tests on an API 35 emulator. The instrumented tests run onboarding → Check anything → family invite → Kin Verify amber, then red, end to end; they also cover the Keystore migration and auto-protect.

Before going live in India: DLT

Every SMS sent in India must come from a business, sender ID and exact message template registered on a TRAI DLT platform. Without it, no SMS provider will deliver the sign-in code. Register the sign-in template (its text is in backend/otp.py), then plug a provider such as MSG91 or Firebase into the OtpProvider interface. Details: backend/README.md.

WhatsApp messages the bot starts itself need Meta-approved templates, drafted in English and Hindi in docs/WHATSAPP_TEMPLATES.md. What each message costs, and a free in-app fallback for Kin Verify: docs/WHATSAPP_COSTS.md. The free pilot signs people in with single-use invite codes instead of SMS (backend/README.md).

Rules the code follows

  • Colours: red only for an explicit "no, it's not me". No reply stays amber. Every result also shows a symbol and words, so colour is never the only signal.
  • Google Play: no READ_SMS, READ_CALL_LOG, Accessibility, overlays or full-screen intents. Every optional permission can be refused and the app still works. See android/PLAY_POLICY_NOTES.md.
  • Privacy: server processing is disclosed before first use, data is kept briefly (24 h by default), and delete-my-data works. Family members get questions, never messages.
  • Security:
    • Signed requests everywhere, failing closed.
    • The device key lives in Android Keystore.
    • No OTPs, message bodies or secrets in logs.
    • The Gradle wrapper is checked against Gradle's official checksum.
    • Fixes and their tests: SECURITY_FIXES.md.
  • No invented numbers: no "you saved ₹X" claims, and no statistics without a source.

Brand

Ultramarine #1F2BFF, Ink #050507, Paper #F1F1EE, a chrome gradient for the wordmark; Archivo for display and text, Geist Mono for labels. The mark is a phone frame built from blocks whose top corner breaks away as a sensing pixel (brand/mark.svg).

Contributing

Bug reports, new parsers (banks, regions, languages) and phone test reports are welcome. Read CONTRIBUTING.md, then pick an issue labelled good first issue. Security problems go through SECURITY.md, not public issues.

If Phone Senses is useful to you, a star helps other Hermes users find it.

Acknowledgements

License

MIT © 2026 Arpit Singh

Explorer des projets similaires

Chargement…