Registry / llm-agents / autogen-agentchat

autogen-agentchat

JSON →
library0.7.5pypypi✓ verified 26d ago

Microsoft's framework for building multi-agent AI applications. As of v0.4+, AutoGen is a layered system: autogen-core (event-driven actor runtime), autogen-agentchat (high-level conversational agents), and autogen-ext (extensions for OpenAI, Azure, MCP, etc.). Completely async. The 0.2 API is a separate, deprecated architecture. NOT the same as AG2.

pip install -U "autogen-agentchat" "autogen-ext[openai]"
INSTALL
IMPORT
SIG · AUTOGEN-AGENTCHAT
A
autogen-agentchat
llm-agentspythonv0.7.5
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
16/18 runs
16/18 runs
py 3.11
10/18 runs
16/18 runs
py 3.12
16/18 runs
16/18 runs
py 3.13
10/18 runs
16/18 runs
py 3.9
12/18 runs
12/18 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AssistantAgent (v0.4+)
from autogen_agentchat.agents import AssistantAgent from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen.agentchat import AssistantAgent from autogen.oai import OpenAIWrapper
The v0.2 import paths (autogen.agentchat, autogen.oai) are completely different from v0.4+. Mixing them causes immediate ImportError or silent wrong behavior.
RoutedAgent (Core API)
from autogen_core import RoutedAgent, message_handler
from autogen_core.components import RoutedAgent
RoutedAgent is in autogen_core directly, not autogen_core.components. LLM-generated code frequently gets this wrong.

Single AssistantAgent with OpenAI — v0.4+ API

import asyncio from autogen_agentchat.agents import AssistantAgent from autogen_ext.models.openai import OpenAIChatCompletionClient async def main() -> None: model_client = OpenAIChatCompletionClient(model='gpt-4o') agent = AssistantAgent('assistant', model_client=model_client) result = await agent.run(task='Say Hello World!') print(result) await model_client.close() asyncio.run(main())
Debug
Known issues
breakingAutoGen v0.4+ is a complete ground-up rewrite with a fully incompatible API from v0.2. All v0.2 imports (from autogen.agentchat, autogen.oai, AssistantAgent with llm_config dict, UserProxyAgent) are broken in v0.4.
fix
Follow the official migration guide: https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/migration-guide.html
affects: >=0.4.0
breakingAll v0.4+ AutoGen APIs are fully async. Calling agent.run() without await in an async context, or calling it in a sync context without asyncio.run(), will fail or produce no output.
fix
Always use asyncio.run(main()) at the entry point. Use await for all agent calls.
affects: >=0.4.0
breakingOpenAIChatCompletionClient is in autogen-ext, not autogen-agentchat. pip install autogen-agentchat alone is insufficient — model clients require autogen-ext[openai] or the relevant provider extra.
fix
pip install 'autogen-ext[openai]' for OpenAI/OpenAI-compatible models. Use 'autogen-ext[azure]' for Azure OpenAI, 'autogen-ext[anthropic]' for Claude.
affects: >=0.4.0
breakingpyautogen on PyPI is no longer maintained by Microsoft as of v0.2.34+. Control of that package was lost to an AG2-affiliated fork. Do not use pyautogen for Microsoft AutoGen.
fix
Install via autogen-agentchat (for v0.4+) or autogen-agentchat~=0.2 (for legacy v0.2). Never use pyautogen.
affects: all
gotchaAG2 (pip install ag2 or pip install autogen) is a community fork of AutoGen 0.2, NOT Microsoft's AutoGen 0.4. The autogen PyPI package is currently controlled by the AG2 project. Code written for AG2 and code written for Microsoft AutoGen 0.4 are NOT compatible.
fix
For Microsoft AutoGen 0.4+, install autogen-agentchat and autogen-ext. For AG2/legacy API, install ag2 or pin autogen-agentchat~=0.2.
affects: all
gotchaLLM-generated AutoGen code is highly unreliable. Most AI assistants (as of early 2026) mix v0.2 and v0.4 imports, use wrong module paths (autogen_core.components vs autogen_core), or use synchronous patterns on async-only APIs.
fix
Always verify against the official docs at https://microsoft.github.io/autogen/stable/
affects: >=0.4.0
gotchamodel_client.close() must be explicitly called after use to avoid resource leaks. The client does not auto-close.
fix
Use try/finally or async context managers: async with OpenAIChatCompletionClient(...) as client: ...
affects: >=0.4.0
breakingInstalling certain dependencies (e.g., numpy, which is a dependency of tiktoken used by autogen-ext[openai]) in minimal Linux environments like Alpine requires build tools. Without them, package installation will fail due to missing compilers.
fix
Ensure that necessary build tools are installed in your environment. For Alpine Linux, this typically means running `apk add build-base` before installing Python packages. Example Dockerfile: `FROM python:3.13-alpine
RUN apk add build-base
RUN pip install autogen-agentchat 'autogen-ext[openai]'`
affects: all
Upgrade
Version history
0.7.5latest on PyPI · released Sep 30, 2025
Audit
Dependencies
autogen-ext[openai]requiredOpenAIChatCompletionClient lives in autogen-ext, not autogen-agentchat. Required for any OpenAI or OpenAI-compatible model use.
Python >=3.10requiredHard requirement across all autogen packages.
Agent activity
103 hits · last 30 days
node
94
Meta
1
OpenAI (training)
1
Resources
autogen-agentchat — pip install autogen-agentchat · libregistry