ag2-overview
Installation
SKILL.md
AG2 Beta — capability map
AG2 beta (autogen.beta) is an async, protocol-driven agent framework. The full reference docs live under website/docs/beta/. This skill is the index of sibling skills that cover the common build paths.
When to use
Read this file first when a request mentions "AG2 beta", "autogen.beta", or building agents in this repo and you don't yet know which feature is needed. Use the table below to pick the right specialised skill, then load that skill's SKILL.md for the recipe.
Before you start
Anything you build with AG2 needs three things in place. Get these right once and the rest of the skills run cleanly:
- Install the right provider extra —
pip install "ag2[openai]",ag2[anthropic],ag2[gemini], etc. The*Configclass will raiseImportError: ... requires optional dependencieswithout it. Run the install before delivering code. If you cannot run commands, state the exactpip installcommand. This is a required step. - Set the matching API key —
OPENAI_API_KEY,ANTHROPIC_API_KEY,GEMINI_API_KEY(orGOOGLE_API_KEY). Loading from a project-root.envviafrom dotenv import load_dotenv; load_dotenv()is the common pattern. - Sanity-check the install —
python -c "import sys, autogen; print(sys.executable, autogen.__version__)". If you have multiple Python environments, this confirms whichag2your script will actually import.
Full per-provider table (install + env var + config class) lives in ag2-quickstart → "Prerequisites".