Unbridled
by @jkobject
Send and read messages on Facebook Messenger, WhatsApp, Instagram, LinkedIn, Twitter/X, Signal, Telegram, Discord and other networks through a Beeper account...
clawhub install unbridledπ About This Skill
name: unbridled description: Send and read messages on Facebook Messenger, WhatsApp, Instagram, LinkedIn, Twitter/X, Signal, Telegram, Discord and other networks through a Beeper account, using the cloud Matrix bridges (hungryserv). Installs bbctl, sets up E2EE with matrix-nio, bootstraps cross-signing from the user's Beeper recovery key, runs a long-running sync daemon for incoming decryption, and exposes a single Python wrapper to list/search/send/read chats across all bridged networks. version: 0.2.2 author: clawd + jeremie homepage: https://github.com/jkobject/unbridled tags: [messaging, beeper, matrix, e2ee, facebook-messenger, whatsapp, instagram, linkedin, multi-platform]
unbridled
Unified messaging for agents via a personal Beeper account.
What it does
https://matrix.beeper.com/_hungryserv/).matrix-nio[e2e].Under the hood it is a thin, dependency-minimal layer:
agent / clawd
β
β CLI / Python import
βΌ
scripts/
βββ nio_client.py β async send / list / history (E2EE)
βββ client.py β sync HTTP wrapper (no e2ee; list + bridge state)
βββ bootstrap_crosssign.py β one-shot: recovery key β cross-sign device
βββ import_key_backup.py β one-shot: recovery key β import Megolm key backup
βββ sync_daemon.py β long-running sync (systemd) β new Megolm sessions
βββ verify_interactive.py β fallback: SAS verification via Beeper Desktop
βΌ
bbctl + access token (~/.config/bbctl/config.json)
βΌ
https://matrix.beeper.com/_hungryserv/ (Matrix CS API)
βΌ
Beeper bridges (cloud) β Messenger / WhatsApp / IG / LinkedIn / Twitter / β¦
When to use this skill
Use beeper-matrix when the user asks to:
Do not use it to blast messages to many contacts or to automate replies without explicit consent per-thread.
Prerequisites (user-side)
The user must have:
1. A Beeper account (beeper.com) with the desired networks bridged (Facebook, WhatsApp, etc.).
2. Their Beeper Recovery Key β a phrase like EsUC HBcy scrf uiTy DTU2 rvEB Jmgj 9Cpa D6V2 z7Vk ZrU9 9RMh.
Where to find the Beeper Recovery Key
In Beeper Desktop: 1. Click Settings (gear icon) 2. Click on your name at the top 3. Click the arrow (β) next to your name to expand 4. Click "Show Recovery Code"
The code is shown as 12 groups of 4 base58 characters.
β οΈ It's a full account recovery secret β treat it like a password. If it's ever exposed, regenerate it from the same menu.
Prerequisites (host-side, agent)
python3 with venvuv (or plain pip) to create the venvlibolm-dev (package for Olm/Megolm crypto)ffmpeg (optional, for media attachments later)Setup (one-time, ~5 min)
Follow these steps once on the agent host.
1. Install bbctl and deps
# bbctl binary (Beeper Bridge Manager)
mkdir -p ~/bin
curl -sL -o ~/bin/bbctl https://github.com/beeper/bridge-manager/releases/latest/download/bbctl-linux-amd64
chmod +x ~/bin/bbctlSystem deps
sudo apt install -y libolm-dev ffmpeg python3-venvAgent Python venv (dedicated, not global)
uv venv ~/.venvs/beeper --python 3.12
VIRTUAL_ENV=~/.venvs/beeper uv pip install 'matrix-nio[e2e]' aiohttp pycryptodome cryptography pynacl unpaddedbase64 canonicaljson
2. Log into Beeper from bbctl
bbctl login
The user enters their Beeper credentials. This stores an access token at ~/.config/bbctl/config.json. That token is all the nio client needs.
Verify:
bbctl whoami
Should show: User ID: @:beeper.com, all bridges RUNNING
3. Save the Beeper Recovery Key
mkdir -p ~/.secrets && chmod 700 ~/.secrets
cat > ~/.secrets/beeper-recovery-key.txt <Replace the sample with the actual recovery key. Never commit to git.
4. Copy skill scripts into place
The 4 scripts live at scripts/beeper/ in the workspace (they come with the skill β see scripts/ subfolder). Ensure:
ls ~/.openclaw/workspace/scripts/beeper/
client.py nio_client.py bootstrap_crosssign.py verify_interactive.py
5. Bootstrap nio store + cross-sign the device
# First run initializes the Olm store (~/.local/share/clawd-matrix/)
~/.venvs/beeper/bin/python ~/.openclaw/workspace/scripts/beeper/nio_client.py whoami
Should print: e2ee: enabled=True
Sign the device using the recovery key
~/.venvs/beeper/bin/python ~/.openclaw/workspace/scripts/beeper/bootstrap_crosssign.py
Expected output ends with:
π SUCCESS β device is now cross-signed. Bridge should accept our messages.
After this step, Beeper's bridges trust the agent's device and will relay messages to the external networks.
6. Import the Matrix key backup (required for reading history)
Cross-signing only handles *outgoing* messages. To decrypt *incoming* history, import the server-side Megolm key backup into the local Olm store. Stop the sync daemon first to avoid a write conflict on the sqlite store.
systemctl --user stop clawd-beeper-sync 2>/dev/null || true
~/.venvs/beeper/bin/python ~/.openclaw/workspace/scripts/beeper/import_key_backup.py
systemctl --user start clawd-beeper-sync
Expected: "β Imported N sessions into ~/.local/share/clawd-matrix/"
You only need to run this once per device (sessions accumulate in the store).
Re-run it after any bbctl login that issued a new device id.
Daily usage
All commands run inside the venv. $SKILL_DIR is wherever this skill is
installed (e.g. ~/.openclaw/workspace/skills/unbridled when installed via
ClawHub, or the repo root if cloned from GitHub).
NIO=~/.venvs/beeper/bin/python
SCRIPT="$SKILL_DIR/scripts/nio_client.py"Identity check
$NIO $SCRIPT whoamiList chats for a specific network (shows room name, which is often missing for DMs)
$NIO $SCRIPT list-chats --network messenger --limit 25
$NIO $SCRIPT list-chats --network whatsapp --limit 50
$NIO $SCRIPT list-chats --network linkedinAliases accepted: messenger/facebook/fb, whatsapp/wa, instagram/ig,
linkedin, twitter/x, signal, telegram, discord
β οΈ IMPORTANT: DMs on Beeper usually have NO room name (listed as !xxx:beeper.local).
The contact name lives in a member's display_name. To find a chat by contact, use:
$NIO $SCRIPT search-chats baptiste # scans all 344 rooms + members
$NIO $SCRIPT search-chats juliette --network messenger # restrict to one bridge
$NIO $SCRIPT search-chats "jean-baptiste" --json # structured outputSend a message (E2EE handled automatically)
$NIO $SCRIPT send --room '!xxx:beeper.local' --text "Hello from clawd"Read recent history in a room (requires megolm session in the store)
$NIO $SCRIPT history --room '!xxx:beeper.local' --limit 20
Python import usage (recommended for cron / scripts):
import os, sys, asyncio
sys.path.insert(0, os.path.expanduser(os.environ["SKILL_DIR"]) + "/scripts")
from nio_client import make_clientasync def ping():
c = await make_client()
try:
# ... use c.room_send / c.joined_rooms / etc.
pass
finally:
await c.close()
asyncio.run(ping())
Quirks to know about
sync(full_state=True). nio's client.rooms will be mostly empty. The wrapper sidesteps this by calling joined_rooms() directly and manually injecting a minimal MatrixRoom before room_send. Don't rely on client.rooms being complete.logging.getLogger("nio").setLevel(ERROR).'events' is a required property): hungryserv returns sync responses with fields nio doesn't fully recognize. Safe to ignore; already silenced.com.beeper.undecryptable_event / your device is not trusted (unverified). bootstrap_crosssign.py fixes this once and for all for this device.Facebook Messenger (JΓ©rΓ©mie Kalfon) auto-chat has no external recipient. Test sends on a chat with a real other user.history --limit >= 10) instead of mirroring the raw count, otherwise it can report a false decryption unavailable.Safety rules for the agent
This skill gives the agent direct write access to the user's personal chats
on every bridged network. The agent MUST treat every send as a privileged
operation:
memory/YYYY-MM-DD.md) so the user can audit after the fact.
bootstrap_crosssign.py and import_key_backup.py
after the next bbctl login.Files in this skill
unbridled/
βββ SKILL.md (this file)
βββ README.md GitHub-facing doc
βββ LICENSE MIT
βββ install.sh prerequisites installer
βββ scripts/
β βββ client.py sync HTTP wrapper (list + bridge state)
β βββ nio_client.py async E2EE client (send/list/history)
β βββ bootstrap_crosssign.py one-shot: recovery key β cross-sign
β βββ import_key_backup.py one-shot: recovery key β import Megolm backup
β βββ verify_interactive.py fallback: SAS via Beeper Desktop
β βββ sync_daemon.py long-running sync (Megolm accumulation)
β βββ collect_beeper_daily.py daily digest generator
βββ systemd/
β βββ clawd-beeper-sync.service user-level systemd unit for the daemon
β βββ install.sh installs the unit into ~/.config/systemd/user/
βββ references/
βββ setup-checklist.md step-by-step for humans
βββ architecture.md diagrams and crypto flow
Status
collect_beeper_daily.py (scripts/client.py and scripts/nio_client.py live next to the collector, not under scripts/beeper/). Validated by running the collector directly from the published skill layout.decryption unavailable in collect_beeper_daily.py by over-fetching a small history window instead of using the raw recent-event count as the decrypt limit. Validated on Messenger + WhatsApp groups where the latest raw event was reaction/meta noise.import_key_backup.py was added. Confirmed decrypting >95% of joined rooms on an active Beeper account (357/357 backup sessions imported, 0 errors).Inbound decryption β key backup + sync daemon
Two complementary mechanisms feed Megolm group sessions into the local Olm store so inbound history can be decrypted:
1. Matrix key backup (m.megolm_backup.v1.curve25519-aes-sha2): Beeper
keeps a server-side, encrypted-at-rest backup of every Megolm session the
user has ever held. import_key_backup.py downloads those, decrypts them
with the recovery key (same key used for cross-signing), and injects each
one into the nio sqlite store. One-shot, imports the entire history.
2. Live sync daemon (sync_daemon.py, systemd-supervised): runs
sync_forever against hungryserv. Beeper's bridges push new sessions via
to_device events as they're created, which the daemon stores. Keeps
everything up-to-date for future messages.
After the one-shot backup import and a minute or two of the daemon running,
history and collect_beeper_daily.py decrypt nearly all traffic. Coverage
is typically β₯ 95% of joined rooms (the rest being inactive rooms that had
no session in the backup).
Install:
bash systemd/install.sh
systemctl --user enable --now clawd-beeper-sync.service
systemctl --user status clawd-beeper-sync
journalctl --user -u clawd-beeper-sync -f
Resource footprint: ~35 MB RAM idle, negligible CPU.
Roadmap
unread --network X helper (summarize unread chats)reply --to with proper Matrix reply threadingmark-read on inbound messages