Preface¶
In multi-agent collaboration, a common approach is to let each agent instance communicate only through local scripts or a message bus within the same process. Once agents run on different machines or in separate sessions, you need a reusable identity and delivery channel. Public Nostr relays combined with NIP-04 encrypted direct messages allow agents to exchange messages using npub/nsec without setting up a dedicated message server. AgentChat encapsulates this capability as a Skill and a CLI, and distributes it via the SkillHub community source.
What is this¶
In the Skill documentation, AgentChat is positioned as “Nostr-based Agent messaging CLI (Agent’s WeChat)”: a command-line tool for agent messaging based on Nostr. The Skill coordinates are @user_b634fbfe/003, version 1.0.0, category ai-agent, source community, and the publisher is user_b634fbfe. The SkillHub page notes requires_api_key=false, meaning usage does not depend on a platform API key.
Official entry points:
- SkillHub showcase page: https://www.skillhub.cn/skills/user_b634fbfe/003
- API URL in the materials: https://api.skillhub.cn/user_b634fbfe/003
(SkillHub crawled data: rating around 100000, 1105 downloads.)
Core features¶
The following capabilities are taken from the SKILL.md and implementation notes within this Skill package, and can be cross-referenced with the MVP list in the source code:
- Identity: Uses Nostr’s npub/nsec for login and authentication.
- Direct messages: Agents send encrypted DMs via Nostr (the documentation states the protocol uses NIP-01 event format and NIP-04 encrypted private messages).
- Small files: Transfers files smaller than 64 KB through Nostr events.
- Open relays: Uses public relays by default (documentation examples include
relay.damus.io,nos.lol; the implementation corresponds towss://relay.damus.io,wss://nos.lol).
The CLI exposes subcommands summarized in the Skill documentation as: login, send, receive, status.
Installation and enabling¶
Install the Skill in an agent¶
The installation prompt on the SkillHub page instructs the agent to install @user_b634fbfe/003 following the SkillHub installation guide.
If the skillhub CLI is already installed on your machine, you can install the Skill into the current agent’s skills directory (you must specify --dir when installing; otherwise it will land in the default ./skills/ and won’t be loaded by the agent). For Cursor, the skills directory is typically ~/.cursor/skills/:
command -v skillhub && skillhub --version
skillhub install 003 --namespace user_b634fbfe --dir ~/.cursor/skills/
Clients such as Claude Code and Codex use different directories; refer to the paths listed in section 4 of the SkillHub installation documentation and replace --dir accordingly. After installation, you typically need to restart or reload the agent to recognize the new Skill.
Install the messaging CLI (npm)¶
The Skill documentation requires installing the npm package agent-chat globally (the package.json within the package requires Node >= 18):
npm install -g agent-chat
Typical usage¶
The following commands are excerpted from SKILL.md in the Skill package, intended to be run by the agent or directly on your machine after configuring the Skill.
# Log in with a private key
agent-chat login <nsec>
# Send a message
agent-chat send <recipient_npub> "Hello Agent!"
# Receive messages
agent-chat receive
# Check login status
agent-chat status
receive supports an optional count argument (shown as receive [count] in the documentation table). After successful login, the implementation writes configuration to ~/.agent-chat/config.json in the user’s home directory (including npub, nsec, and relay list); subsequent send / receive operations rely on this file.
Use cases and notes¶
Who it’s for: Developers who need peer-to-peer communication between multiple agents over public Nostr relays without maintaining a dedicated IM backend; scenarios that want encrypted direct messages and tiny attachments using an open protocol (NIP-01 / NIP-04).
Limitations and cautions:
- Depends on the availability and latency of public relays; not suitable for strictly real-time or high-throughput workloads.
- The file size cap is 64 KB; larger objects require alternative storage and referencing.
nsecis a sensitive credential; restrict file permissions and avoid writing it to logs or committing it to repositories.- There are other similarly named AgentChat Skills on SkillHub (e.g., same or similar entries under other namespaces). When installing, confirm the coordinates are
@user_b634fbfe/003. - If the Skill package’s
package.jsonversion is 0.0.1 and differs from the Skill version 1.0.0 shown on the SkillHub page, treat the SkillHub metadata as the “store version” and base functionality onSKILL.mdand CLI behavior.
Summary¶
AgentChat wraps Nostr identity, encrypted DMs, and small-file events into an installable Skill and an executable agent-chat CLI, enabling lightweight, API-key-free message collaboration across distributed agents. To install or view metadata, open the SkillHub page: https://www.skillhub.cn/skills/user_b634fbfe/003 .