AutoGen is Microsoft Research's framework for building multi-agent AI systems through conversation. Agents talk to each other, pass code back and forth, execute it, and iterate until the goal is achieved. It pioneered many patterns now standard across the field — and it remains widely used, well-documented, and relevant for specific use cases today.
As of 2025, AutoGen is being merged into Microsoft's Agent Framework (AG2). No new features are being added to AutoGen. Bug fixes only. If you are starting a new project, consider AG2 or another actively developed framework. If you have existing AutoGen code, it continues to work and the migration path to AG2 is documented at microsoft.github.io/autogen. This guide covers AutoGen as it stands — it remains useful for understanding the conversational multi-agent pattern it pioneered.
Every other major framework — LangChain, CrewAI, LlamaIndex — structures agents around tool calls and task assignments. AutoGen takes a different approach: agents communicate by sending messages to each other in a conversation, just as humans on a team would.
An AutoGen system is a group chat. Each agent is a participant. The conversation has a topic (the goal). Agents take turns speaking — proposing solutions, writing code, reviewing each other's work, requesting clarification, running tests. The conversation continues until the task is complete or someone signals it is done.
This conversational model turns out to be surprisingly powerful for tasks that involve iterative refinement: a coder agent writes code, an executor agent runs it, the coder reads the output and fixes errors, the executor runs it again. The back-and-forth between agents mirrors exactly how human developers actually work.
AssistantAgent — powered by an LLM. Receives messages, reasons about them, writes responses. Can write code, propose solutions, answer questions, or direct the conversation. Does not execute code itself.
UserProxyAgent — acts on behalf of a human (or autonomously). Executes code that the AssistantAgent writes. Can ask the human to intervene at any point. Can be set to fully autonomous (no human intervention) or to pause before executing each piece of code.
The most common pattern: one AssistantAgent that writes code, one UserProxyAgent that executes it and returns the output. The two agents exchange messages until the task is complete.
AutoGen's conversational pattern shines in three scenarios:
New project decision: AutoGen is in maintenance mode. For new projects, evaluate CrewAI (easier, actively developed) or LangGraph (more powerful, actively developed) first. AutoGen's value today is primarily for existing codebases and for understanding the conversational multi-agent pattern it established.
A basic AutoGen workflow has three components: two or more agents, a task description, and a trigger that starts the conversation. The UserProxyAgent initiates by sending the task to the AssistantAgent. The AssistantAgent responds — typically with a plan and some code. The UserProxyAgent executes the code and returns the result. The AssistantAgent reads the result, identifies any issues, and responds with corrected code or a follow-up step. This continues until one agent signals completion using a termination keyword (commonly "TERMINATE").
The code execution in UserProxyAgent runs in a local Docker container by default, providing sandboxing. The agent can be configured to run code directly in the local environment (faster but less safe) or not at all (for workflows that do not involve code).
AutoGen's core abstraction is the ConversableAgent base class. Every agent in AutoGen is a subclass of ConversableAgent, which provides: a send method (to send messages to another agent), a receive method (to process incoming messages and generate a reply), a message history (stored as a list of role/content pairs), and configurable reply functions that determine how the agent responds to any given message.
The reply function chain is the key architectural mechanism. When an agent receives a message, it passes it through a registered list of reply functions in order, stopping at the first one that produces a non-None response. The default chain includes: a termination check (does the message contain the TERMINATE keyword?), a tool execution check (does the message contain a tool call result?), and an LLM response generation. Developers can insert custom reply functions anywhere in this chain — enabling fine-grained control over agent behaviour without subclassing.
For systems with more than two agents, AutoGen provides the GroupChat class and its manager, GroupChatManager. The GroupChatManager is itself an LLM-backed agent whose job is to select which agent speaks next. It receives the conversation history and generates the name of the next speaker based on the context — effectively implementing dynamic routing without explicit conditional edges.
Speaker selection can also be configured as: round-robin (each agent speaks in turn), random, or custom (a developer-provided function determines the next speaker). The LLM-based selection is the most flexible but most expensive option; round-robin is the most predictable for structured workflows.
AutoGen's UserProxyAgent can execute code in three modes, configured via the code_execution_config parameter:
AutoGen's influence extends well beyond its current usage. Three patterns it established are now standard across agentic AI:
Microsoft announced the consolidation of AutoGen into its Agent Framework (referred to as AG2 in community discussions) in 2025. The key changes in AG2: a unified agent base class compatible with MCP, improved async support, native integration with Azure AI services, and a cleaner separation between the agent runtime and the agent logic. The migration guide and AG2 documentation are maintained at microsoft.github.io/autogen.
For teams with significant investment in AutoGen, the migration path is well-documented and the two APIs are deliberately similar. For teams starting fresh, AG2 or an alternative framework is the recommended starting point.
Source note: All technical specifications are drawn from the official AutoGen documentation and the original AutoGen research paper (arXiv:2308.08155). Maintenance mode status is documented at the official GitHub repository. Verified April 2026.