Install
pip install ag2AG2 is the community fork of AutoGen. Same multi-agent DNA, plus a new event-driven architecture (autogen.beta), A2A protocol support, and a first-class CLI.
Install
pip install ag2Version
v0.12.2 · May 2026 · Python 3.10+
Best for
Research-grade multi-agent systems, GroupChat, event-driven conversations.
autogen.beta — new event-driven architecture for complex conversations.from autogen import ConversableAgent, LLMConfig
# Option A — inline configllm_config = LLMConfig({"api_type": "openai", "model": "gpt-4o"})
# Option B — load from OAI_CONFIG_LIST env var or file# llm_config = LLMConfig.from_json(env="OAI_CONFIG_LIST")# llm_config = LLMConfig.from_json(path="OAI_CONFIG_LIST.json")
agent = ConversableAgent( name="assistant", llm_config=llm_config, system_message="You are a helpful assistant.",)
reply = agent.generate_reply( messages=[{"role": "user", "content": "Hello!"}])print(reply)
config_list_from_jsonis not re-exported at the top ofautogenin v0.11+. UseLLMConfig/LLMConfig.from_json(preferred) or the deep pathfrom autogen.llm_config.config import config_list_from_json.
Ready? Start Zero → Hero Step 1 →
| Date | Version | Changes | Reviewer |
|---|---|---|---|
| 2026-05-01 | 0.12.2 | Version bumped 0.12.1 → 0.12.2; comprehensive guide header updated; revision history entry added. autogen.ConversableAgent import verified against installed 0.12.2 (.routine-envs/check-ag2-0501). | Claude routine |
| 2026-04-25 | 0.12.1 | Version bumped 0.12.0 → 0.12.1; comprehensive guide header updated; revision history entry added. Snippets verified against installed 0.12.1. | Claude routine |
| 2026-04-21 | 0.11.5 | Index redesigned with Zero → Hero + Jump-to-topic grid. | — |
| April 5, 2026 | 0.11.5 | event-driven architecture; A2A; CLI; QuickResearchTool. | — |
| November 2025 | 0.3.2 | Initial AG2 rebrand after AutoGen → AG2 community continuation. | — |