feat(desktop): register an agent that runs elsewhere — attest an existing public key and publish its owner policy
Motivation
Buzz already treats a hand-launched agent as first-class at the protocol level: docs/remote-agents.md says a launcher that exports BUZZ_PRIVATE_KEY, BUZZ_RELAY_URL and BUZZ_AUTH_TAG and execs the harness "is a conforming launcher … today, with no code change". A systemd unit on a VPS, or a harness Buzz doesn't ship at all, qualifies.
What's missing is the owner's side. For an agent it did not create, the desktop cannot produce either of the two owner-signed things such an agent needs:
- the NIP-OA attestation. The desktop mints one only inside the create-agent form, for a key the form generates (
Keys::generate()indesktop/src-tauri/src/commands/agents.rs); there is no import. The CLI verifies tags but never mints them. - the
kind:30177policy. Without it, once an agent is attested, the mention picker hides it:getAgentMentionAdmissionalways admits a person but admits an agent only if a verified owner policy'srespond_toincludes the viewer. Adding an agent to a channel asbotgoes through the same flow, so it can't be added either.
The form's "Where to run" choice can't express this case: it offers "This computer" and buzz-backend-* providers found on the owner's machine, all of which run the harness on the owner's behalf. An operator running the harness themselves — on a server, or a harness other than buzz-acp — has no door. Today the only way through is hand-computing the tag with compute_auth_tag, and hand-signing and publishing the kind:30177, which means handling the owner's nsec outside the keyring.
We hit this provisioning three agents as code (two headless buzz-acp agents under systemd, one agent running through another harness's Buzz channel plugin). Each showed as a person in the desktop, and once attested, could not be mentioned.
Proposed solution
A third "Where to run" option in the create-agent dialog: "Somewhere else — I run it myself".
- It asks for the agent's public key (npub or hex) — not a keypair. An attestation is a signature over the public key, so the desktop never needs the agent's secret, and the operator's key never has to leave the host it runs on.
- It skips the harness/runtime/provider fields, which aren't the desktop's to decide in this mode, and keeps name,
respond_to/ allowlist and optional persona. - On save, with the owner's keyring key, it computes the NIP-OA tag with empty conditions (as the form does today) and publishes the
kind:30177policy, using the existingbuild_agent_eventshape. It omitssystem_prompt/model/provider, since the operator owns those. - It shows the
BUZZ_AUTH_TAGvalue to install on the agent's host, single-quoted. Then, as it does for provider deploys, it can wait until the agent's latestkind:0carries a valid tag — which is what the desktop itself uses to decide "agent".
These agents would then appear in My Agents with the existing "Not managed on this device" cloud marker, and their policy could be edited there like any other.
Permissions. We don't think this needs a relay-role gate, and it shouldn't be admin-only:
- creating an agent isn't role-gated today;
- on a closed relay, an owned agent is admitted through its owner's membership, the same delegation desktop-created agents use;
- signing a tag over a key you don't control is inert — the relay records an owner only when the agent itself authenticates presenting the tag (needs its private key), the desktop reads ownership only from the agent-signed profile, and the directory accepts only policies from the owner that profile names.
A relay operator who wants to limit who may bring agents would be better served by a relay-side policy than a UI gate.
Alternatives considered
- Importing a keypair into the form. Moves the agent's private key onto the owner's laptop, and the desktop would then consider itself the agent's manager. The public-key-only flow avoids both.
buzz agents draft-create. It needsBUZZ_AUTH_TAGalready, so it can't bootstrap the first attestation. It's for an attested agent proposing a new agent (and see #3791).- A CLI subcommand to mint tags and policies. Works — it's what we use today — but it means pasting the owner's
nsecsomewhere other than the keyring. A desktop action keeps the key where it is.
Additional context
Related, and in practice encountered in this order when doing this by hand:
- #6072 / #7077 — on a closed relay, a direct relay member's valid tag is ignored, so the owner is never recorded. Agents have to be left out of
relay_members. - #5492 —
buzz-acpnever republishes itskind:0withBUZZ_AUTH_TAG, and the desktop decides "agent" from that profile. (For comparison, another harness's Buzz channel plugin does refresh its profile with the tag on start.) - #5751 —
set-profilewithoutBUZZ_AUTH_TAGsilently drops an existing attestation. - Channel "Change role" offers admin/member/guest only, so an agent added as
memberbefore it was attested can't be switched tobot— it has to be removed and re-added. Possibly intentional; mentioning it because it's the last step of the same path.
Duplicates: none found for registering an externally-run agent. Closest are agent snapshot import (#4197, #5458), which imports a definition rather than an externally-run key, and draft-create (#3791).
Tested against relay 40220d5 (v0.2.1).
I'd very much like to see this feature implemented. I've got a fleet of Hermes agents and can only add them as a human user right now as a workaround.
We run Buzz Desktop 0.5.28 with a self-hosted relay labelled revision https://github.com/block/buzz/commit/b5223d2525defa2a53dcd29ddcc69f609b8711ab. We have an externally generated agent identity intended for standalone systemd hosting. What supported workflow lets the owner authorize that existing agent and publish both its NIP-OA attestation and owner-signed kind:30177 policy, while keeping the owner’s private key in its protected store? Please identify the exact supported command/UI, required versions and documentation. If unavailable in these versions, is there a released upgrade or supported alternative? We do not want a custom mint, private-key export, contributor fork or duplicate managed runtime.
I'm using Buzz Desktop 0.5.28 with a Hermes agent running on Hostinger Managed Hermes. I want to mention the existing remote agent using @mentions, without moving it to my Mac or exposing its private key.
The remote agent has its own public key and relay configuration. The Hostinger agent's public key does not match any of my three local non-built-in agent records.
Could you confirm:
- Does Buzz Desktop 0.5.28 support registering an existing remote agent public key?
- Is there a supported workflow to create the required NIP-OA attestation and kind 30177 owner policy using the Desktop keyring, without exporting the owner's private key?
- After registration, what is the supported procedure to make the agent eligible for channel mentions and receive/respond to them?
- Has this functionality shipped in a release newer than 0.5.28, or is issue #8012 still open?
I want to preserve my current Hostinger identity and avoid custom scripts that sign or publish authorization events with private keys.
I need to connect my existing Hostinger Managed Hermes agent to Buzz Desktop 0.5.28. I found the connect-remote-agent implementation referenced in issue #8012. Is there an official released build containing this feature? If so, please give me the exact version and steps to connect an existing agent by public key while keeping my owner's private key inside Buzz Desktop.
I'm encountering a related existing-agent onboarding gap with the newer Buzz app on macOS.
Environment checked on 2026-11-14:
- Buzz Desktop 1.0.2 from
block/buzz-app, with its bundledbuzzCLI. - Hermes Agent 0.23.1, revision
3b4215785882, running an existing named profile through its shared gateway. - Intended integration: Hermes's native Buzz platform adapter, preserving the existing profile, keypair, memory, skills, model authentication, and scheduled tasks.
Observed:
- The saved agent private key derives the intended public key; the existing credential copies agree.
- The human CLI's Desktop pairing can read the hosted community. Requests made with the agent key fail authentication with exit code 3.
- The relay's NIP-11 discovery advertises
requires_nip_fi: true. A direct agent WebSocket connection receives HTTP 401 before the Nostr AUTH challenge. - The visible community/channel roster contains only the human account, and Your agents is empty.
- In the 1.0.2 UI we inspected, the harness picker offers no Hermes/custom harness option. The snapshot importer explicitly says it creates a fresh keypair.
- No owner-attestation tag has been provisioned for this agent. Inspection of the installed Hermes native adapter found signing and optional NIP-OA handling, but no NIP-FI assertion acquisition/refresh flow.
This adds a newer-app/hosted-relay case to the registration need here. Our connection fails before inbound dispatch, so we have not validated model execution or replies through Buzz. We have paused the adapter while keeping Hermes running.
Is there a supported, released workflow to authorize/register an existing externally operated public key with Buzz 1.0.x and provision the agent authentication required by a NIP-FI community, while keeping the owner's private key in secure storage and retaining the existing agent key? If this belongs in block/buzz-app or a separate NIP-FI tracking issue, a pointer would help.
Related: #6997 and #6571. The latter's already-attested-profile prerequisite appears to leave initial attestation issuance as a separate step.
Adding the hosted-community case, since it changes what "register an agent that runs elsewhere" has to do.
On a community that enforces NIP-FI (hosted *.communities.buzz.xyz, NIP-11 requires_nip_fi: true), the NIP-OA tag alone doesn't get a server-hosted agent in: the relay answers its WebSocket upgrade with 401 unless it attaches a nip-fi-agent+jwt, and NIP-FA's agent grant needs the owner's adapter session and a NIP-98 proof signed by the agent key in one exchange.
A flow that keeps both secrets where they are could look like this:
- The owner pastes the agent's existing public key; the desktop signs the NIP-OA tag over it (and publishes the
kind:30177policy, as above). - The desktop builds the
agent-grantform body and shows its sha256; the operator's side signs the NIP-98 proof over that payload with the agent key and hands back only the signed proof event. - The desktop posts the exchange with its own adapter session and gives the operator the opaque agent grant.
Neither the owner's session nor the agent's private key leaves its machine. The harness side (using the grant to fetch assertions on every connection) is #9737.