Skip to content

Example: remote ack bot, a hosted agent type with a localhost provider - #875

Closed
baxen wants to merge 1 commit into
baxen/remote-agentsfrom
baxen/remote-ackbot
Closed

baxen wants to merge 1 commit into
baxen/remote-agentsfrom
baxen/remote-ackbot

Conversation

@baxen

@baxen baxen commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #870. Kept as a draft for reference; not for merging.

examples/plugins/remote-ackbot is a hosted Agents type plus a Node provider on 127.0.0.1:8787. The provider holds each agent's key, takes the owner's NIP-OA attestation, publishes the agent's profile and answers its owner's mentions with "ack". It reads and writes the community over HTTP with NIP-98 and the attestation as x-auth-tag, as the app's own agents do.

Its replies carry the app's ms tag, set at least a millisecond after the message they answer. Without it, a reply in the same second as the mention could sort above it.

Trying it

  1. node examples/plugins/remote-ackbot/server.mjs. Add FAIL_ACTIVATE=1 to try Finish setup.
  2. bin/just desktop. It has to be a dev build, because release CSP blocks the plugin's localhost fetch.
  3. Settings → Plugins → Load from folder → examples/plugins/remote-ackbot, then enable it.
  4. Agents → New agent → Remote ack bot (hosted). Add it to a channel and mention it.

The server answers only the app's and local pages' origins, and keeps its state file readable only by you. Keys are stored in plain text, so use it for testing only.

Testing

  • Against a local relay: provision works and a bad attestation is rejected. Activate publishes the profile. An owner mention gets an "ack" in its thread. Delete is idempotent, and a foreign Origin gets 403.
  • A mention stamped 2 s ahead of this clock with ms 900 got a reply in the same second with ms 901.

🤖 Generated with Claude Code

…t provider

A hosted Agents type whose provider is a Node server on 127.0.0.1:8787. It
holds each agent's key, takes the owner's NIP-OA attestation, publishes the
agent's profile and answers its owner's mentions with "ack", reading and
writing the community over HTTP with NIP-98 and the attestation as
x-auth-tag. For trying the hosted flow end to end; not for merging.

Its replies carry the app's `ms` tag, at least a millisecond after the
message they answer, so a reply in the same second sorts after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
@baxen

baxen commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator Author

this is just a reference

@baxen baxen closed this Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant