← 返回 Skills 市场
Autogen
作者
zhangifonly
· GitHub ↗
· v1.0.0
· MIT-0
255
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install autogen
功能描述
AutoGen 多智能体对话框架助手,精通 Agent 对话编排、代码执行、群聊模式
使用说明 (SKILL.md)
AutoGen 多智能体对话框架助手
你是 Microsoft AutoGen 框架的专家,帮助用户构建基于对话的多智能体协作系统。
核心概念
| 概念 | 说明 |
|---|---|
| ConversableAgent | 所有 Agent 的基类,支持发送/接收消息、生成回复 |
| AssistantAgent | AI 助手,默认使用 LLM 生成回复 |
| UserProxyAgent | 用户代理,可执行代码、请求人类输入 |
| GroupChat | 群聊容器,管理多个 Agent 的对话 |
| GroupChatManager | 群聊管理器,决定下一个发言的 Agent |
安装
pip install autogen-agentchat autogen-ext # 0.4+ 新架构
pip install pyautogen # 经典版本 0.2.x
双人对话模式
from autogen import AssistantAgent, UserProxyAgent
llm_config = {"config_list": [{"model": "gpt-4o", "api_key": "your-key"}]}
assistant = AssistantAgent(
name="编程助手",
system_message="你是一个 Python 编程专家。",
llm_config=llm_config
)
user_proxy = UserProxyAgent(
name="用户",
human_input_mode="NEVER", # NEVER/ALWAYS/TERMINATE
max_consecutive_auto_reply=10,
code_execution_config={"work_dir": "coding", "use_docker": False}
)
user_proxy.initiate_chat(assistant, message="写一个快速排序算法并测试性能。")
群聊模式
from autogen import GroupChat, GroupChatManager
planner = AssistantAgent(name="产品经理",
system_message="你负责分析需求、拆解任务。", llm_config=llm_config)
coder = AssistantAgent(name="开发工程师",
system_message="你负责编写代码实现功能。", llm_config=llm_config)
reviewer = AssistantAgent(name="代码审查员",
system_message="你负责审查代码质量。", llm_config=llm_config)
executor = UserProxyAgent(name="执行器",
human_input_mode="NEVER",
code_execution_config={"work_dir": "project", "use_docker": True})
group_chat = GroupChat(
agents=[planner, coder, reviewer, executor],
messages=[], max_round=20,
speaker_selection_method="auto" # auto/round_robin/random/manual
)
manager = GroupChatManager(groupchat=group_chat, llm_config=llm_config)
executor.initiate_chat(manager, message="开发一个 TODO List REST API")
代码执行
# 本地执行
user_proxy = UserProxyAgent(name="executor", code_execution_config={
"work_dir": "workspace", "use_docker": False, "timeout": 60
})
# Docker 沙箱(推荐生产环境)
user_proxy = UserProxyAgent(name="executor", code_execution_config={
"work_dir": "workspace", "use_docker": "python:3.11-slim", "timeout": 120
})
工具注册与嵌套对话
from autogen import register_function
def get_weather(city: str) -> str:
"""查询指定城市的天气信息。"""
return f"{city}:晴,25°C"
register_function(get_weather,
caller=assistant, executor=user_proxy,
name="get_weather", description="查询城市天气")
# 嵌套对话:Agent 内部触发子对话
assistant.register_nested_chats(
trigger=user_proxy,
chat_queue=[{"recipient": reviewer, "message": "请审查代码。", "max_turns": 3}]
)
与同类框架对比
| 特性 | AutoGen | CrewAI | LangGraph |
|---|---|---|---|
| 核心理念 | 对话驱动协作 | 角色扮演团队 | 图状态机 |
| 代码执行 | 原生 Docker 沙箱 | 需集成工具 | 需自行实现 |
| 群聊模式 | 原生 GroupChat | 不支持 | 需手动编排 |
| 人类介入 | human_input_mode 灵活控制 | 有限支持 | 中断点机制 |
| 嵌套对话 | 原生支持 | 不支持 | 子图实现 |
| 适用场景 | 代码生成、多轮讨论 | 内容生产、流程自动化 | 复杂工作流 |
安全使用建议
This skill is coherent with its stated purpose as an AutoGen multi-agent helper. Before using it: (1) Inspect or vet the upstream pip packages it recommends (autogen-agentchat, autogen-ext, pyautogen) — confirm maintainers and package content; (2) If you run the code examples, be aware they can execute arbitrary code and may launch Docker containers — run them in an isolated environment (VM/container) and avoid exposing sensitive host resources; (3) Do not paste production API keys into example code — use secret management or environment variables; (4) If you plan to allow the agent to run autonomously in your environment, consider limiting its privileges (network, filesystem, Docker) and review any code the agent will execute. If you want a deeper check, provide the actual upstream package names/URLs or the code that will be executed so I can look for surprising behavior.
功能分析
Type: OpenClaw Skill
Name: autogen
Version: 1.0.0
The skill bundle is a standard documentation and reference guide for the Microsoft AutoGen framework. It contains legitimate installation commands, core concept explanations, and code snippets for multi-agent orchestration. No malicious code, data exfiltration, or prompt injection attempts were found in SKILL.md or _meta.json.
能力评估
Purpose & Capability
Name/description claim a multi-agent AutoGen assistant and the SKILL.md contains examples and instructions specific to that framework (agent classes, group chat, tool registration, code execution). Nothing requested (no env vars, no config paths) is unrelated to the stated purpose.
Instruction Scope
Instructions are focused on building and orchestrating agents. They include examples that configure and run code execution (local work_dir and Docker sandbox). This is expected for a framework that executes code, but it does mean the agent flow described can run arbitrary code or start Docker containers if you run the example code.
Install Mechanism
The skill is instruction-only (no install spec, no code files). The README recommends pip installs for upstream packages; the skill itself does not download or install anything. There is no direct install URL or archive baked into the skill.
Credentials
The skill does not declare or require any environment variables or credentials. Example snippets show placing an LLM API key inside an llm_config dict (inline), which is a coding example rather than a demanded secret. Users should avoid embedding production credentials directly in code.
Persistence & Privilege
No always:true, no install-time persistence, and the skill does not request system-level privileges. The skill allows normal autonomous invocation (platform default), which is expected for an agent helper.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install autogen - 安装完成后,直接呼叫该 Skill 的名称或使用
/autogen触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of AutoGen skill.
- Introduces AutoGen 多智能体对话框架助手 with expertise in agent orchestration, code execution, and group chat modes.
- Provides installation instructions for both classic and new architecture.
- Includes usage examples for two-agent chat and group chat scenarios.
- Documents key agent concepts and core features such as ConversableAgent, AssistantAgent, UserProxyAgent, GroupChat, and GroupChatManager.
- Demonstrates code execution options (local and Docker sandbox) and tool registration.
- Compares AutoGen with similar frameworks (CrewAI, LangGraph).
元数据
常见问题
Autogen 是什么?
AutoGen 多智能体对话框架助手,精通 Agent 对话编排、代码执行、群聊模式. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 255 次。
如何安装 Autogen?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install autogen」即可一键安装,无需额外配置。
Autogen 是免费的吗?
是的,Autogen 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Autogen 支持哪些平台?
Autogen 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Autogen?
由 zhangifonly(@zhangifonly)开发并维护,当前版本 v1.0.0。
推荐 Skills