Skip to main content

What is OpenLegion?

OpenLegion is an open-source framework for running autonomous AI agent fleets in isolated Docker containers. Every agent gets its own memory, tools, schedule, and budget — coordinated through deterministic YAML workflows with no LLM routing layer. API keys never leave the vault. Agents call through a proxy and never handle credentials directly. Chat with your fleet via Telegram, Discord, or CLI. 495 tests across ~11,000 lines of application code. Fully auditable in a day. No LangChain. No Redis. No Kubernetes. No CEO agent. MIT License.

Quick Start

Install OpenLegion and launch your first agent fleet in under 3 minutes.

Why OpenLegion?

Security by Architecture

Every agent runs in an isolated Docker container (microVM when available). API keys live in a credential vault — agents never see them. Defense-in-depth with 5 security layers.

Deterministic Orchestration

YAML-defined DAG workflows with step dependencies, conditions, retries, and failure handlers. No LLM decides what runs next.

Cost Controls

Per-agent LLM token tracking with enforced daily and monthly budget caps at the vault layer. Agents physically cannot spend what you haven’t authorized.

Self-Improving Agents

Agents learn from tool failures and user corrections, injecting past learnings into future sessions. They write their own Python skills at runtime and hot-reload them.

Multi-Channel

Connect agents to Telegram and Discord. Also accessible via CLI and API.

100+ LLM Providers

Configurable model failover chains cascade across LLM providers with per-model health tracking and exponential cooldown via LiteLLM.

Explore the docs