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
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 environment
python -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 --version
docker 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:
  1. Visit OpenAI Platform
  2. Sign up or log in to your account
  3. Navigate to API Keys section
  4. Click "Create new secret key"
  5. Copy and securely store your API key
Verify API Key:
# Set environment variable
export OPENAI_API_KEY="your-api-key-here"

# Test with curl
curl -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:
  1. Visit Azure Portal
  2. Create an Azure OpenAI Service resource
  3. Get your endpoint URL and API key from the resource
  4. Deploy a model (e.g., GPT-4, GPT-3.5-turbo)
Verify Azure OpenAI:
# Set environment variables
export 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 version
python --version

# Check pip
pip --version

# Test virtual environment creation
python -m venv test_env
rm -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