Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:Microsoft Autogen Extension Optional Dependencies

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Extensions
Last Updated 2026-02-11 18:00 GMT

Overview

Optional dependency extras for the autogen-ext package covering Docker execution, gRPC runtime, Jupyter notebooks, MCP protocol, memory backends, and Semantic Kernel integrations.

Description

The autogen-ext package uses Python's optional dependency extras system (`pip install autogen-ext[extra_name]`) to manage feature-specific dependencies. Each extra maps to a specific integration: code executors (Docker, Jupyter), memory backends (ChromaDB, Redis, Mem0), search tools (Azure AI Search), web browsing (Playwright), and more. All extras use `try/except ImportError` at module initialization to provide clear installation instructions when a dependency is missing.

Usage

Use this environment when you need functionality beyond basic agent conversations. Each extension extra is needed only for its specific feature. Install only the extras you need to minimize dependency footprint. The `try/except ImportError` pattern ensures graceful degradation — importing an unused extension will not error until you actually try to use it.

System Requirements

Category Requirement Notes
Python >= 3.10 Same as autogen-core
Docker Docker Engine running Required for `docker` and `docker-jupyter-executor` extras
Playwright System browsers Required for `web-surfer` and `magentic-one` extras; run `playwright install`
GPU Optional Required for `llama-cpp` with GPU acceleration

Dependencies

Extension Extras

LLM Providers:

  • `[openai]`: `openai` >= 1.93, `tiktoken` >= 0.8.0, `aiofiles`
  • `[anthropic]`: `anthropic` >= 0.48
  • `[gemini]`: `google-genai` >= 1.0.0
  • `[ollama]`: `ollama` >= 0.4.7, `tiktoken` >= 0.8.0
  • `[llama-cpp]`: `llama-cpp-python` >= 0.3.8
  • `[azure]`: `azure-ai-inference` >= 1.0.0b9, `azure-ai-projects` >= 1.0.0b11, `azure-core`, `azure-identity`, `azure-search-documents` >= 11.4.0

Code Execution:

  • `[docker]`: `docker` ~= 7.0, `asyncio_atexit` >= 1.0.1
  • `[jupyter-executor]`: `ipykernel` >= 6.29.5, `nbclient` >= 0.10.2
  • `[docker-jupyter-executor]`: `docker` ~= 7.0, `websockets` >= 15.0.1, `requests` >= 2.32.3, `aiohttp` >= 3.11.16

Memory Backends:

  • `[chromadb]`: `chromadb` >= 1.0.0
  • `[redis]`: `redis` >= 5.2.1
  • `[redisvl]`: `redisvl` >= 0.6.0
  • `[mem0]`: `mem0ai` >= 0.1.98
  • `[mem0-local]`: `mem0ai` >= 0.1.98, `neo4j` >= 5.25.0, `chromadb` >= 1.0.0

Protocols and Runtimes:

  • `[grpc]`: `grpcio` ~= 1.70.0
  • `[mcp]`: `mcp` >= 1.11.0

Agent Capabilities:

  • `[web-surfer]`: `playwright` >= 1.48.0, `pillow` >= 11.0.0, `magika` >= 0.6.1rc2, `markitdown[all]` ~= 0.1.0a3
  • `[magentic-one]`: `playwright` >= 1.48.0, `pillow` >= 11.0.0, `magika` >= 0.6.1rc2, `markitdown[all]` ~= 0.1.0a3
  • `[file-surfer]`: `magika` >= 0.6.1rc2, `markitdown[all]` ~= 0.1.0a3
  • `[video-surfer]`: `opencv-python` >= 4.5, `ffmpeg-python`, `openai-whisper`

Other:

  • `[langchain]`: `langchain_core` ~= 0.3.3
  • `[graphrag]`: `graphrag` >= 2.3.0
  • `[rich]`: `rich` >= 13.9.4
  • `[canvas]`: `unidiff` >= 0.7.5
  • `[http-tool]`: `httpx` >= 0.27.0, `json-schema-to-pydantic` >= 0.2.0
  • `[diskcache]`: `diskcache` >= 5.6.3

Credentials

No additional credentials beyond provider-specific API keys (see Environment:Microsoft_Autogen_LLM_Provider_API_Keys).

Quick Install

# Install specific extras
pip install "autogen-ext[openai]"
pip install "autogen-ext[docker]"
pip install "autogen-ext[grpc]"

# Install multiple extras
pip install "autogen-ext[openai,docker,mcp,chromadb]"

# Install for web browsing agents
pip install "autogen-ext[magentic-one]"
playwright install

# Install for Jupyter code execution
pip install "autogen-ext[jupyter-executor]"

Code Evidence

ImportError pattern from `autogen_ext/runtimes/grpc/__init__.py:5-10`:

try:
    import grpc  # type: ignore
except ImportError as e:
    raise ImportError(
        "To use the GRPC runtime the grpc extra must be installed. "
        "Run `pip install autogen-ext[grpc]`"
    ) from e

Docker ImportError from `autogen_ext/code_executors/docker/_docker_code_executor.py:43-51`:

try:
    import docker
except ImportError:
    raise ImportError(
        "Missing dependecies for DockerCommandLineCodeExecutor. "
        "Please ensure the autogen-ext package was installed with the 'docker' extra."
    )

ChromaDB ImportError from `autogen_ext/memory/chromadb/_chromadb.py:27-32`:

try:
    import chromadb
except ImportError:
    raise ImportError(
        "To use the ChromaDBVectorMemory the chromadb extra must be installed. "
        "Run `pip install autogen-ext[chromadb]`"
    )

Common Errors

Error Message Cause Solution
`ImportError: To use the GRPC runtime the grpc extra must be installed` grpcio not installed `pip install autogen-ext[grpc]`
`ImportError: Missing dependecies for DockerCommandLineCodeExecutor` docker package not installed `pip install autogen-ext[docker]`
`ImportError: To use the ChromaDBVectorMemory the chromadb extra must be installed` chromadb not installed `pip install autogen-ext[chromadb]`
`ImportError: Dependencies for MagenticOneCoderAgent not found` magentic-one extra missing `pip install "autogen-ext[magentic-one]"`
`RuntimeError: Failed to connect to Docker` Docker daemon not running Start Docker Engine/Desktop

Compatibility Notes

  • Docker extras: Require Docker Engine/Desktop installed and running on the host machine.
  • Playwright extras: Require browser installation via `playwright install` after pip install.
  • GPU acceleration: The `llama-cpp` extra supports GPU via `n_gpu_layers` parameter. Docker code executor supports GPU pass-through via `device_requests` parameter.
  • Windows: Some code executors detect `sys.platform == "win32"` for platform-specific behavior.
  • Semantic Kernel: Multiple integration extras available (`semantic-kernel-core`, `semantic-kernel-google`, etc.) all requiring `semantic-kernel` >= 1.17.1.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment