Feature Request: Support external agent systems (non-ACP) for real-time communication in Buzz communities
Problem
Buzz's agent model currently requires agents to run as ACP subprocesses spawned by buzz-acp (Claude Code, Goose, Codex, etc.). External agent systems — like OpenClaw, custom backends, or any non-ACP agent platform — cannot participate in real-time Buzz conversations.
Today, the only ways for an external agent to interact with a Buzz community are:
buzz-cli— a one-shot REST CLI tool. No persistent connection, no real-time message receiving.buzz-acpwith a supported harness — spawns its own agent subprocess, which means the agent identity is tied to the harness (e.g., Claude Code), not to an external agent system.
This means if you run an AI assistant on your own infrastructure (OpenClaw, a custom backend, etc.) and want it to participate in a Buzz community alongside humans, there is no real-time path.
Use Case
We run an AI assistant (DeanAI) on OpenClaw with Discord, Telegram, and Google Chat integrations. We set up a Buzz community for human-agent collaboration between:
- Dean (human, Buzz desktop app)
- DeanAI (AI on OpenClaw, currently can only use
buzz-clifor one-shot REST calls) - DeanWynn (another AI instance on a separate machine)
DeanAI can post messages via buzz-cli, but cannot receive messages in real-time. When Dean sends a message in Buzz, there's no listener to pick it up and route it to OpenClaw. The conversation is one-directional without manual polling.
Proposed Solutions (any one would solve this)
Option A: Webhook-based agent integration
Allow registering a webhook URL per agent identity. When the agent is @mentioned or a message arrives in a subscribed channel, Buzz POSTs the event to the webhook. The external agent processes it and responds via buzz-cli or a REST API call.
Option B: WebSocket listener mode in buzz-cli
Add a buzz listen command that maintains a persistent WebSocket connection to the relay, streaming incoming events as JSON to stdout. External systems can pipe this into their own processing pipeline and respond via buzz-cli commands.
Option C: Custom agent command in buzz-acp
Allow --agent-command to point to an arbitrary executable (not just Claude Code/Goose/Codex) that speaks a simple JSON-in/JSON-out protocol over stdio — essentially a generic bridge mode. This would let external systems write a thin shim script that forwards messages to their own API.
Environment
- Buzz relay: local (port 18800) and hosted community (
daveryai.communities.buzz.xyz) buzz-cliv0.1.0 installed and workingbuzz-acpcompiled but not running (no compatible agent harness configured)- External agent: OpenClaw on Linux (WSL2)
Current Workaround
Manual polling via buzz messages get --channel <uuid> --limit N on a cron — but this is not real-time and adds unnecessary latency.
Happy to contribute or help test any of these approaches. Thanks for considering!
Would love to see support for this - looking to run Buzz on the same server as my OpenClaw and use that as the harness
We built and ran an external agent on Buzz end-to-end, and since #2663 is about supporting external agent systems, here's a field report: what worked out of the box, five concrete gaps we hit, and what we'd propose.
What we built
A small daemon that bridges a Buzz relay to an external AI brain: it polls
channels over the buzz CLI, detects mentions of the agent, gathers the
mention's thread as context, calls the agent (a separate inference process), and
posts the reply threaded under the mention. The agent has its own Nostr identity
and channel membership — a first-class relay participant, not a relay-side plugin.
What worked first-try
Genuinely smooth. A live mention→reply round-trip worked on the first attempt, and again from a second, distinct client identity:
- NIP-42 auth with the agent's own key via the CLI — no special-casing.
- Membership + posting — once the agent was a channel member, posting was unremarkable, as it should be.
- Threaded replies —
messages send --reply-to <mention-id>resolves the NIP-10 thread root server-side, so replies nest correctly without the agent computing the root itself. A really nice affordance for bots. - Round-trip latency ~5–6 s, essentially all inference.
The five gaps an external-agent operator hits
None were hard blockers, but each cost real time or a workaround.
1. No self-identity endpoint ("who am I?")
There is no buzz users me / whoami. An agent process holds a private key but
has no first-class way to ask for its own pubkey — deriving it needs a
secp256k1 x-only computation (a crypto dependency) or another tool. We worked
around it by requiring the pubkey out-of-band (BUZZ_PUBLIC_KEY) alongside the
private key, which means configuring identity twice for the exact case (agents)
where you least want to.
Propose: buzz users me (or a flag) that prints the identity's own pubkey/npub.
2. --format compact drops the fields agents need
For messages get, --format compact returns only {id, content, created_at}
— it drops pubkey and tags. Those are exactly what an agent's read path
needs: pubkey to skip its own messages (no self-reply loop) and identify
senders, tags for p-tag mention detection and h/e thread scoping. So the
"lightweight" format is unusable for the poll loop, and it looks like the right
choice — the omission is silent.
Propose: keep pubkey+tags in compact, or document it as display-only.
3. No headless publish path for the agent directory (kind:30177)
Registering an agent in the directory means publishing an owner-authored
kind:30177 (NIP-AP managed-agent definition) — param-replaceable, keyed by
(owner_pubkey, 30177, d_tag=agent_pubkey). But buzz agents only opens
Desktop draft forms (draft-create / draft-update); there is no
headless/CLI publish. To register from a server we hand-built and signed the
30177 and POST /events with NIP-98 auth — and wrote a small custom Rust keytool
just to do it. An external-agent operator has no CLI on-ramp for the one step
that lists the agent in the directory.
Propose: a headless buzz agents publish (sign + POST the 30177) so directory
registration doesn't require the desktop app.
4. The kind:30177 content schema is strict, and the relay won't catch a bad one
The 30177 content is the desktop's ManagedAgentEventContent: required fields are
name (not display_name), parallelism, and respond_to (the
RespondTo enum serializes kebab-case: owner-only / allowlist / anyone).
The trap: the relay does not validate 30177 content — it's relay-opaque, the
persona-envelope validator doesn't run on it — so a wrong-shaped body is
accepted by the relay but silently fails to parse in the desktop directory.
The entry looks published and simply never renders, with nothing surfacing the
mismatch.
Propose: publish the 30177 content schema (required keys + allowed values), and validate (or at least warn on) 30177 content at ingest instead of accepting a body the directory can't parse.
5. External agents aren't offered in the @-mention selector (#2603)
What an external agent needs to receive and answer is modest: relay
membership (buzz-admin add-member — required even to publish its own events)
plus a kind:0 profile so clients can resolve and display it. Our live E2E
worked with just those two — the kind:30177 directory entry was not required
for delivery (it's a separate concern: it governs the desktop directory listing
and respond_to policy).
But that delivery path only works because the agent polls the channel and
matches its own display name in message text. The desktop mention selector
does not offer the external/managed agent (this is #2603 — the managed-list gate
is evaluated before the directory), so a human can't pick it from @-autocomplete
and no structured p-tag mention is emitted. First-hand: in our two live
round-trips, neither mention carried a p tag — both were plain-text
@hermes, answered only via the bridge's display-name matching:
mention 1e5837b1 "@hermes welcome aboard …" tags=[["h","<channel>"]] (no p-tag)
mention 5021a4fb "@hermes u there?" tags=[["h","<channel>"]] (no p-tag)
Propose: make membership + kind:0 (or a directory presence) satisfy mention-
eligibility so external agents appear in the @-selector and humans emit a proper
p-tag — rather than external agents depending on plain-text name matching.
Net
Buzz's Nostr-first model is a good fit for external agents — an agent is just
another signer with a key and a membership, and p-tag / NIP-10 primitives carry
mentions and threading cleanly. The friction is almost entirely at the
onboarding/identity edge (self-identity, headless directory publish, a strict
30177 schema the relay accepts but the directory silently can't parse, and a
mention-eligibility gate that shuts external agents out of the @-selector) plus
one read-path footgun (compact format).
Smoothing those five would make "bring your own agent" close to turnkey. Happy to
share the bridge implementation if useful.
Taking a first slice of gap #1 from the external-agent field report: buzz users me / whoami (local identity, no relay). PR incoming so OpenClaw-style bridges don't need a bespoke secp256k1 step just to learn their own pubkey.
Taking on the full #2663 external-agent / OpenClaw realtime path (not only the gap#1 users me slice).
Plan:
- Keep #2933 open as the small self-identity PR
- Land a feature PR for listen/stream + field-report gaps (compact message fields, headless
agents publish/30177 validation, OpenClaw-oriented CLI surface) - Coordinating so we don't fight BYOH/Hermes ACP PRs for the same seam
Will link the full PR here when opened.
Taking the full external-agent product path for #2663 (not only gap #1):
PR: https://github.com/block/buzz/pull/$(gh pr list --repo block/buzz --head Bartok9:bartok9/feat-external-agent-2663 --json number -q '.[0].number')
Ships: buzz listen (Option B + optional webhook), compact pubkey/tags, headless agents publish (30177 + validation), docs, and users me so the branch is self-contained for E2E. Leave #2933 open as the thin identity slice.
Residual: Desktop @-mention selector (gap #5); Option C stays with BYOH/ACP harness work.
Adding a data point that suggests hosted-relay policy moved in the opposite direction of this request today, and a question about the supported path.
Setup: hosted community on *.communities.buzz.xyz, one desktop-managed Claude Code agent (buzz-acp), pilot for a small investment team. We are migrating the agent from a laptop to a server (GCE, europe-west3) for availability, reusing the same identity: same nsec, same BUZZ_AUTH_TAG owner attestation.
Observed behavior change, 2026-07-29: at 09:18 UTC the agent connected from the GCE VM successfully (NIP-42 + attestation accepted, channels discovered, presence online, turns served). From roughly midday UTC, the identical connection is rejected at auth with restricted: not a relay member. No credential or client changes on our side between those points.
Isolation matrix, all with the same key + attestation:
| Client | Origin | Result |
|---|---|---|
| buzz-acp built from main (485d03a) | GCE VM | rejected: not a relay member |
| buzz-acp built from v0.5.0 tag | GCE VM | rejected: not a relay member |
| buzz-acp binary from the desktop bundle, run manually | residential IP | connects, subscribes |
| Buzz desktop app (v0.5.0) | residential IP | connects, subscribes |
Plain member NIP-42 auth (a non-agent member key used by our approval bot) is unaffected from the same VM: it authenticates and holds live subscriptions. Only the agent-attestation path appears origin-sensitive. Relay NIP-11 reports software 0.2.0.
Questions:
- Is origin-based restriction of NIP-OA agent auth on hosted relays intentional policy, and if so, is it documented anywhere?
- Is there a supported way to run a desktop-registered agent from a server against a hosted community today (community API token, allowlisted egress, or similar)?
- If not, is server-side agent support for hosted communities on the roadmap, per this issue?
Happy to provide timestamps, request traces, or test against a canary relay. For a team pilot, an agent that only exists while one laptop is awake is the main adoption blocker, so we would rather run it your supported way than work around it.
+1 on this. We're evaluating Buzz as a self-hosted collaboration workspace for our team and build agents (Claude Code, etc.), but we also run a set of custom AI agents embedded directly in our own product, separate from Buzz. Those agents aren't Claude Code/Codex/Goose subprocesses, so there's currently no real-time path for them to participate in a workspace here.
A couple of questions if any maintainers have bandwidth:
- Any rough sense of timeline or priority on this?
- Is there a recommended interim pattern for a custom agent to participate in a limited way ahead of this shipping?
Happy to share more on our specific use case if it's useful input for scoping the feature.
Update: we implemented a Buzz provider backend (BackendKind::Provider, protocol v1) to test whether the restriction is about how the agent is launched rather than where it runs. It is not.
Setup: the provider starts our GCE VM (europe-west3), ships the desktop-supplied private_key_nsec / auth_tag / system prompt over SSH stdin, and launches buzz-acp there with the Claude ACP adapter. The desktop remains the manager throughout — the agent is desktop-created, desktop-registered, and desktop-deployed.
Result: identical rejection.
Auth failed: restricted: not a relay member
Error: relay connect error: Auth failed: restricted: not a relay member
Provider mechanics were fine (payload applied, 13 env vars, 5868-char prompt, service started), so this is purely the relay's auth decision.
Combined with the earlier matrix, the picture is now:
| Launch method | Origin | Result |
|---|---|---|
| Desktop app | residential | connects |
| buzz-acp standalone, desktop binary | residential | connects |
| buzz-acp standalone (main + v0.5.0 builds) | GCE | rejected |
| provider-backend, desktop-managed | GCE | rejected |
Same identity and attestation in every row. So the discriminator appears to be connection origin, not the launch path — which means no client-side arrangement (provider backends included) reaches a hosted community from cloud compute today. Plain member NIP-42 auth from the same VM is unaffected: our approval bot holds live subscriptions from that host.
This is worth documenting either way, since #2859 (buzz-spawner) and provider backends both imply server-side compute. If origin-based restriction is intentional for hosted relays, the spawner will need an allowlist or attestation path that hosted communities can opt into, otherwise first-party server hosting hits the same wall.
Happy to re-test on request, or against a canary relay.
Another external-agent field report, with one finding that may explain the missing p tags in the earlier report — and that is fixable client-side today.
Setup: self-hosted relay (v0.5.2, docker compose stack, membership-gated) + desktop 0.5.3, both on one Linux box. External brain is OpenClaw. Rather than webhooks / buzz listen / an ACP shim, we wrote a native channel plugin for OpenClaw that speaks Nostr directly — persistent authed WebSocket via nostr-tools AbstractRelay, one nostr identity per agent, NIP-42 on connect, NIP-10 threaded replies. Real-time receive with no polling and no subprocess.
The finding: p tag vs mention tag tracks channel membership
Our agent could authenticate, was a relay member (buzz-admin add-member), published a kind:0, and appeared in the desktop @-autocomplete and was selectable. But it was never added to the channel. In that state the desktop showed "Mention people outside this channel? … Invite them, or send without inviting them." and sending produced:
kind 9 tags = [["h","<channel>"],["mention","<agent pubkey>"]]
A mention tag, no p tag. After the agent joined the channel (buzz-cli channels join --channel <uuid> — self-join works for a relay member, accepted:true), the same human, same composer, same @-autocomplete pick produced:
kind 9 tags = [["h","<channel>"],["p","<agent pubkey>"]]
A proper p tag, and our mention gate fired natively. Round trip worked end to end.
So on this stack the desktop emits a real p tag for a mentioned party who is a channel member, and degrades to ["mention", pk] for an out-of-channel mention. Given the earlier report's agent had membership + kind:0 but describes reaching delivery via display-name matching, channel membership rather than mention-eligibility may be the actual gap there too. Worth checking before treating #2603 as the blocker.
Practical takeaway for anyone bridging an external agent today: relay membership ≠ channel membership. You need both. buzz-cli channels join is enough; no owner-side invite required.
Two smaller notes
- Consumers should treat
["mention", pk]as a real mention. Our client originally filteredptags only and discardedmentiontags as non-notifying references — which silently dropped every out-of-channel mention. Documenting the distinction between the two tag shapes would help bridge authors. kind:0resolution matters more than it looks for agents. With the author rendered as a bare 64-hex pubkey, our agent read a direct question as coming from an unidentified participant and declined to answer. Resolving the sender'skind:0display name into the prompt fixed it. Not a Buzz bug — just a sharp edge worth flagging for anyone wiring an LLM to this.
Gaps 1 and 2 from the earlier field report we did not hit: we derive our own pubkey from the private key in-process, and we consume raw signed events over the socket, so full pubkey/tags are always present.
Happy to share plugin details if useful.
@Kentk714 there's a workable interim pattern today, running in production on my self-hosted relay for over a week now. Short version: your custom agent doesn't need to be a Claude Code or Codex subprocess, it just needs a Nostr identity and a WebSocket.
The shape: give the agent its own keypair, register it on the relay (membership, kind:0 profile, optionally a kind:30177 directory entry so it shows up in the desktop UI with a respond policy), then run a small bridge that holds an authed WebSocket subscription for mentions in the channels it belongs to and publishes NIP-10 threaded replies signed with the agent key. My bridge shells out to the buzz CLI for relay IO and pipes turns to the external brain; mmango7474's comment above goes one step further and speaks Nostr directly from the agent process with nostr-tools, which cuts out the CLI entirely. Either works against a stock relay today, no relay patches.
The rough edges you'll hit are documented in my field report earlier in this thread (headless registration is partly manual, compact message output drops fields you need, mention gating has sharp corners in DM contexts). Bartok9's PRs linked above are closing several of those. Happy to share specifics if you go this route.
Thank you for your needed input!
On August 2, 2026 6:14:33 AM PDT, Jason Brashear @.***> wrote:
webdevtodayjason left a comment (block/buzz#2663)
@Kentk714 there's a workable interim pattern today, running in production on my self-hosted relay for over a week now. Short version: your custom agent doesn't need to be a Claude Code or Codex subprocess, it just needs a Nostr identity and a WebSocket.
The shape: give the agent its own keypair, register it on the relay (membership, kind:0 profile, optionally a kind:30177 directory entry so it shows up in the desktop UI with a respond policy), then run a small bridge that holds an authed WebSocket subscription for mentions in the channels it belongs to and publishes NIP-10 threaded replies signed with the agent key. My bridge shells out to the buzz CLI for relay IO and pipes turns to the external brain; mmango7474's comment above goes one step further and speaks Nostr directly from the agent process with nostr-tools, which cuts out the CLI entirely. Either works against a stock relay today, no relay patches.
The rough edges you'll hit are documented in my field report earlier in this thread (headless registration is partly manual, compact message output drops fields you need, mention gating has sharp corners in DM contexts). Bartok9's PRs linked above are closing several of those. Happy to share specifics if you go this route.
-- Reply to this email directly or view it on GitHub: https://github.com/block/buzz/issues/2663#issuecomment-5158126721 You are receiving this because you were mentioned.
Message ID: @.***> Kent Keyfauver
Correction to my 2026-07-31 comment, with what turned out to be the actual rule and a working configuration for anyone else blocked here.
Our conclusion was wrong. We wrote that "the discriminator appears to be connection origin, not the launch path" and that no client-side arrangement reaches a hosted community from cloud compute. The decisive experiment, run 2026-08-01: same GCE host, same binary, same minute. The agent identity (desktop-minted, NIP-OA owner attestation) was refused with restricted: not a relay member; a plain member identity authenticated with ordinary NIP-42, held live subscriptions, and served turns. The earlier 4-way matrix varied origin and launch path while holding constant the thing that mattered: the identity class.
Restating the observed behavior precisely (hosted platform, 2026-07-29 to 2026-08-01):
| Identity class | Residential origin | Datacenter origin (GCE) |
|---|---|---|
| NIP-OA owner attestation (desktop-minted agent) | accepted | refused |
| Own membership row, plain NIP-42, no auth tag | accepted | accepted |
So attestation is origin-sensitive as observed; membership is not. Whether that is intended policy is still the open question of this issue.
The configuration that works today: claim a membership for the agent's own key via the normal invite flow (/api/invites/accept-policy then /api/invites/claim, NIP-98), then run buzz-acp with that nsec and no BUZZ_AUTH_TAG. Two gotchas that cost us a day:
channels = "all"is not a wildcard.discover_channelsresolves kind:39002 membership events for the agent's own pubkey, so a fresh identity discovers zero channels. Community membership is not channel membership.- No REST route adds channel membership, but the CLI does:
buzz channels joinlets the identity add itself to any channel it can see, and a running buzz-acp picks the new memberships up live via its membership-notification subscription, no restart.
This has been serving a small team community from a cloud VM since 2026-08-01 under systemd: presence, live subscriptions, retrieval tool calls, proposals.
What it does not solve, so this issue should stay open: desktop mention autocomplete still hides the identity (#2987; we keep literal text-mention matching as well), owner control commands do not bind (buzz-acp logs no agent owner configured, so lifecycle is systemd's job), and there is no Runtime panel management or observer-frame surface for it. And if attestation-from-datacenter refusal is intentional, desktop-managed remote deploys (#3449, #2859) will hit it on hosted communities; I have left a note there.
Happy to write the member-identity recipe up for docs if useful.
Field report from another external-agent path: the official @openclaw/buzz channel plugin (OpenClaw 2026.8.2 on a headless VPS, joining a Block-hosted *.communities.buzz.xyz community). Same wall as described above, and the same two owner-authored records fix it. Sharing the exact sequence in case it saves someone the evening it cost us.
Symptom. The OpenClaw bot became a relay member, got the bot role in the room, published its kind:0, connected, and answered plain-text name matches — but Desktop (official release build, 0.5.23) never offered it in @ autocomplete, so no p-tag mention was ever emitted. Members panel showed it; the mention picker did not.
Why (reading the Desktop source). A member with role === "bot" is treated as an agent, and agents are only offered when they are in the relay agent directory. The release build is compiled with BUZZ_DESKTOP_BUILD_AGENT_ACCESS_OWNER_ONLY, so retain_agents_allowed_by_build drops legacy kind:10100 entries that lack a verified owner. The verified owner comes from the pair: agent kind:0 carrying a valid NIP-OA auth tag plus an owner-authored kind:30177 whose d tag is the agent pubkey. Neither the Desktop nor buzz-cli can produce those for an externally run key (gap 3 above / #2603), and the relay requires event.pubkey == authenticated identity, so both must be signed and published from the owner's own machine.
What worked.
- Community member add + room add with
botrole (Desktop; Mobile's role picker has nobot). buzz users set-profile --name Minewith the agent key so it resolves in member search at all.- NIP-OA
authtag signed by the owner (SHA256("nostr:agent-auth:<agent_pubkey>:"), BIP-340), fed to the plugin viaBUZZ_AUTH_TAG— it attaches the tag to AUTH and kind:0, and the relay'smaterialize_nip_oa_ownerrecords the owner. - Owner-signed kind:30177, content exactly
{"name":"Mine","parallelism":1,"respond_to":"anyone"}, tags[["d","<agent_pubkey>"]], published over WS after NIP-42 AUTH with the owner key. Immediately after,buzz users get --name Mine --owner <owner>returns"verification":"verified"and Desktop (after restart) lists the agent in@autocomplete;p-tag mentions reach the plugin withrequireMention: true.
Two smaller things worth noting for the plugin path: channels.buzz.groupPolicy defaults to allowlist, which silently drops every room message until set (open or an explicit groupAllowFrom), and a multi-agent gateway needs a bindings entry for buzz or every inbound fails with "routing has no explicit owner". OpenClaw's core channels.defaults.botLoopProtection is applied whenever the sender is a bot member, which is a nice native guard for agent↔agent mentions once the picker works.
+1 to a headless buzz agents publish (or an "adopt existing pubkey" flow in Desktop) — that is the only step here that needed hand-rolled signing. Happy to share the two small owner-side scripts (NIP-OA tag + 30177 publish via nostr-tools) if useful.
option A's webhook path has a quiet failure mode worth naming. a fire-and-forget POST means a dropped event looks identical to a handled one: Dean's message lands in the channel and reads as delivered, but if DeanAI's endpoint is down or 500s, nothing retries and nothing surfaces that the agent never saw it. one-directional silence, except now it looks two-way. option B's persistent socket at least makes a dead listener observable when the connection drops. worth pairing any webhook with a per-event ack so a missed dispatch fails loud instead of passing as delivered.
+1. Always-on personal agents like OpenAI's ChatGPT dots and Grok Bot already join Slack and Teams as named members with their own memory, apps and approvals. Buzz should let them join the same way: scoped tokens to read and post in chosen channels, webhooks for mentions and DMs so they can follow through without polling, and a visible identity showing who each agent acts for. Related: #9220 and #6023.