Skip to content
AgPy

AG2 Classic

The AG2 Classic import autogen API (ConversableAgent, GroupChat, initiate_chat), published as autogen and in maintenance mode: what it is, how to install it and which pages cover it.

AG2 Classic is the import autogen API (ConversableAgent, GroupChat, initiate_chat) that AG2 inherited from AutoGen 0.2 and shipped in the ag2 package up to 0.14.0. Since AG2 1.0 (July 2026) it has been maintained separately in ag2ai/ag2-classic and published on PyPI as autogen.

Install

Terminal window
pip install "autogen[openai]"

Version

autogen v0.14.1 · checked 2026-11-19 · Python 3.10+ · maintenance mode

Successor

AG2 1.x (import ag2) for new work.

Classic receives security and critical fixes only. Upstream documentation is at classic.docs.ag2.ai.

from autogen import ConversableAgent, LLMConfig
llm_config = LLMConfig({"api_type": "openai", "model": "gpt-6-luna"}) # reads OPENAI_API_KEY
assistant = ConversableAgent("assistant", system_message="You are a helpful assistant.", llm_config=llm_config)
user = ConversableAgent("user", human_input_mode="NEVER", llm_config=False)
result = user.initiate_chat(assistant, message="What is 2 + 2?", max_turns=1)
print(result.summary)

DateVersionChanges
2026-10-21autogen 0.14.1Section created. The Classic pages moved here from /autogen-guide/python/, so that the AutoGen guide covers only Microsoft AutoGen.