Skip to content
AuPy

Microsoft AutoGen (Python)

Python pages for Microsoft AutoGen 0.7 (autogen-agentchat / autogen-core), which is archived: AgentChat and Core reference, advanced multi-agent patterns and observability.

Install (Microsoft AutoGen)

Terminal window
pip install "autogen-agentchat" "autogen-ext[openai]"

Version

autogen-agentchat v0.7.5 (with matching autogen-core / autogen-ext) · checked 2026-11-19 · Python 3.10+ · archived

Microsoft AutoGen (autogen-agentchat / autogen-core)

Section titled “Microsoft AutoGen (autogen-agentchat / autogen-core)”
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main() -> None:
model_client = OpenAIChatCompletionClient(model="gpt-5-mini") # 0.7.5 only knows models released before it
agent = AssistantAgent("assistant", model_client=model_client)
result = await agent.run(task="What is 2 + 2?")
print(result.messages[-1].content)
await model_client.close()
asyncio.run(main())

Because AutoGen is archived, plan a move to Microsoft Agent Framework or AG2 1.x. The migration guide (path C) maps the main concepts.


DateVersionChanges
2026-10-25autogen-agentchat 0.7.5Every Python example re-run against 0.7.5 with scripted replies; new replay-testing and publish/subscribe examples on the reference page.
2026-10-21autogen-agentchat 0.7.5AG2 Classic pages (comprehensive guide, recipes, production, diagrams, migration) moved to /ag2-guide/classic/; this section now covers Microsoft AutoGen only.
2026-10-21autogen-agentchat 0.7.5Section split into Microsoft AutoGen pages (new AgentChat & Core reference; advanced and observability pages rewritten) and labelled AG2 Classic pages. Corrected the claim that Microsoft AutoGen was rebranded as AG2, and the non-existent “autogen-agentchat 0.11.5” version. Archived status added.
2026-09-08ag2 0.13.3Consistency sweep; removed a duplicate page.
2026-04-21AG2Index redesigned with Zero → Hero grid.