OpenLegion
Autonomous AI agent fleet framework with Docker isolation. Secure multi-agent system where each agent runs in isolated Docker containers for safe autonomous execution.
Autonomous AI Agent Fleet - Docker-Isolated Multi-Agent System
OpenLegion is an autonomous AI agent fleet framework where each agent runs in isolated Docker containers. This architecture provides secure execution environments for multi-agent systems, enabling safe deployment of untrusted code and scalable agent operations. GitHub: https://github.com/openlegion-ai/openlegion Developer: openlegion-ai (Community Open Source) License: MIT Key Innovation: OpenLegion brings production-grade containerization to AI agents, with each agent running in its own isolated Docker container for security, scalability, and resource management.
Core Philosophy: "Autonomous agents need autonomous isolation - security through containers"
Why OpenLegion?
Docker Isolation: Each agent in its own secure container.
Fleet Management: Orchestrate hundreds of agents efficiently.
Secure Execution: Safe to run untrusted agent code.
Production Ready: Built for enterprise deployment.
Key Features
$#1.
Container Isolation
- Per-agent Docker containers
- Network isolation
- Filesystem isolation
- Resource limits
- Security policies
$#2.
Fleet Orchestration
- Agent deployment
- Scaling management
- Load balancing
- Health monitoring
- Auto-recovery
$#3.
Resource Management
- CPU limits
- Memory limits
- Storage quotas
- Network bandwidth
- GPU allocation
$#4.
Security Features
- Container sandboxing
- Network policies
- Secret management
- Access control
- Audit logging
$#5.
Monitoring and Logging
- Centralized logging
- Metrics collection
- Health checks
- Alert system
- Performance tracking
Installation
Prerequisites
# Docker 20.10+
# Docker Compose 2.0+
# Python 3.9+
# 4GB+ RAMDocker Installation
# Clone repository
git clone https://github.com/openlegion-ai/openlegion.git
cd openlegion
# Start fleet
docker-compose up -d
# Check status
docker-compose psKubernetes Installation
# Apply manifests
kubectl apply -f k8s/
# Check deployment
kubectl get pods -l app=openlegion
# Access dashboard
kubectl port-forward svc/openlegion-dashboard 8080:80Manual Installation
# Install Python package
pip install openlegion
# Initialize
openlegion init my-fleet
cd my-fleet
# Start fleet
openlegion startConfiguration
docker-compose.yaml
version: '3.8'
services:
orchestrator:
image: openlegion/orchestrator:latest
ports:
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- OPENLEGION_API_KEY=${API_KEY}
agent-template:
image: openlegion/agent:latest
deploy:
resources:
limits:
cpus: '1.0'
memory: 1Gfleet.yaml
fleet:
name: production-fleet
max_agents: 100
defaults:
cpu_limit: 1.0
memory_limit: 1G
network: isolated
agents:
- name: researcher
count: 5
model: gpt-4o
capabilities:
- web_search
- analysis
- name: writer
count: 3
model: claude-sonnet-4
capabilities:
- writing
- editingUsage
Deploy Agents
# Deploy agent fleet
openlegion deploy fleet.yaml
# Scale agents
openlegion scale researcher --replicas 10
# Check status
openlegion statusAPI Usage
# Submit task
curl -X POST http://localhost:8080/api/tasks \
-H "Content-Type: application/json" \
-d '{"type": "research", "query": "AI trends"}'
# Check task status
curl http://localhost:8080/api/tasks/123
# Get results
curl http://localhost:8080/api/tasks/123/resultsAgent Management
# List agents
openlegion agents list
# Stop agent
openlegion agents stop agent-123
# Restart agent
openlegion agents restart agent-123
# View logs
openlegion agents logs agent-123Pricing
Free: OpenLegion is completely free and open source under MIT license. You only pay for:
- AI model API usage
- Infrastructure (Docker/Kubernetes)
- Cloud hosting if applicable
System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| OS | Linux, macOS, Windows | Linux (Ubuntu 20.04+) |
| Docker | 20.10+ | 24.0+ |
| Memory | 4GB RAM | 16GB+ RAM |
| Storage | 10GB | 50GB SSD |
| CPU | 4 cores | 8+ cores |
Use Cases
Secure Multi-Agent Execution
Run multiple agents securely with container isolation.
Untrusted Code Execution
Safely execute agents with potentially untrusted code.
Scalable Agent Deployment
Scale agent fleets based on demand.
Production AI Systems
Deploy AI agents in production environments.
Multi-Tenant AI
Support multiple tenants with isolated agent environments.
Enterprise Automation
Build enterprise-grade automation with agent fleets.
Community and Support
- GitHub: https://github.com/openlegion-ai/openlegion
- Documentation: https://github.com/openlegion-ai/openlegion#readme
- Issues: GitHub Issues tab
- Discussions: GitHub Discussions tab
Quick Start Guide
Get OpenLegion up and running in about 10 minutes.
Option A: Docker (Recommended)
docker pull openlegion/openlegion:latest
docker run -d --name openlegion openlegion/openlegion:latestOption B: Manual Installation
git clone .git
cd openlegion
pip install -r requirements.txt
python setup.pyStep 3: Configure Your AI Model
Set your preferred AI model and API key in the configuration file.
Step 4: Connect a Platform
Link your messaging platform (Telegram, Discord, etc.) and start sending commands.
Time to first result: ~10 minutes with Docker, ~20 minutes with manual setup.
Full documentation: https://github.com/openlegion-ai/openlegion#readme
FAQ
Is OpenLegion free to use?
Yes, OpenLegion is free and open source (MIT license). You only pay for AI model API costs if using external models.
What are the system requirements for OpenLegion?
OpenLegion requires 4GB RAM of RAM minimum. Runtime: Docker/Python. It runs on Windows, macOS, and Linux.
Can I self-host OpenLegion?
Yes. OpenLegion is open source (MIT) and can be self-hosted on your own hardware. Clone the repository from GitHub and follow the installation guide.
How does OpenLegion compare to OpenClaw?
OpenLegion offers a different approach compared to OpenClaw. While OpenClaw provides the largest ecosystem with 13,729+ skills and maximum flexibility, OpenLegion focuses on multi-agent. Choose OpenLegion if you prioritize its specific features; choose OpenClaw for the broadest compatibility and community support.
Is OpenLegion suitable for beginners?
OpenLegion requires some technical knowledge to set up (Docker/Python). If you are a beginner, consider starting with QClaw (one-click install) or MaxClaw (cloud-based, no setup) first, then graduate to OpenLegion as you gain experience.
License
MIT License - Free for personal and commercial use.
Tags
multi-agent, docker, isolation, autonomous, fleet, security, container, orchestration