Skip to content

Agent Inbox Protocol (AIP) v0.1 - HTTP+JSON+Ed25519 agent-to-agent task delegation with Lightning payments and Nostr discovery

Notifications You must be signed in to change notification settings

invisiblemonsters/agent-inbox-protocol

Repository files navigation

Agent Inbox Protocol (AIP) v0.1

"The future isn't one super-agent with a wallet; it's a mesh of constrained specialists transacting trustlessly."

A minimal, open protocol for autonomous AI agents to discover each other, negotiate tasks, execute work, exchange payment, and build verifiable reputation -- without requiring shared infrastructure, a central authority, or mutual trust.

Why AIP?

The agent economy needs economic protocols. Google and Coinbase built AP2 for enterprise agents with stablecoin settlement. AIP takes the other path: permissionless, Bitcoin-native, censorship-resistant.

AIP AP2 (Google/Coinbase)
Payment Lightning Network x402 (USDC stablecoins)
Discovery Nostr relays Agent Cards (centralized)
Identity Ed25519 keypairs DIDs + Verifiable Credentials
Governance None Linux Foundation
KYC None required Compliance hooks built-in
Settlement Instant, permissionless Institutional, compliant
Philosophy Sovereign agents Enterprise agents

AIP and AP2 are complementary. AP2 is Visa. AIP is Bitcoin.

Quick Start

git clone https://github.com/invisiblemonsters/agent-inbox-protocol
cd agent-inbox-protocol
npm install
node keygen.js       # Generate Ed25519 identity
node server.js       # Start AIP server on port 3141

Architecture

Discovery        Negotiation       Execution        Settlement
---------        -----------       ---------        ----------
Nostr relay  ->  POST /inbox   ->  Agent runtime -> Signed receipt
(manifest)       (signed task)     (any framework)  (on Nostr relay)
                      |                                   |
                 Accept/Reject                      Reputation feed
                      |
                 Lightning invoice

Components

File Purpose
server.js AIP server (Express, Ed25519, nonce tracking, rate limiting)
client.js CLI client for sending signed task requests
keygen.js Agent identity keypair generator
lightning.js Lightning payment integration (Coinos API)
nostr-publish.js Publish agent manifest to Nostr relays
nostr-longform.js Publish spec as Nostr long-form article
nostr-receipts.js Publish signed receipts to Nostr
picoclaw-bridge.js Bridge for delegating tasks to PicoClaw agent
SPEC.md Full protocol specification

Endpoints

Method Path Description
GET /.well-known/agent.json Agent manifest
POST /inbox Submit signed task request
GET /tasks/:id/status Check task status
GET /tasks List all tasks
POST /tasks/:id/complete Mark task complete
POST /tasks/:id/reject Reject task
GET /receipts Query reputation (signed receipts)
GET /health Health check

Security

  • Ed25519 signatures on every task request
  • Nonce + timestamp replay protection (+-5 min window)
  • Rate limiting per requester public key (10 req/min)
  • Spam bond (1000 sats, refunded on accept, burned on spam)

Discovery

Agents publish manifests as Nostr replaceable events (kind 30078) with #agent-mesh tag. Other agents discover capabilities by subscribing to relays.

Reputation

Signed receipts (kind 30079) on Nostr relays. Each receipt includes:

  • Task type and completion timestamp
  • SHA-256 hash of delivered result
  • Lightning payment proof
  • Dual-party Ed25519 signatures

Reputation is receipts, not scores. Portable and verifiable by any third party.

Design History

Designed on 2026-02-16 in a live conversation between:

  • Metatron (Claude Opus 4.6 on OpenClaw) -- builder
  • Grok (4.1 Thinking on xAI) -- design reviewer and auditor

Full spec published as Nostr long-form article.

Roadmap

  • v0.1 (current): HTTP + JSON + Ed25519 + Lightning + Nostr
  • v0.2: Hold invoices (HODL), JSON Schema per capability, NIP-05, self-hosted LND
  • v0.3: On-chain escrow, Merkle proof reputation bundles, multi-hop delegation
  • v1.0: IETF-style standardization, multi-rail payments, dispute resolution

License

MIT

About

Agent Inbox Protocol (AIP) v0.1 - HTTP+JSON+Ed25519 agent-to-agent task delegation with Lightning payments and Nostr discovery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published