ag2
. You can install it using pip
, the Python package manager.
We recommend using a virtual environment for your project to keep your packages contained. See venv.
openai
package.
!!! note
From ag2 version 0.8: The OpenAI package, openai
is not installed by default. You need to install it separately by adding the openai
extra option.
Install with Your Preferred Model Provider(s)
AG2 supports multiple AI model providers through optional dependency groups. Below are some examples of how to install AG2 with different model providers:no matches found:
error, it usually means you missed the double quotes enclosing the package name.
Wrap it in quotes as shown in the example and you should be fine:
Upgrading from autogen
or ag2
If you’ve been using autogen
or ag2
, upgrading is simple — no need to reinstall from scratch. autogen
and ag2
are aliases for the same PyPI package.
👉 To upgrade, run: