AutoGen
Type: full-code · Vendor: Microsoft · Language: Python, .NET · License: MIT (code packages); CC-BY-4.0 (top-level docs) · Status: active · Status in practice: mature · First released: 2023-08-18
Build scalable, event-driven multi-agent AI applications in which conversable agents exchange asynchronous messages, optionally execute code, and coordinate through group chats or actor-style pub/sub.
Description. AutoGen is Microsoft's open-source programming framework for agentic AI. It is layered: AutoGen Core is a low-level event-driven runtime that builds event-driven, distributed, scalable agent systems on the Actor model; AutoGen AgentChat is a higher-level conversational API on Core; AutoGen Studio is a low-code web UI. The v0.4 release (2025-01-10) was a from-the-ground-up rewrite introducing the actor / event-driven foundation; v0.2 (the original ConversableAgent / GroupChatManager design) is still maintained on the 0.2 branch.
Agent loop shape. Multi-agent conversational model. In AgentChat one or more AssistantAgents (LLM + tools) and an optional UserProxyAgent participate in a Team — RoundRobinGroupChat, SelectorGroupChat, Swarm, or MagenticOneGroupChat — that drives speaker turns until a termination condition fires. In Core, agents are independent actors that exchange asynchronous messages and can subscribe to topics for pub/sub routing. Tools are passed to AssistantAgent and executed in the same run() call; code via CodeExecutorAgent (typically Docker).
Primary use cases
- multi-agent conversational systems with role-defined assistants
- code-executing agents in Docker sandboxes
- actor-style distributed agent systems with pub/sub
- Magentic-One style orchestrated worker teams
Key concepts
- AssistantAgent → tool-use (docs) — Built-in agent that uses an LLM and can use tools.
- UserProxyAgent → human-in-the-loop (docs) — Special built-in agent that acts as a proxy for a human user to provide feedback to the team.
- RoundRobinGroupChat / SelectorGroupChat / Swarm / MagenticOneGroupChat → supervisor (docs) — Team topologies — round-robin turns, LLM-selected next speaker, HandoffMessage-based, or Magentic-One orchestrated.
- CodeExecutorAgent → code-execution (docs) — Experimental agent that generates and executes code snippets; Docker recommended for isolation.
- Actor model + topic pub/sub (Core) → event-driven-agent (docs) — Agents are actors; asynchronous messages enable event-driven and request/response communication.
- TerminationCondition → step-budget (docs) — Mandatory stop predicate for Teams; MaxMessageTermination, TextMentionTermination, etc.
Patterns this full-code implements —
- ★Conversational Multi-Agent
ConversableAgent (v0.2) and RoundRobinGroupChat (v0.4+) are the canonical conversational shapes; AutoGen named the pattern in the catalog.
- ★Code-as-Action Agent
CodeExecutorAgent generates and executes code; an alternative is AssistantAgent + PythonCodeExecutionTool.
- ★★Code Execution
DockerCommandLineCodeExecutor is the recommended execution backend; sandboxed by container.
- ★★Event-Driven Agent
Core uses the Actor model; agents communicate via asynchronous messages with pub/sub Topic subscriptions.
- ★Handoff
Swarm topology — agents emit HandoffMessage indicating which other agent to hand off to; speaker selected from the most recent HandoffMessage.
- ★★Orchestrator-Workers
MagenticOneGroupChat is a lead-agent-directs-workers topology; the orchestrator plans tasks, gathers facts, and assigns subtasks to other agents.
- ★★Step Budget
Termination conditions are MANDATORY on Teams. MaxMessageTermination caps messages; TextMentionTermination stops on a sentinel string.
- ★★Structured Output
AssistantAgent's output_content_type accepts a Pydantic BaseModel; replies arrive as StructuredMessage instead of TextMessage.
- ★★Supervisor
SelectorGroupChat uses an LLM to pick the next speaker; Magentic-One orchestrator does high-level planning and tracking.
- ★★Tool Use
AssistantAgent uses tools in the same run() call (v0.4 change from v0.2 where tools were executed by the calling agent).
- ★Composable Termination Conditions
TerminationCondition base + 11 built-in primitives (MaxMessageTermination, TextMentionTermination, TokenUsageTermination, TimeoutTermination, HandoffTermination, etc.) composed with `&` (AND) and `|`…
- ★★Agent Resumption
save_state() / load_state() serialise team/agent state to dicts; no automatic per-step checkpointing — caller invokes save/load.
- ·CAMEL Role-Playing
AutoGen's group-chat selector explicitly uses 'role play game' framing — agents are assigned named roles (assistant, user_proxy) and the system selects which role plays next. Structurally identical t…
- ★Subagent Isolation
Implicit via Actor model in Core — each agent runs inside an agent runtime that manages lifecycles and enforces security boundaries. No first-class context-isolation API specifically named.
Neighbourhood
Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.