AutoGen — Microsoft Multi-Agent Conversation Framework
Framework by Microsoft Research for building multi-agent conversational AI systems. Agents chat with each other to solve tasks collaboratively. Supports human-in-the-loop and code execution. 40,000+ stars.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install dd1827b4-2401-4ecc-a1b4-a3cc813e06f5 --target codex先 dry-run,确认写入项后再运行此命令。
What it is
AutoGen is an open-source framework by Microsoft Research for building multi-agent conversational AI systems. Multiple agents chat with each other, divide work, execute code, and collaborate to solve complex tasks. It supports human-in-the-loop interaction where a human can join the conversation at any point.
AutoGen targets AI researchers and developers building systems where specialized agents (coder, reviewer, planner) work together through structured conversation.
How it saves time or tokens
AutoGen's multi-agent architecture distributes work across specialized agents, so each agent handles a focused subtask. This reduces the context each agent needs, lowering per-agent token consumption. The framework manages conversation flow, retries, and termination conditions automatically. Estimated token usage for this workflow is around 2,800 tokens.
How to use
- Install AutoGen:
pip install autogen-agentchat autogen-ext
- Create agents and a team:
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_ext.models.openai import OpenAIChatCompletionClient
model = OpenAIChatCompletionClient(model='gpt-4o')
coder = AssistantAgent('coder', model_client=model)
reviewer = AssistantAgent('reviewer', model_client=model)
team = RoundRobinGroupChat([coder, reviewer])
- Run the team with a task and agents collaborate through conversation rounds.
Example
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_ext.models.openai import OpenAIChatCompletionClient
model = OpenAIChatCompletionClient(model='gpt-4o')
coder = AssistantAgent('coder', model_client=model)
reviewer = AssistantAgent('reviewer', model_client=model)
team = RoundRobinGroupChat([coder, reviewer])
result = team.run(task='Write a Python function to merge two sorted lists')
print(result)
Related on TokRepo
- Multi-Agent Frameworks — AutoGen deep-dive and comparisons
- AI Tools for Agents — Browse agent frameworks and toolkits
Key considerations
When evaluating AutoGen for your workflow, consider the following factors. First, assess whether your team has the technical prerequisites to adopt this tool effectively. Second, evaluate the maintenance burden against the productivity gains. Third, check community activity and documentation quality to ensure long-term viability. Integration with your existing toolchain matters more than feature count alone. Start with a small pilot project before rolling out across the organization. Monitor resource usage during the initial adoption phase to identify bottlenecks early. Document your configuration decisions so team members can onboard independently.
Common pitfalls
- Agents can enter infinite conversation loops if termination conditions are not properly set; always define max rounds or stop criteria.
- Code execution happens locally by default; use Docker execution for safety when running untrusted code.
- The v0.2 and v0.4 APIs differ significantly; check which version your code targets.
常见问题
AutoGen 0.4 is a major rewrite with a new architecture. It introduces the autogen-agentchat and autogen-ext packages, replacing the monolithic autogen package. The APIs are not backward-compatible.
Yes. AutoGen supports any model through the model client abstraction. Use OpenAIChatCompletionClient for OpenAI-compatible APIs, or implement a custom client for other providers like Anthropic or local models.
You can add a human proxy agent to the conversation. When it is the human agent's turn, the framework pauses and waits for human input. The human can approve, reject, or modify the conversation direction.
Yes. Agents can write and execute Python code during conversation. By default, code runs locally. For safety, you can configure a Docker-based executor that runs code in an isolated container.
There is no hard limit. You can have two agents or dozens. The framework supports round-robin, selector-based, and custom conversation patterns. Performance depends on the number of conversation rounds and model latency.
引用来源 (3)
- AutoGen GitHub— Multi-agent conversational AI framework by Microsoft Research
- AutoGen Documentation— Supports human-in-the-loop and code execution
- AutoGen Tutorial— Multi-agent conversation patterns
来源与感谢
Created by Microsoft Research. Licensed under MIT.
autogen — ⭐ 40,000+
讨论
相关资产
AutoGen — Multi-Agent Conversation Framework
Microsoft framework for building multi-agent conversational AI systems. Agents chat with each other to solve tasks. Supports tool use, code execution, and human feedback. 56K+ stars.
CAMEL — Multi-Agent Framework at Scale
CAMEL is a multi-agent framework for studying scaling laws of AI agents. 16.6K+ GitHub stars. Up to 1M agents, RAG, memory systems, data generation. Apache 2.0.
Microsoft Agent Framework — Build & Run Agent Workflows
Microsoft Agent Framework builds production-grade agents and multi-agent workflows in Python and .NET, with official docs and quickstarts for teams.
Semantic Kernel — Microsoft AI Agent Framework
Semantic Kernel is Microsoft enterprise AI agent framework for Python, .NET, and Java. 27.6K+ GitHub stars. Multi-model, multi-agent, vector DB integration. MIT.