Prerequisites
Before getting started with AutoGen, ensure your system meets the following requirements and you have the necessary knowledge foundation.
System Requirements
Python Version
Python 3.10 or later is required for both AutoGen AgentChat and AutoGen Core packages.
Download Options:
Verify Installation:
python --version# Should show Python 3.10.x or higher
Package Manager
pip (Python package installer) - usually comes with Python installation
Verify pip Installation:
pip --version# Should show pip version and Python path
python get-pip.py
Virtual Environment (Recommended)
While optional, we strongly recommend using a virtual environment to isolate AutoGen dependencies from your system packages.
Test Virtual Environment:
# Create virtual environmentpython -m venv autogen_env# Activate (Windows)autogen_env\Scripts\activate# Activate (macOS/Linux)source autogen_env/bin/activate# Your prompt should show (autogen_env) when activated
Docker (Optional)
Required only if you plan to use DockerCommandLineCodeExecutor for secure code execution.
Download Docker:
Verify Docker Installation:
docker --versiondocker run hello-world# Should download and run a test container
API Keys & Model Access
OpenAI API Key
For GPT models (GPT-4o, GPT-4, GPT-3.5-turbo, etc.).
Get Your API Key:
- Visit OpenAI Platform
- Sign up or log in to your account
- Navigate to API Keys section
- Click "Create new secret key"
- Copy and securely store your API key
Verify API Key:
# Set environment variableexport OPENAI_API_KEY="your-api-key-here"# Test with curlcurl -H "Authorization: Bearer $OPENAI_API_KEY" \ https://api.openai.com/v1/models# Should return JSON with available models
Azure OpenAI (Alternative)
If using Azure OpenAI services, you'll need Azure credentials and endpoint information.
Setup Azure OpenAI:
- Visit Azure Portal
- Create an Azure OpenAI Service resource
- Get your endpoint URL and API key from the resource
- Deploy a model (e.g., GPT-4, GPT-3.5-turbo)
Verify Azure OpenAI:
# Set environment variablesexport AZURE_OPENAI_ENDPOINT="your-endpoint"export AZURE_OPENAI_API_KEY="your-api-key"# Test in your AutoGen application setup
Other Model Providers
AutoGen supports various model providers through extensions. Check the Models documentation for full compatibility.
Knowledge Prerequisites
Python Programming
- Basic Python syntax and concepts
- Understanding of async/await patterns
- Familiarity with Python packages and imports
AI/ML Concepts (Helpful)
- Basic understanding of Large Language Models (LLMs)
- Familiarity with AI agent concepts
- Knowledge of prompt engineering principles
Command Line
- Basic command line/terminal usage
- Understanding of environment variables
- Package installation with pip
Complete System Verification
Run these commands to verify your complete setup before proceeding:
Quick Verification Script:
# Check Python versionpython --version# Check pippip --version# Test virtual environment creationpython -m venv test_envrm -rf test_env # Clean up# Check if environment variables are set (optional)echo $OPENAI_API_KEY# Test Docker (if installed)docker --version# All commands should run without errors
Pro Tip:
Save your API keys in a .env file or set them as system environment variables. Never hardcode them in your source code!
Ready to Begin?
Once you have these prerequisites covered, you're ready to set up your AutoGen development environment!
Environment Setup Back to Home