AGILE is a multi-agent experimental framework designed for running and orchestrating multiple autonomous agents within a controlled Kubernetes cluster inside a Docker sandbox.
AGILE provides a systemized environment for deploying and managing multiple autonomous agents. The framework isolates agent execution within a Docker-based sandbox that contains a Kubernetes (kind) cluster, enabling comprehensive multi-agent experimentation while maintaining safety and control.
The AGILE system consists of:
- Sandbox Container: Ubuntu-based Docker container with privileged execution
- Kubernetes Cluster: kind (Kubernetes in Docker) cluster running inside the sandbox
- Message Bus: Redis for inter-agent communication
- LLM Service: Ollama running qwen2.5 0.5B model
- Five Specialized Agents: Planner, Executor, Analyzer, Researcher, and Monitor agents
- Role: Task planning and coordination
- Function: Analyzes requests and creates step-by-step execution plans, delegates tasks to other agents
- LLM Usage: Generates structured execution plans
- Role: Command execution
- Function: Executes shell commands within the sandbox environment
- Privilege Level: Sandbox-restricted (cannot access host OS)
- LLM Usage: Converts natural language requests to shell commands
- Role: Data analysis and log processing
- Function: Analyzes logs, outputs, and data for patterns, errors, and insights
- LLM Usage: Provides detailed analysis and summaries
- Role: Information gathering
- Function: Researches topics and provides comprehensive information
- LLM Usage: Generates informative responses on various topics
- Caching: Maintains knowledge base for cached queries
- Role: System health monitoring
- Function: Monitors system metrics, agent status, and logs
- LLM Usage: Provides health assessments and alerts
- System Access: Uses psutil for system metrics (CPU, memory, disk)
- Docker
- Docker Compose
cd sandbox
docker-compose up -dThis will build and start the sandbox container.
docker exec -it agile-sandbox /bin/bashOnce inside the sandbox, run:
cd /home/sandbox
chmod +x setup-agents.sh
./setup-agents.shThis script will:
- Create a kind Kubernetes cluster
- Deploy Redis message bus
- Deploy Ollama with qwen2.5 0.5B model
- Deploy all five agents
- Wait for services to be ready
After setup, test the system:
python3 test-agents.pyThis will test:
- Redis connectivity
- Ollama connectivity
- All five agent functions
kubectl logs -f deployment/planner-agent
kubectl logs -f deployment/executor-agent
kubectl logs -f deployment/analyzer-agent
kubectl logs -f deployment/researcher-agent
kubectl logs -f deployment/monitor-agentkubectl get pods
kubectl get servicesThe system is designed with multiple layers of isolation:
- Host OS: Protected by Docker container boundaries
- Sandbox Container: Privileged only within itself, not on host
- Kubernetes Cluster: Isolated within the sandbox
- Agent Pods: Each agent runs in its own pod with resource limits
- Command Privileges: Executor agent commands are restricted to the sandbox environment
AGILE/
├── sandbox/
│ ├── Dockerfile
│ ├── docker-compose.yml
│ ├── setup-agents.sh
│ └── test-agents.py
├── kubernetes/
│ ├── redis.yaml
│ ├── ollama.yaml
│ ├── planner-agent.yaml
│ ├── executor-agent.yaml
│ ├── analyzer-agent.yaml
│ ├── researcher-agent.yaml
│ └── monitor-agent.yaml
├── agents/
│ ├── shared/
│ │ ├── __init__.py
│ │ └── base_agent.py
│ ├── planner_agent.py
│ ├── executor_agent.py
│ ├── analyzer_agent.py
│ ├── researcher_agent.py
│ ├── monitor_agent.py
│ └── requirements.txt
└── README.md
- Container Runtime: Docker
- Orchestration: Kubernetes (kind)
- LLM: Ollama with qwen2.5 0.5B model
- Message Bus: Redis
- Language: Python 3.11
- Base OS: Ubuntu 24.04