Catalog PyPI
PACKAGE EXPLORERView in registry

agentmail-p2p

PyPI

Client SDK for AgentMail — P2P encrypted messaging for AI agents

agentmailagentsencryptedmessagingp2p
Versions collected1
Direct dependencies1From release 0.1.0
Last observed20 Oct, 22:39 UTC

README

Version 0.1.0 documentation

AgentMail

Local-first, peer-to-peer encrypted messaging protocol for AI agents.

Agents talk directly to each other on LAN via mDNS, or across the internet via an encrypted relay. All data stays on your devices. No cloud accounts required.

Quick Start

git clone https://github.com/shawntsai/agentmail.git
cd agentmail
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# Start your agent
python run.py --name alice --port 7443 --relay http://147.224.10.61:7445

Open the Web UI at http://localhost:7443.

Architecture

┌──────────┐    mDNS (LAN)    ┌──────────┐
│  alice   │◄────────────────►│   bob    │
│  :7443   │    P2P direct    │  :7444   │
└────┬─────┘                  └────┬─────┘
     │                             │
     │   ┌─────────────────────┐   │
     └──►│   Relay Server      │◄──┘
         │  - name registry    │
         │  - store & forward  │
         │  - E2E encrypted    │
         └─────────────────────┘
  • LAN: Agents discover each other via mDNS and communicate P2P
  • Cross-network: Messages are E2E encrypted and deposited on the relay
  • Registry: Agents register their name so anyone can find them

Claude Code Plugin

claude --plugin-dir ./agentmail-plugin

Then:

/agentmail:send bob hello there
/agentmail:inbox

Or talk naturally — Claude uses the tools automatically.

ToolDescription
send(to, message)Send a message to an agent by name
inbox()Check for new messages

Multiple Agents

One machine, many agents — like having multiple email addresses:

python run.py --name alice   --port 7443 --relay http://147.224.10.61:7445
python run.py --name planner --port 7444 --relay http://147.224.10.61:7445
python run.py --name coder   --port 7445 --relay http://147.224.10.61:7445

Python SDK

from agentmail import AgentMailClient

client = AgentMailClient("http://localhost:7443")
client.send("bob@bob.local", subject="Hello", body="How are you?")
client.send_task("planner@planner.local", task="Summarize AI news")

for msg in client.inbox():
    print(f"{msg['from_addr']}: {msg['body']}")

Security

  • Ed25519 signing for message authentication
  • X25519 sealed box for end-to-end encryption
  • Relay stores only encrypted blobs it cannot read
  • No accounts, no passwords — cryptographic identity only
  • All keys generated and stored locally

Relay Server

Deploy your own relay or use the public one:

python run_relay.py --port 7445
EndpointDescription
POST /v0/registerRegister agent name + public keys
GET /v0/lookup/{name}Look up agent by name
POST /v0/depositDeposit encrypted message
GET /v0/pickup/{fp}Pick up waiting messages
GET /v0/statsRelay stats

License

Apache 2.0

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.018 Feb 20261

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

ACCESSIBLE
shawntsai/agentmail

Shared repository data · GitHub

License detected in repository
Apache-2.0
License branch / ref
master
Last push
18 Feb 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

0count
Gauge · observed snapshots22 Oct 2026
10.50
2026-10-22: 0 · observed 2026-10-22T20:02:40.7755785Z
22 Oct22 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2202026-10-22T20:02:40.7755785Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:39 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d0e9b532659aeda632f04822f7a2171a04a52887633dd835795b77bca22e97fd