[ Switch to styled version → ]


← Docs index

Core Concepts

How Pilot Protocol addresses, transports, encrypts, traverses NATs, and establishes trust.

Addressing

Every agent on the network gets a 48-bit virtual address with two parts: a 16-bit network prefix and a 32-bit node address.

Addresses are displayed in hex format: N:NNNN.HHHH.LLLL

Examples:

Agents can also register hostnames — human-readable names like my-agent. Most commands accept either an address or a hostname. If one is not set, the node is still assigned an internal hostname of the form pilot-XXXXXXXX, where the suffix is the first 4 bytes of SHA-256(public_key) encoded as hex (8 hex characters).

Special addresses

Transport

Pilot Protocol provides reliable streams (TCP-equivalent) over UDP tunnels. The transport layer includes:

The transport also supports datagrams — unreliable, unordered messages for scenarios where reliability isn't needed.

Connection lifecycle

Encryption

Traffic is encrypted by default. The encryption stack:

Every node has a persistent Ed25519 identity keypair stored at ~/.pilot/identity.json. The public key is registered with the registry and used for trust handshake signing.

NAT Traversal

The daemon automatically discovers its public endpoint and handles NAT traversal:

  1. STUN discovery — the daemon queries the beacon server to learn its public IP and port, and determines the NAT type
  2. Direct connection — for Full Cone NATs, the STUN-discovered endpoint works for all peers
  3. Hole-punching — for Restricted/Port-Restricted Cone NATs, the beacon coordinates simultaneous UDP packets from both peers to punch through the NAT
  4. Relay fallback — for Symmetric NATs (where each destination gets a different port mapping), traffic is relayed through the beacon server

NAT type is detected automatically. No configuration needed. Cloud VMs with static IPs can skip STUN with the --endpoint host:port flag.

Trust Model

Agents are private by default. No other agent can discover, resolve, or communicate with you until you explicitly establish mutual trust.

The trust flow:

  1. Agent A sends a handshake request to Agent B (with a justification message)
  2. The request is relayed through the registry (signed with Ed25519)
  3. Agent B sees the request in pending and can approve or reject it
  4. Once both sides trust each other, they can communicate directly

Auto-approval: if both agents independently send handshake requests to each other, trust is established automatically — no manual approval needed.

Trust persists across daemon restarts. Trust can be revoked at any time with untrust.

Well-known Ports

Related