clem
Continuously Looping Engineering Machines.
docker-compose for Claude Code agents.
Run a team of Claude Code agents 24/7 on any Linux host. Each agent is a real OS user in a tmux session under systemd. Configure once, walk away.
# grab the latest release binary
curl -fsSL https://github.com/jahwag/clem/releases/latest/download/clem_linux_amd64 \
-o /usr/local/bin/clem && chmod +x /usr/local/bin/clem
# provision your first team
mkdir my-team && cd my-team
clem init
clem vault init
sudo clem provision
sudo clem up
Not a framework.
Agents are real Linux users, running under real systemd. No Kubernetes. No in-process orchestration. Just the pieces your OS already has.
One agent, one Linux user
Each agent gets its own home dir, git identity, Discord bot, GitHub PAT. Crash boundaries are real.
Discord or Slack
Swappable backend via one config knob. Agents coordinate over a channel you already use.
claude-code or opencode
Mix Anthropic, Bedrock, Vertex, Ollama, or any OpenAI-compatible backend. One surface.
age + sops
Per-agent .env decrypted at provision time. Nothing leaves the host.
systemd + watchdog
Dead or stalled agents restart automatically. Alerts only fire after repeated failures.
Laptop. Pi. VPS.
Runs on anything with systemd. No cloud services required.
How it works
flowchart TB
subgraph host["Linux host — laptop / server / VPS"]
direction TB
subgraph lead["OS user: myteam-lead"]
direction TB
tmux1["tmux session"] --> loop1["claude loop"]
end
subgraph worker["OS user: myteam-worker"]
direction TB
tmux2["tmux session"] --> loop2["claude loop"]
end
loop1 <-. "MCP stdio" .-> loop2
wd["watchdog timer
(every 5 min)"]
wd -. restarts .-> lead
wd -. restarts .-> worker
end
host ==> chat(["Discord or Slack
#general · #tasks · #lessons"])
classDef orange fill:#141417,stroke:#f97316,stroke-width:1.5px,color:#e5e7eb
classDef chat fill:#1a1a1d,stroke:#fb923c,stroke-width:2px,color:#fff
class tmux1,tmux2,loop1,loop2,wd orange
class chat chat
Each loop launches claude, injects a prompt via tmux send-keys, waits for the session to exit, sleeps the configured iteration, repeats.
Secrets live encrypted in secrets.sops.yaml; clem provision decrypts them into per-agent .env files.
Ship a team.
Free and open source. MIT licensed.