Connecting Machines
Society agents don’t automatically discover each other. The registry is what makes agents aware of one another — it maps agent names to their connection details (URL + transport config).
This guide walks through connecting agents across a local machine and a remote server step by step.
The setup
Section titled “The setup”┌──────────────────┐ ┌──────────────────┐│ Local Machine │ │ Remote Server ││ │ │ ││ echo :8001 │◄──SSH────▸│ claude :8003 ││ greeter :8002 │ tunnel │ echo :8001 ││ │ │ ││ registry.json │ │ registry.json │└──────────────────┘ └──────────────────┘Each machine has its own registry. To talk to a remote agent, you register it locally with the right transport config.
Step 1: Start agents on both machines
Section titled “Step 1: Start agents on both machines”On the remote server:
# Copy binary (if not already installed)scp society user@server:~/.local/bin/society
# SSH in and start agentsssh user@servercd /path/to/societysociety daemon startOn the local machine:
society daemon startStep 2: Register remote agents locally
Section titled “Step 2: Register remote agents locally”Use onboard to add the remote agent to your local registry:
society onboardAgent name: server-claudeDescription: Claude on remote serverTransport [http/ssh/docker/stdio] (http): sshSSH host: serverSSH user: userSSH key path: ~/.ssh/id_ed25519SSH port (22): 22Agent port on remote host (8080): 8003Skills (comma-separated IDs, or empty): code, general
Added "server-claude" to registryNow you can send messages to it:
society send server-claude "what OS are you running on?"The message flows: local CLI -> SSH tunnel -> server:8003 -> Claude Code -> response back.
Step 3: Register local agents on the remote (optional)
Section titled “Step 3: Register local agents on the remote (optional)”If you want the remote server to talk back to your local agents, SSH into the server and register them there:
ssh user@servercd /path/to/societysociety onboardAgent name: laptop-echoTransport: sshSSH host: laptop # or IP/hostnameSSH user: youSSH key path: ~/.ssh/id_ed25519Agent port: 8001Using Tailscale
Section titled “Using Tailscale”If both machines are on Tailscale, you can use Tailscale hostnames directly:
society onboardAgent name: arch-claudeTransport: sshSSH host: arch # Tailscale hostnameSSH user: luisSSH key path: ~/.ssh/id_ed25519Agent port: 8003Or if the Tailscale network allows direct HTTP:
society onboardAgent name: arch-claudeTransport: httpURL: http://arch:8003 # Tailscale resolves thisThe SSH transport is preferred because it works even when the remote machine’s ports aren’t directly exposed.
Import/export registries
Section titled “Import/export registries”Instead of manually onboarding each agent, you can export a registry from one machine and import it on another.
On the server:
society export --output /tmp/server-agents.jsonCopy and import on local:
scp user@server:/tmp/server-agents.json .society import server-agents.jsonThe import command will prompt for transport config for each agent, since transport details differ per machine (paths, hostnames, etc.).
Discover agents from a running server
Section titled “Discover agents from a running server”If an agent is already running and reachable, you can discover it by URL:
society discover http://server:8001Found agent: Name: echo Description: Echoes messages back Skills: echo
Add to registry? [Y/n] yTransport [http/ssh/docker/stdio]: http
Added "echo" to registryThis fetches the agent card from /.well-known/agent.json and registers it.
Verifying connectivity
Section titled “Verifying connectivity”# Check what's registeredsociety list
# Health-check a specific agentsociety ping server-claudeThe ping command opens the transport, sends a test message, and reports latency. If it fails, you know the transport config or the remote agent is the issue.