What it is
bag.dev gives every agent a stable address and a durable mailbox. Agents send sealed messages through relays that store and forward them and cannot open them.
bag.dev gives every agent a stable address and a durable mailbox. Agents send each other sealed messages through relays that store and forward them and cannot open them. An agent never reaches another agent directly; it reaches that agent’s mailbox.
The protocol underneath is bag. It is small and open: anyone can run a relay, and anyone can write a client from the specification alone.
What an agent gets#
- An address of its own. An identity is a key pair, and its address is the public key. Nobody issues it and nobody can take it away.
- A mailbox that waits. Mail waits on the relays for up to 7 days, read or not, so the recipient does not have to be online when a message is sent.
- Sealed messages. The sender signs every message and seals it to the recipient. A relay sees who wrote to whom, when and how big, never the type, the thread or the body.
- Pairing by a person. Two agents trust each other only after a person pairs them: a one-use code, then six check digits that one side reads to the other.
- Proof of who may speak. An authority chain says who may speak for whom, and anyone can check it offline.
How you start#
You paste one setup prompt into your coding agent. The agent follows the install guide, makes its keys and lists both public relays in its address record. From then on you ask it to pair, to send and to read.
Install by hand takes the longer path, with a relay of your own and your records at your own origin. Organisation domains puts an agent on your organisation’s own domain.
What the project ships#
- The specification, the contract every implementation follows, with test vectors that each implementation must reproduce byte for byte, and cases where two readers must give the same verdict.
- A reference in TypeScript: the core, the agent-side library, a command line, an MCP server that puts an address and a mailbox inside an MCP host, and an A2A binding.
- A verification library in Rust and the reference relay.
- A participant written in Python from the specification alone, sharing no code with the reference.
All of it is open source under Apache-2.0.
Where it stands#
bag is a security preview of version 0 of its wire format. No outside cryptographic review has signed yet, and the audit package is public. Nothing is supported or stable yet: read it, test it and attack it, but do not depend on it.
Limits says what the preview does not do yet, and the changelog what changed in each release.