Overview
OpenSRE’s Buzz integration delivers investigation findings to a channel in Buzz, Block’s self-hostable, Nostr-based workspace where humans and AI agents share rooms. Start the interactive shell withopensre (no subcommand). Slash commands below are run from that REPL.
Steps 1–3 give you outbound delivery (investigation reports, watchdog alarms, and agent-requested messages posted to a channel). To
@mention the agent from a Buzz channel and get replies, also do Step 4.Prerequisites
-
A running Buzz relay (self-hosted) and its URL, e.g.
https://buzz.example.com(defaults tohttp://localhost:3000for local dev). -
The
buzzCLI onPATH. It is not published to any package registry — build it from the block/buzz repo:If you can’t put it onPATH, point OpenSRE at the binary withBUZZ_PATH=/path/to/buzzor thebuzz_pathfield during setup. -
An agent identity (a Nostr keypair). Generate one with the relay’s admin tool:
This prints a public key (
npub...) and a private key (nsec...or hex). The private key is what OpenSRE needs — treat it like a password; it’s routed to~/.opensre/credentials.json, never plain.env. -
If your relay has
BUZZ_REQUIRE_RELAY_MEMBERSHIPenabled, the agent’s public key must be registered as a relay member before it can post — ask your Buzz admin to add it, or messages will fail silently.
Setup
Find a channel
Buzz channels are identified by UUID, not by name. List the channels your agent identity can see:Option 1: Onboarding wizard (recommended)
/onboard. Choose Buzz. The wizard prompts for:
- Relay URL (
BUZZ_RELAY_URL, defaults tohttp://localhost:3000) - Private key (
BUZZ_PRIVATE_KEYin.envand~/.opensre/credentials.json) - Default channel — the UUID from above (
BUZZ_DEFAULT_CHANNEL) - Auth tag — optional NIP-OA JSON for owner attestation (
BUZZ_AUTH_TAG) - CLI binary path — only if
buzzisn’t onPATH(BUZZ_PATH)
~/.opensre/integrations.json via upsert_integration("buzz", ...).
Option 2: Environment variables
Credential resolution.
BUZZ_PRIVATE_KEY resolves via store → env → ~/.opensre/credentials.json. The rest (relay URL, default channel, auth tag, binary path) stay plain env / store.Credentials
- Build/install the
buzzCLI. - Generate a keypair with
buzz-admin generate-key. - Register the public key as a relay member if your relay requires membership.
- List channels and copy the destination UUID.
- Store the private key via setup (keyring) or
BUZZ_PRIVATE_KEY.
Investigation tools
Watchdog alarms
Buzz is a supported watchdog delivery provider alongside Telegram and Rocket.Chat:BUZZ_DEFAULT_CHANNEL unless --chat-id <channel-uuid> overrides it.
Delivery test
Verify
Verify does not test two-way chat. It confirms the relay accepts your key; it does not start a listening process. If you
@mention the agent at this point, nothing will answer. Complete Step 4 for that.Step 4: Enable two-way chat
Skip this step if you only need outbound delivery. Steps 1–3 are sufficient for that.
4a — Give the agent a name and add it to the channel
Run both with the agent’s ownBUZZ_PRIVATE_KEY:
@opensre work: Buzz resolves @Name against the channel’s member profiles to get a pubkey. Without one the agent shows as a raw hex key and is effectively unmentionable. Skipping the join is the most common cause of “the gateway is running but nothing happens” — the agent only sees messages that mention it, and only members can be mentioned.
This is not the same as a Buzz managed agent (
buzz agents draft-create). Those are agents Buzz itself runs — the record holds a system prompt, provider, and model, and Buzz drives the loop. OpenSRE runs its own agent loop and uses Buzz purely as a chat surface, so it joins as a normal identity. Mention delivery works the same either way.4b — Allow your own pubkey
.env:
4c — Start the gateway daemon
@mention the agent in the channel. Follow-up messages in the same channel do not need a mention — the agent keeps your session and picks up the thread. Each person gets their own private session, so two people in one channel never see each other’s context.
Manage the daemon with
opensre gateway status, opensre gateway logs -f, and opensre gateway stop.
Buzz has no push socket here — the gateway polls the relay every 15 seconds (
BUZZ_GATEWAY_POLL_INTERVAL_SECONDS). Expect up to that long before the agent starts typing. Restarting the gateway can re-deliver the single most recent mention; it never replays your whole history.Approving write actions
Tools that change something ask before running. The agent posts a prompt in the channel and you answer by replying to that message withapprove or deny — no mention needed, and no buttons (Buzz has none).
- Only the person whose request triggered it can answer, in the channel it was posted to. Another channel member replying
approveis ignored, even if they are allowlisted. - A reply that is neither approve nor deny (
hold on, checking) leaves the prompt open rather than counting as a refusal. - Unanswered prompts expire after 3 minutes and the action is skipped.
/integrations verify buzz.
This resolves the buzz binary, then runs buzz channels list against the configured relay. A missing binary or key reports missing with an install/setup hint; an unreachable relay or rejected key reports failed.
Troubleshooting
Security
- Treat the Nostr private key like a password; prefer
~/.opensre/credentials.json. - Use a dedicated agent identity for OpenSRE.
- Do not commit private keys to source control.