Skip to content

AG2 (formerly AutoGen)

AG2 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

Terminal window
pip install ag2

Version

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.
  • A2A protocol — interop with OpenAI SDK, Claude SDK, LangGraph, Google ADK.
  • AG2 CLI — project scaffolding, run, deploy.
  • QuickResearchTool — built-in research workflow helper.
from autogen import ConversableAgent, LLMConfig
# Option A — inline config
llm_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_json is not re-exported at the top of autogen in v0.11+. Use LLMConfig / LLMConfig.from_json (preferred) or the deep path from autogen.llm_config.config import config_list_from_json.

Ready? Start Zero → Hero Step 1 →


DateVersionChangesReviewer
2026-05-010.12.2Version 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-250.12.1Version 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-210.11.5Index redesigned with Zero → Hero + Jump-to-topic grid.
April 5, 20260.11.5event-driven architecture; A2A; CLI; QuickResearchTool.
November 20250.3.2Initial AG2 rebrand after AutoGen → AG2 community continuation.