Skip to main content
Run OpenLegion on your own machine with full control over your infrastructure.
Prefer not to manage infrastructure? Get started with managed hosting — a dedicated server provisioned for you in minutes.

Requirements

  • Python 3.10+ (CI tested on 3.11 and 3.12)
  • Docker running. Docker Desktop on macOS / Windows; on Linux either Docker Desktop or docker engine with your user in the docker group (sudo usermod -aG docker $USER, then re-login)
  • One LLM API key (Anthropic / OpenAI / Moonshot / any of 100+ providers via LiteLLM), or run Ollama locally for a keyless setup
  • OS: macOS, Linux, or Windows (PowerShell + Docker Desktop with WSL 2)

Install and launch

1

Clone and install

First install downloads ~70 packages and takes 2-3 minutes. The first openlegion start then builds two Docker images (~1 min for the agent image, ~3 min for the browser service).
2

Start your fleet

On first run (no credentials configured), openlegion start detects this and offers three paths:
  1. Quick setup here — pick a provider, paste your API key (validated), choose a model, then optionally create your first agent or apply a team template
  2. Open the dashboard — configure everything via the web UI at http://localhost:8420/
  3. Skip — start the runtime and use /addkey later in the REPL
After setup, it launches the mesh host on port 8420, spins up agent containers, and drops you into the interactive REPL. Start chatting with your agents immediately.Team Templates (offered during first-run setup):
Once the engine is running, open http://localhost:8420/ for the web dashboard (four top-nav tabs: Chat / Work / Team / Settings).

Common operations

Inside the REPL, /add hot-adds a new agent to the running fleet, /edit modifies one, and /remove removes one. See the CLI Reference for the full REPL command surface.

Connect a channel

Channels auto-start when their token resolves — there is no separate enable flag. Add the credential to .env (or use /addkey inside the REPL):
On the next openlegion start, the channel prints a pairing code; send /start <code> from your account to the bot to link it as the owner.
WhatsApp in production must set WHATSAPP_APP_SECRET for HMAC webhook signature verification. Without it (when MESH_AUTH_TOKEN is also set), the channel startup raises a RuntimeError. Also strongly recommended: set OPENLEGION_SYSTEM_WHATSAPP_VERIFY_TOKEN so the verify token stays stable across restarts.
Webhooks are created from the engine dashboard (System tab → Integrations); there is no openlegion webhooks command. Each hook is reachable at POST /webhook/hook/<hook_id> with an optional HMAC-SHA256 signature; bodies are capped at 1 MB and truncated to 3000 chars when dispatched to agents.

Next steps

Architecture

Understand how agents, the mesh host, and trust zones work together.

CLI Reference

All CLI commands and interactive REPL commands.

Configuration

Customize agents, permissions, models, and budgets.

Coordination

How agents collaborate: blackboard, pub/sub, handoffs, lanes.