Network Platform Resources
Purpose
Provide every AI agent session with an always-current inventory of reachable compute platforms, how to connect, what's installed, and when to offload work.
Fleet Discovery
Fleet topology is auto-detected at runtime via fleet-config.js + resolve-inventory.js:
- IPs resolved from
.envFLEET_IP_*,~/.megingjord/devices.jsonoverlay, or example baseline - Device metadata merged:
inventory/*.example.json→ operator overlay → env - Run
node scripts/global/fleet-config.js profilefor current state
Platform Inventory
Devices come from the merged inventory (not tracked inventory/devices.json). Key roles:
Primary Dev Machine (local)
- Role: IDE host, agent execution, dashboard
- Constraints: Low memory — check mem-watchdog before heavy ops
- Crostini is NAT'd — cross-machine networking uses Tailscale
SML Node (remote inference tier)
- Role: Lightweight local inference (routing, classification)
- Ollama with small models (≤1B params)
- Constraints: ~2-3 GB RAM, tiny models only
Inference Host (remote compute)
- Role: Heavy compute, daemon hosting (OpenClaw Gateway)
- 16 GB RAM, runs 7B models via Ollama + LiteLLM
- Constraints: Check fleet-config profile before assuming reachable
Connection Method
All cross-machine networking uses Tailscale VPN mesh:
- WireGuard encrypted, bypasses NAT/firewall
- SSH via ProxyCommand:
sudo tailscale nc %h %p - Auth: Ed25519 key pair (passwordless)
- SSH config references device alias from merged fleet inventory (
fleet-config.js)
Quick Connect
ssh <device-id>
ssh <device-id> "<remote-command>"
scp -o ProxyCommand="sudo tailscale nc %h %p" file.txt $FLEET_SSH_USER@<ip>:<path>
Prerequisites
- Tailscale daemon running (start with
--tun=userspace-networkingon Crostini) - Tailscale on remote: system service (auto-start)
- OpenSSH on remote:
sshdservice (auto-start)
Troubleshooting
| Symptom | Fix |
|---|---|
| SSH timeout | Start tailscaled with --tun=userspace-networking |
| Tailscale logged out | sudo tailscale up → open URL in browser |
| SSH asks for password | Re-copy pubkey to remote authorized_keys |
| Ping works, SSH doesn't | Add firewall rule for port 22 |
When to Offload
| Trigger | Action |
|---|---|
| Memory pressure (mem-watchdog) | Offload build/test to fleet |
| Long-running daemon (OpenClaw) | Always on inference host |
| Heavy npm install / build | Faster on fleet node |
| Playwright multi-browser | Offload to avoid OOM |
When to Keep Local
| Scenario | Reason |
|---|---|
| IDE + Copilot sessions | Already here |
| Quick edits / git ops | Lower latency |
| Cloudflare deploys | Tokens configured locally |
Adding New Platforms
- Install Tailscale, authenticate with same account
- Install OpenSSH server
- Copy SSH pubkey to new machine's authorized_keys
- Add
Hostentry in~/.ssh/config - Run
bash scripts/global/fleet-discover.sh→ writes~/.megingjord/devices.json - Optionally set
FLEET_IP_<DEVICE_ID>in.env - Test:
ssh <new-alias> echo "OK"