Method 1: From Python.org (Recommended)
- Visit python.org/downloads
- Download Python 3.11+ for Windows
- Run installer and IMPORTANT: Check "Add Python to PATH"
- Verify installation: Open new terminal and run
python --version
Method 2: Using Chocolatey
# Install Chocolatey first if you don't have it
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install Python
choco install python --version=3.11.0Method 3: Using Windows Package Manager
winget install Python.Python.3.11After Python is installed, install Poetry:
# Method 1: Official installer (Recommended)
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
# Method 2: Using pip
pip install poetry
# Method 3: Using pipx (if you have it)
pipx install poetryAdd Poetry to PATH:
- Add
%APPDATA%\Python\Scriptsto your PATH environment variable - Or restart your terminal/VS Code
# Check Python version (should be 3.11+)
python --version
# Check Poetry
poetry --version# Set Poetry to use Python 3.11
poetry env use python3.11
# Or if you have a specific Python path
poetry env use C:\Python311\python.exe# Install all project dependencies
poetry install# Copy example config
copy aiopslab\config.yml.example aiopslab\config.yml# For OpenAI API (if you want to use AI features)
$env:OPENAI_API_KEY = "your-openai-api-key-here"
# Make it permanent (optional)
[System.Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "your-key-here", "User")# Activate the virtual environment
poetry shell
# Run the CLI
poetry run python cli.py- Press
Ctrl+Shift+P - Type "Tasks: Run Task"
- Select "Run AIOpsLab CLI"
- Press
F5to start debugging - Choose "Python: AIOpsLab CLI"
Once the CLI is running, you can use these commands:
# Start a problem
start <problem_id>
# List available problems
# (The problems are defined in aiopslab/orchestrator/problems/registry.py)
# Exit the application
exit
# Run all tests
poetry run python -m pytest tests/ -v
# Or use VS Code task
# Ctrl+Shift+P → Tasks: Run Task → Run Tests# Format code
poetry run black .
# Type checking
poetry run pyright- Ensure Python 3.11+ is installed and in PATH
- Try
python --versionandpy --version - Restart your terminal/VS Code after installation
- Ensure Poetry is installed and in PATH
- Try
poetry --version - Add
%APPDATA%\Python\Scriptsto PATH
# Clear cache and reinstall
poetry cache clear --all pypi
poetry install --no-cache# Remove and recreate environment
poetry env remove python
poetry env use python3.11
poetry installAIOpsLab is a framework for:
- Testing AIOps agents in simulated environments
- Fault injection in microservices
- Workload generation for testing
- Telemetry collection and analysis
- Kubernetes orchestration for cloud environments
The CLI provides an interactive interface to:
- Start problem scenarios
- Interact with simulated environments
- Test AI agents for operations tasks
- Evaluate agent performance
- Start with local setup (no Azure needed)
- Use kind for Kubernetes (local cluster)
- Set qualitative_eval: false in config (no LLM calls)
- Explore the problems in
aiopslab/orchestrator/problems/ - Check the tutorial in
TutorialSetup.mdfor Kubernetes setup
Remember: You can run AIOpsLab completely locally without any cloud resources!