
A protocol for autonomous agents to resolve natural-language content intents
against peer-to-peer file swarms, without a central orchestrator.
⚠ Pre-RFC draft — do not implement. Everything is subject to change.
Today, when you want a specific file, a paper, a recording, a document, a release, you describe what you want to a search engine, evaluate the results yourself, find an identifier (URL, magnet link, CID) and then your client fetches it.
Every step has a human in the loop. The bottleneck is the resolution of intent to identifier.
Swarm is the reference implementation of SwAPTP (Swarm Agent Peer-to-Peer Protocol), which lets autonomous agents do that resolution themselves, peer-to-peer, with no central index.
human: "find me the second John Doe content"
agent: ↓ resolves intent against the swarm
agent: → returns content-addressed identifier + verified sources
agent: → fetches via existing backend (IPFS, BitTorrent v2)
flowchart LR
H(("Human"))
A["Agent"]
L["Local Node"]
P1["Peer A"]
P2["Peer B"]
P3["Peer C"]
B[("IPFS · BTv2")]
H -->|intent| A
A --> L
L -.-> P1
L -.-> P2
L -.-> P3
P1 -.->|candidates| L
P2 -.->|candidates| L
P3 -.->|candidates| L
L -->|content_id| A
A -->|fetch| B
B -->|bytes| H
No magnet links. No search queries. No curated trackers. Just intent in, content out.
Swarm isn't a storage protocol. It doesn't move bytes. It sits above content-addressed storage (IPFS, BitTorrent v2, libp2p) and provides the semantic layer those protocols deliberately leave out.
The novelty is the binding between natural language and content-addressed identity. Existing P2P protocols solve transport, this project solves discovery without a human.
| Project | What it does | Where Swarm differs |
|---|---|---|
| IPFS | Content-addressed storage and transfer | Swarm uses IPFS as a backend. IPFS resolves CIDs to bytes; Swarm resolves intents to CIDs. |
| BitTorrent / BitTorrent v2 | Swarm-based file transfer with magnet links | Swarm replaces the human-curated magnet/tracker step with autonomous semantic resolution. |
| Tribler | Decentralized BitTorrent with signed channels | Closest precedent. Swarm separates discovery from transport, adds agent-driven intent resolution, and is backend-agnostic. |
| Nostr | Signed events propagated by relays | Conceptual influence on how Swarm propagates Node Manifests and signed Index Entries. |
| MCP / A2A / ANP | Agent-to-tool and agent-to-agent messaging | Orthogonal. Those connect agents to capabilities; Swarm connects agents to content. |
┌─────────────────────────────────────────┐
│ Layer 5, SUSTAINABILITY │
│ Seeding policy, reputation, incentives │
├─────────────────────────────────────────┤
│ Layer 4, VERIFICATION │
│ Hash verification, manifest signatures │
├─────────────────────────────────────────┤
│ Layer 3, TRANSFER │
│ Delegated to backend (IPFS, BTv2, …) │
├─────────────────────────────────────────┤
│ Layer 2, INTENT RESOLUTION │
│ Natural-language intent → content ID │
├─────────────────────────────────────────┤
│ Layer 1, IDENTITY │
│ Keypair-based node identity │
└─────────────────────────────────────────┘
Full specification: SPEC.md
This project is at the spec-first stage. There is no reference implementation yet. The current focus is:
- Hardening the v0.1 spec through external review
- Canonical embedding model decided:
BAAI/bge-m3(see §Canonical Embedding Model) - Identifying the bootstrap corpus and first implementation target
No release timeline yet. This is a research-stage project.
Swarm is designed spec-first. The most valuable contributions are protocol-level critique.
- Found something wrong? Open a Discussion under the relevant layer.
- Have a counter-proposal? Open a Discussion before writing code. Decisions are made in conversation.
- Want to implement a part? Wait for the spec to stabilize, or fork and experiment, but expect breaking changes.
See CONTRIBUTING.md for detail.
Swarm started as a research draft by @utreras. The first version of the spec attempted distributed cognitive task execution and was discarded after concluding the cognitive-decomposition primitive was unimplementable. The current v0.1 reframes around content discovery, where the underlying primitives (hashing, content addressing, swarm transport) actually hold.
Conceptual ancestors: BitTorrent, Bitcoin, IPFS, Tribler, Nostr.
MIT, see LICENSE.
If you read the spec and think it is wrong, you're (goddamn) right. Open a discussion!