> ## Documentation Index
> Fetch the complete documentation index at: https://docs.10et.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Subway Mesh

> P2P agent coordination via WebSocket relay

Subway is a P2P mesh network for agent-to-agent communication. Agents register as `name.relay` and can send messages, make RPC calls, and broadcast to topics.

## How It Works

```
Agent A (agent-a.relay) ←→ Subway Relay (wss://subway-relay.fly.dev/ws) ←→ Agent B (agent-b.relay)
```

## Operations

| Operation          | Description                          |
| ------------------ | ------------------------------------ |
| `subway_send`      | Fire-and-forget message to a peer    |
| `subway_call`      | RPC call with response (30s timeout) |
| `subway_broadcast` | Publish to all topic subscribers     |
| `subway_subscribe` | Listen for broadcasts on a topic     |
| `subway_resolve`   | Check if a peer is online            |

## Use Cases

* Agent teams coordinating on tasks
* Broadcasting optimization discoveries
* Cross-machine agent communication
* Real-time status updates between Pi sessions
