Scripts2026年3月30日·1 分钟阅读

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.

TO
TokRepo精选 · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

pip install autogen-agentchat autogen-ext
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient

model = OpenAIChatCompletionClient(model="gpt-4o")
agent = AssistantAgent("assistant", model_client=model)

async def main():
    response = await agent.run(task="What is the capital of France?")
    print(response.messages[-1].content)

介绍

AutoGen is Microsoft's open-source framework for building multi-agent conversational AI. Agents can chat with each other, use tools, execute code, and get human feedback — collaborating to solve complex tasks that single agents can't handle alone. Supports customizable conversation patterns, nested chats, and teachable agents. 56,000+ GitHub stars, the most popular multi-agent framework.

Best for: Building multi-agent systems where agents collaborate through conversation Works with: OpenAI, Anthropic, local models, Azure OpenAI


Core Concepts

Conversable Agents

Every agent can send and receive messages, forming conversations:

assistant = AssistantAgent("coder", model_client=model)
reviewer = AssistantAgent("reviewer", model_client=model,
    system_message="Review code for bugs and suggest improvements.")

Multi-Agent Teams

Agents work together in teams with defined conversation patterns:

from autogen_agentchat.teams import RoundRobinGroupChat
team = RoundRobinGroupChat([coder, reviewer, tester])
result = await team.run(task="Build a REST API for todos")

Code Execution

Agents can write and execute code in sandboxed environments.

Human-in-the-Loop

Insert human approval at any point in the agent conversation.

AutoGen Studio

Visual UI for building and testing multi-agent workflows without code.


FAQ

Q: What is AutoGen? A: Microsoft's open-source multi-agent conversation framework. Agents collaborate through chat to solve complex tasks with tool use, code execution, and human feedback. 56K+ GitHub stars.

Q: How is AutoGen different from CrewAI? A: AutoGen focuses on conversational patterns between agents (chat-based collaboration), while CrewAI uses role-based task delegation. AutoGen also includes code execution and AutoGen Studio for visual building.


🙏

来源与感谢

Created by Microsoft. Licensed under MIT. microsoft/autogen — 56,000+ GitHub stars

相关资产