What is AutoGen?
什么是 AutoGen?
AutoGenとは?
AutoGen is an open-source programming framework for building AI agents and facilitating cooperation among multiple agents to solve tasks. It simplifies the orchestration, optimization, and automation of LLM workflows.
AutoGen 是一个开源编程框架,用于构建 AI 智能体并促进多智能体之间的协作以解决任务。它简化了 LLM 工作流的编排、优化和自动化。
AutoGenは、AIエージェントを構築し、タスクを解決するための複数エージェント間の協力を促進するためのオープンソースプログラミングフレームワークです。LLMワークフローのオーケストレーション、最適化、自動化を簡素化します。
Core Concepts
核心概念
コアコンセプト
ConversableAgent
The base class for all agents. It can communicate with other agents and perform actions based on messages.
所有智能体的基类。它可以与其他智能体通信并根据消息执行操作。
すべてのエージェントの基本クラス。他のエージェントと通信し、メッセージに基づいてアクションを実行できます。
UserProxyAgent
A proxy for the human user. It can execute code locally and solicit human input when necessary.
人类用户的代理。它可以在本地执行代码,并在必要时征求人类输入。
人間のユーザーのプロキシ。ローカルでコードを実行し、必要に応じて人間の入力を求めることができます。
AssistantAgent
An AI assistant agent powered by an LLM (e.g., GPT-4). It can write code, analyze data, and suggest plans.
由 LLM (如 GPT-4) 驱动的 AI 助手智能体。它可以编写代码、分析数据并提出计划。
LLM(例:GPT-4)を搭載したAIアシスタントエージェント。コードの記述、データの分析、計画の提案が可能です。
GroupChat
A manager that orchestrates conversations between more than two agents, handling speaker selection and context.
一个编排两个以上智能体之间对话的管理器,处理发言人选择和上下文。
2つ以上のエージェント間の会話を調整し、話者の選択とコンテキストを処理するマネージャー。
Example: Code Execution
示例:代码执行
例:コード実行
The following example demonstrates how a UserProxyAgent and an AssistantAgent collaborate to plot a stock price chart. The Assistant writes the code, and the UserProxy executes it.
以下示例演示了 UserProxyAgent 和 AssistantAgent 如何协作绘制股票价格图表。助手编写代码,UserProxy 执行代码。
次の例は、UserProxyAgentとAssistantAgentが協力して株価チャートをプロットする方法を示しています。アシスタントがコードを記述し、UserProxyがそれを実行します。
from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
# Load LLM config
config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
# Create the assistant agent
assistant = AssistantAgent(
name="assistant",
llm_config={"config_list": config_list}
)
# Create the user proxy agent
user_proxy = UserProxyAgent(
name="user_proxy",
code_execution_config={"work_dir": "coding"},
human_input_mode="NEVER"
)
# Start the conversation
user_proxy.initiate_chat(
assistant,
message="Plot a chart of NVDA and TESLA stock price change YTD."
)
2026: The New Microsoft Agent Framework
2026: 新的微软智能体框架
2026年: 新しいMicrosoftエージェントフレームワーク
Strategic Shift: As of late 2025, Microsoft has begun unifying AutoGen and Semantic Kernel into a single, enterprise-grade "Microsoft Agent Framework".
战略转变: 截至 2025 年底,微软已开始将 AutoGen 和 Semantic Kernel 统一为一个单一的、企业级的 "Microsoft Agent Framework"。
戦略的シフト: 2025年末の時点で、MicrosoftはAutoGenとSemantic Kernelを単一のエンタープライズグレードの「Microsoft Agent Framework」に統合し始めました。
While AutoGen 0.4 introduced better event-driven architecture, the new unified framework aims to combine Semantic Kernel's enterprise connectors with AutoGen's orchestration capabilities.
虽然 AutoGen 0.4 引入了更好的事件驱动架构,但新的统一框架旨在将 Semantic Kernel 的企业连接器与 AutoGen 的编排能力相结合。
AutoGen 0.4ではより優れたイベント駆動型アーキテクチャが導入されましたが、新しい統合フレームワークは、Semantic KernelのエンタープライズコネクタとAutoGenのオーケストレーション機能を組み合わせることを目指しています。