Pilot Protocol: A P2P Network Stack for AI Agents Built with Claude

A developer frustrated with current multi-agent communication methods has built Pilot Protocol, a pure user-space, peer-to-peer virtual network stack designed specifically for autonomous agents. The protocol addresses the problem of agents being treated like scripts rather than network citizens by providing direct, secure communication without centralized databases, REST APIs, or cloud message queues.
Technical Implementation
The protocol was built in Go with zero CGO dependencies. Claude AI helped write the UDP multiplexing logic and debug complex edge cases in NAT traversal. Pilot bypasses the host kernel entirely and doesn't use TUN/TAP devices like Tailscale or WireGuard, making it suitable for unprivileged environments where root access isn't available.
The daemon multiplexes a custom TCP-like reliable protocol over standard UDP datagrams. Every agent gets a permanent 48-bit virtual address and can bind to standard 16-bit ports (e.g., Port 1001 for data exchange, Port 1002 for pub/sub). A STUN-style beacon handles NAT traversal, achieving a 100% direct connection success rate without relay servers by leveraging Endpoint-Independent Mapping used by cloud providers like GCP.
Security Features
Every tunnel uses X25519 ECDH key exchange and AES-256-GCM authenticated encryption by default. An application-level trust handshake on virtual Port 444 allows agents to explicitly request, auto-approve, or reject collaboration requests based on cryptographic identities before exchanging data.
Performance and Limitations
The protocol has routed over 1.5 billion P2P requests across a swarm of 12,000+ active agents in production. Current performance limitations include:
- 89 MB/s maximum throughput on localhost
- 2.1 MB/s across cross-continent WAN links
The dual IPC boundaries (moving data from Application → Unix Socket → Daemon → UDP Encapsulation) create a context-switching penalty. The protocol implements TCP congestion control (AIMD, Selective Acks, window sizing) over UDP but lacks deep-buffer bandwidth estimation like BBR, which hurts WAN throughput. The developer plans to fix the IPC bottleneck using shared-memory ring buffers (io_uring).
Development Challenges
Recreating TCP state machines, handling io.EOF, FIN packet propagation, and SetReadDeadline accurately across an IPC bridge was challenging but necessary for Go's standard net/http package to work without crashing.
The reference implementation is open-source and free to try, with a Python SDK available on PyPI for integration into existing orchestration frameworks.
📖 Read the full source: r/ClaudeAI
👀 See Also

SkyClaw Adds Encrypted Chat-Based API Key Setup for AI Agents
SkyClaw implements AES-256-GCM encrypted key ingestion through chat, intercepting key commands at the system layer so the LLM never sees API keys and using one-time key encryption so messaging platforms only see ciphertext.

Karpathy's autoresearch project: AI agents run overnight LLM training experiments
Andrej Karpathy released a minimal autoresearch project where an AI agent edits train.py, runs 5-minute nanochat training experiments, checks if val_bpb improved, and repeats overnight on a single GPU.

CONTACT: 3D Naval Combat Game Built Entirely with Claude Code
CONTACT is a 3D naval combat game built entirely with Claude Code + Opus, featuring a 7×7×7 volumetric cube, credit economy with tactical perks, and three game modes including Human vs Claude and Sonnet vs Sonnet with persistent strategic memory.

Master-plan: A Minimal Terminal Task System Built for Claude Code Users
A developer has built master-plan, a Claude Code plugin with four slash commands that manages tasks directly in the terminal using a markdown file and git. The system captures ideas mid-session without context switching and auto-detects test runners.