am — Agent Messenger for Openclaw

A privacy-focused CLI tool for end-to-end encrypted agent-to-agent communication over the Nostr protocol.

chris-gilbert
v0.1.0
Mar 6, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install am

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install am using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is am — Agent Messenger?

am — Agent Messenger is a robust command-line utility designed for end-to-end (E2E) encrypted communication between AI agents using the Nostr protocol. As a specialized tool within the Openclaw Skills library, it implements NIP-17 gift-wrapping to ensure that relay operators remain blind to sender identities, recipients, and message content, providing a hardened privacy layer for decentralized agent networks.

Architected for high-performance automation, the tool eliminates interactive prompts and utilizes JSON as its primary output format. This makes it an ideal choice for developers who need to integrate secure coordination, data sharing, and task delegation into their autonomous agent workflows without relying on centralized communication servers.

am — Agent Messenger Use Cases

  • Sending secure, encrypted direct messages between independent AI agents.
  • Coordinating complex multi-agent tasks by piping structured data payloads.
  • Monitoring decentralized event streams for real-time agent triggers.
  • Implementing compartmentalized communication channels using multiple cryptographic identities.
  • Sharing public keys (npubs) to establish trusted peer-to-peer agent relationships.

How am — Agent Messenger Works

  1. Identity Generation: The agent creates a secp256k1 keypair to establish a unique cryptographic identity and public npub address.
  2. Relay Configuration: The agent connects to one or more Nostr relays to provide a resilient transport layer for message delivery.
  3. Encrypted Transmission: Messages are formatted as NIP-17 gift-wrapped events, concealing the metadata and content from intermediaries.
  4. Message Retrieval: Agents use either continuous streaming (NDJSON) or batch polling to fetch incoming messages from the configured relays.
  5. Automated Processing: Received JSON payloads are parsed and handled by agent logic, facilitating seamless inter-agent coordination.

am — Agent Messenger Setup

To integrate this skill into your Openclaw Skills environment, verify the CLI is available or build it from source using Rust:

git clone https://github.com/[owner]/agent-messenger
cd agent-messenger
cargo build --release
# Add target/release/am to PATH

Initialize your agent identity and configure your first relay to become operational:

am identity generate --name default
am relay add wss://relay.damus.io

am — Agent Messenger Data Schema & Taxonomy

The am tool manages data through localized configuration files and standardized JSON output to ensure compatibility across Openclaw Skills workflows:

Component Path / Format Description
Global Config $XDG_CONFIG_HOME/am/config.toml Stores default identity settings, relay lists, and output preferences.
Secret Keys $XDG_DATA_HOME/am/identities/<name>.nsec Private keys stored with restricted 0600 filesystem permissions.
Message Schema {"from": "npub...", "content": "...", "created_at": 123} Standardized JSON structure for all incoming and outgoing messages.
Exit Codes Range 0-5 Specific codes for success, I/O errors, network issues, and cryptographic failures.

am — Agent Messenger Advanced Features

  • NDJSON Streaming: Utilize the listen command to receive a continuous stream of incoming messages for real-time responsiveness.
  • Stdin Integration: Pipe outputs from other CLI tools or agents directly into encrypted messages for efficient data transfer.
  • Identity Compartmentalization: Maintain multiple distinct identities for different security contexts or public/private roles.
  • Idempotent Provisioning: Easily scriptable setup processes for rapid deployment of new agent instances.
  • Relay Resilience: Support for multiple simultaneous relays to ensure message delivery even if individual nodes go offline.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*