Skip to content

TeoSlayer/pilotprotocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

312 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Pilot Protocol

Pilot Protocol

The network stack for AI agents.
Addresses. Ports. Tunnels. Encryption. Trust.

Docs  ·  Wire Spec  ·  Whitepaper  ·  IETF Draft  ·  Agent Skills  ·  Polo (Live Dashboard)


Go Core uses Go standard library only Encryption Tests IETF Internet-Draft License Online Nodes Requests


Pilot Protocol Demo — two agents: install, trust, data exchange

The internet was built for humans. AI agents have no address, no identity, no way to be reached. Pilot Protocol is an overlay network that gives agents what the internet gave devices: a permanent address, authenticated encrypted channels, and a trust model -- all layered on top of standard UDP.

Agents register with a rendezvous service for discovery and NAT traversal. Application data flows directly between peers -- never through a central server. It is not an API. It is not a framework. It is infrastructure.


The problem

Today, agents talk through centralized APIs. Every message passes through a platform -- the platform sees all traffic, controls access, and becomes a single point of failure.

graph LR
    A1[Agent A] -->|HTTP API| P[Platform / Cloud]
    A2[Agent B] -->|HTTP API| P
    A3[Agent C] -->|HTTP API| P
    style P fill:#f66,stroke:#333,color:#fff
    style A1 fill:#4a9,stroke:#333,color:#fff
    style A2 fill:#4a9,stroke:#333,color:#fff
    style A3 fill:#4a9,stroke:#333,color:#fff
Loading

Pilot Protocol takes the platform out of the data path. A lightweight rendezvous service handles discovery and NAT traversal, but once agents find each other, they talk directly over authenticated, encrypted tunnels:

graph LR
    A1[Agent A<br/><small>0:0000.0000.0001</small>] <-->|Encrypted UDP Tunnel| A2[Agent B<br/><small>0:0000.0000.0002</small>]
    A1 <-->|Encrypted UDP Tunnel| A3[Agent C<br/><small>0:0000.0000.0003</small>]
    A2 <-->|Encrypted UDP Tunnel| A3
    A1 -.->|discovery| RV[Rendezvous]
    A2 -.->|discovery| RV
    A3 -.->|discovery| RV
    style A1 fill:#4a9,stroke:#333,color:#fff
    style A2 fill:#4a9,stroke:#333,color:#fff
    style A3 fill:#4a9,stroke:#333,color:#fff
    style RV fill:#888,stroke:#333,color:#fff
Loading

What agents get

pilotctl info                          # show your address, hostname, peer count
pilotctl set-hostname my-agent         # claim a name other agents can resolve
pilotctl find agent-alpha              # resolve a public demo peer
pilotctl ping agent-alpha              # round-trip over the encrypted tunnel
pilotctl bench agent-alpha             # 1 MB echo benchmark

Once you have a trusted peer of your own, you can send and receive messages on any port:

# on the sender
pilotctl send other-agent 1000 --data "hello"

# on the receiver
pilotctl recv 1000 --count 5 --timeout 30s

Every CLI command supports --json for structured output — see the CLI reference for the full surface area.

Example JSON output
$ pilotctl --json info
{"status":"ok","data":{"address":"0:0000.0000.0005","node_id":5,"hostname":"my-agent","peers":3,"connections":1,"uptime_secs":3600}}

$ pilotctl --json find other-agent
{"status":"ok","data":{"hostname":"other-agent","address":"0:0000.0000.0003"}}

$ pilotctl --json recv 1000 --count 1
{"status":"ok","data":{"messages":[{"seq":0,"port":1000,"data":"hello","bytes":5}]}}

$ pilotctl --json find nonexistent
{"status":"error","code":"not_found","message":"cannot find \"nonexistent\" — hostname not found or no mutual trust","hint":"establish trust first: pilotctl handshake nonexistent \"reason\""}

Highlights

Addressing

  • 48-bit virtual addresses (N:NNNN.HHHH.LLLL)
  • 16-bit ports with well-known assignments
  • Hostname-based discovery

Transport

  • Reliable streams (TCP-equivalent)
  • Sliding window, SACK, congestion control (AIMD)
  • Flow control (advertised receive window)
  • Nagle coalescing, auto segmentation, zero-window probing
  • NAT traversal: STUN discovery, hole-punching, relay fallback

Security

  • Authenticated key exchange (Ed25519-signed X25519 + AES-256-GCM)
  • Ed25519 identity keys bound to tunnel sessions
  • Nodes are private by default
  • Mutual trust handshake protocol (signed, relay via registry)

Operations

  • Core protocol: Go standard library only
  • Single daemon binary with built-in services
  • Structured JSON logging (slog)
  • Atomic persistence for all state
  • Hot-standby registry replication

Architecture

graph LR
    subgraph Local Machine
        Agent[Your Agent] -->|commands| CLI[pilotctl]
        CLI -->|Unix socket| D[Daemon]
        D --- E[Echo :7]
        D --- DX[Data Exchange :1001]
        D --- ES[Event Stream :1002]
        D --- TS[Task Submit :1003]
    end

    D <====>|UDP Tunnel<br/>AES-256-GCM + NAT traversal| RD

    subgraph Remote Machine
        RD[Remote Daemon] -->|Unix socket| RC[pilotctl]
        RC -->|commands| RA[Remote Agent]
        RD --- RE[Echo :7]
        RD --- RDX[Data Exchange :1001]
        RD --- RES[Event Stream :1002]
        RD --- RTS[Task Submit :1003]
    end

    D -.->|register + discover| RV
    RD -.->|register + discover| RV

    subgraph Rendezvous
        RV[Registry :9000<br/>Beacon :9001]
    end
Loading

Your agent talks to a local daemon over a Unix socket. The daemon handles tunnel encryption, NAT traversal, packet routing, congestion control, and built-in services. The daemon maintains a connection to a rendezvous server (registry + beacon) for node registration, peer discovery, and NAT hole-punching. Once a tunnel is established, data flows directly between daemons -- the rendezvous is not in the data path.

A public rendezvous is provided at 34.71.57.205:9000, or you can run your own with rendezvous -registry-addr :9000 -beacon-addr :9001.

For connection lifecycle details, gateway bridging, and NAT traversal strategy, see the full documentation.


Demo

A public demo agent (agent-alpha) is running on the network with auto-accept enabled:

# 1. Install
curl -fsSL https://pilotprotocol.network/install.sh | sh

# 2. Start the daemon
pilotctl daemon start --hostname my-agent --email user@example.com

# 3. Request trust (auto-approved within seconds)
pilotctl handshake agent-alpha "hello"

# 4. Wait a few seconds, then verify trust
pilotctl trust

# 5. Start the gateway (maps the agent to a local IP)
sudo pilotctl gateway start --ports 80 0:0000.0000.0004

# 6. Open the website
curl http://10.4.0.1/

You can also ping and benchmark:

pilotctl ping agent-alpha
pilotctl bench agent-alpha

Install

curl -fsSL https://pilotprotocol.network/install.sh | sh

Set a hostname and email during install:

curl -fsSL https://pilotprotocol.network/install.sh | PILOT_EMAIL=user@example.com PILOT_HOSTNAME=my-agent sh
What the installer does
  • Detects your platform (linux/darwin, amd64/arm64)
  • Downloads pre-built binaries from the latest release (falls back to building from source if Go is available)
  • Installs pilot-daemon, pilotctl, pilot-gateway, and pilot-updater to ~/.pilot/bin
  • Adds ~/.pilot/bin to your PATH
  • Writes ~/.pilot/config.json with the public rendezvous server pre-configured
  • Sets up system services (Linux: systemd, macOS: launchd) for daemon and auto-updater
  • The auto-updater runs in the background, checking for new releases every hour and applying updates automatically

Uninstall: curl -fsSL https://pilotprotocol.network/install.sh | sh -s uninstall

From source (requires Go 1.25+): git clone https://github.com/TeoSlayer/pilotprotocol.git && cd pilotprotocol && make build


Testing

go test -parallel 4 -count=1 ./tests/

1048 tests pass. The -parallel 4 flag is required -- unlimited parallelism exhausts ports and causes dial timeouts.


Documentation

Document Description
Docs Site Guides, CLI reference, deployment, configuration, and integration patterns
Wire Specification Packet format, addressing, flags, checksums
Whitepaper (PDF) Full protocol design, transport, security, validation
IETF Problem Statement Internet-Draft: why agents need network-layer infrastructure
IETF Protocol Specification Internet-Draft: full protocol spec in IETF format
Agent Skills Installable agent skill catalog for Pilot Protocol
Polo Dashboard Live network stats, node directory, and tag search
Contributing Guidelines for contributing to the project
Governance Maintainers, decision-making, and project stewardship
Security Policy How to report vulnerabilities
Third-Party Licenses Attribution for third-party code
Changelog Release history

Contact

Have questions, want a private network, or interested in enterprise support?


License

Pilot Protocol is licensed under the GNU Affero General Public License v3.0.



Pilot Protocol
Built for agents, by humans.