Skip to content

xernst/device-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Device Link

A multi-machine AI agent swarm for macOS. Three helper Macs run Ollama as a committee, with a Hermes-powered synthesis hub as the overseer. Control everything from your phone via Telegram or from terminal via CLI. Zero API cost.

Architecture

M4 Air (your laptop — on the go)
    │
    │ Tailscale encrypted mesh
    │
    ├── M1 Air  — "The Pragmatist"       qwen2.5:3b     Fast, practical worker
    │
    ├── M1 Pro  — "Synthesis Hub"         qwen2.5:14b    Hermes Agent overseer
    │              Always-on dashboard.    + coder:14b    Resolves, learns, delegates.
    │              LiteLLM gateway.        + coder:32b
    │
    └── M2 Air  — "The Devil's Advocate"  qwen2.5:7b     Sharp critic, risk finder

Committee Mode (Default)

  1. You send a task (Telegram or CLI)
  2. Pragmatist and Devil's Advocate fire in parallel
  3. Both responses flow to Hermes Synthesis Hub on M1 Pro
  4. Hermes synthesizes — resolves tensions, references past decisions, builds skills
  5. Verdict delivered to Telegram or terminal

Hermes is not a peer. It's the overseer. Workers execute; Hermes thinks and improves.

Quick Start

1. Set up the helper nodes

On each Mac:

git clone https://github.com/xernst/device-link.git
cd device-link
./setup.sh pragmatist       # M1 Air
./setup.sh strategist       # M1 Pro (+ Hermes Agent)
./setup.sh devils-advocate  # M2 Air

2. Connect Tailscale

On every machine (including your main laptop):

tailscale up    # Sign in with the same account on all machines
tailscale ip -4 # Note each machine's IP

3. Set up your main Mac

cd device-link
bash main-mac/setup.sh

Add to ~/.zshrc:

export TELEGRAM_BOT_TOKEN=your-token
export TELEGRAM_CHAT_ID=your-chat-id
export M1AIR_URL=http://100.x.x.x:11434
export M1PRO_URL=http://100.x.x.x:11434
export M2AIR_URL=http://100.x.x.x:11434

4. Use it

From terminal:

device-link p "run tests on my-app"           # Pragmatist (fast)
device-link s "design the auth system"         # Strategist / Hermes (deep)
device-link da "find the flaws in this plan"   # Devil's Advocate (critical)
device-link committee "review PR #42"          # All 3 + synthesis
device-link status                             # Health check

From Telegram — just message the bot:

/fast quick question          → Pragmatist
/think complex problem        → Hermes
/committee big decision       → All 3 + synthesis
/status                       → Node health
/search topic                 → Web search + summary

Deploy to Helpers

./deploy.sh pragmatist       # Push + run setup on M1 Air
./deploy.sh strategist       # Push + run setup on M1 Pro
./deploy.sh devils-advocate  # Push + run setup on M2 Air
./deploy.sh all              # All 3

What Gets Installed

Component Purpose Where
Tailscale Encrypted mesh VPN All machines
Ollama Local LLM inference All helpers
Hermes Agent Synthesis hub + memory + skills M1 Pro only
LiteLLM Unified OpenAI-compatible API M1 Pro only
OpenClaw Always-on API gateway All helpers
Pinchtab Browser control via HTTP All helpers
mosh + tmux Resilient remote sessions All helpers
Claude Code AI coding agent All helpers
claw_bot.py Telegram bot (pure Ollama) Main Mac

Security

  • All traffic encrypted via Tailscale (WireGuard)
  • Ollama bound to Tailscale IP only — not exposed publicly
  • SSH key auth for deployment
  • No ports on the public internet
  • Zero cloud dependencies for inference

Customization

Change models: Edit nodes/<node>/ollama-models.txt, then bash config/ollama.sh <node>

Change personalities: Edit nodes/<node>/profile.md

Change Hermes behavior: Edit ~/.hermes/config.yaml on the M1 Pro

Cost

What Cost
Inference (Ollama) $0
Synthesis (Hermes) $0
API gateway $0
Networking $0
Telegram bot $0
Monthly total ~$0

Requirements

  • macOS on all machines
  • Same Tailscale account across all machines
  • Homebrew (installed automatically)
  • No API keys required for daily use (Claude is fallback only)

About

Multi-machine AI agent swarm for macOS — left brain (analytical) + right brain (creative) helpers triggered from your main Mac

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors