/ 目录 / 演练场 / Wegent
● 社区 wecode-ai ⚡ 即开即用

Wegent

作者 wecode-ai · wecode-ai/Wegent

在 YAML 中定义 agent 团队——Wegent 负责运行、管理共享记忆并在专家间路由任务。

Wegent 将 agent 团队视为声明式制品:编写包含角色、移交和共享记忆的 YAML 规格文件;Wegent 提供运行时。适合单个 agent prompt 已不够用的场景。

为什么要用

核心特性

实时演示

实际使用效果

就绪

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "wegent-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/wecode-ai/Wegent"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "wegent-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/wecode-ai/Wegent"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "wegent-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/wecode-ai/Wegent"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "wegent-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/wecode-ai/Wegent"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "wegent-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/wecode-ai/Wegent"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "wegent-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/wecode-ai/Wegent"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add wegent-skill -- git clone https://github.com/wecode-ai/Wegent

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: Wegent

组建专家 agent 团队

👤 Claude Code 用户 ⏱ ~15 min intermediate

何时使用: 单个 agent 不够用,需要专家之间的任务移交。

步骤
  1. 编写规格
    Write team.yml — roles + hand-offs.✓ 已复制
    → 规格文件就绪
  2. 运行
    wegent run team.yml task.md.✓ 已复制
    → agent 依次协作
  3. 检查
    Check trace.✓ 已复制
    → 运行记录完整

结果: 多 agent 协作运行,无需编写定制编排代码。

组合

与其他 MCP 搭配,撬动十倍杠杆

wegent-skill + harness-skill

用 Harness 设计团队,用 Wegent 执行

Combine wegent-skill with harness-skill: Use Harness to design the team; Wegent to run it✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
run / inspect (见文档) 两种工作流 1 次调用

成本与限制

运行它的成本

API 配额
取决于各提供商
每次调用 Token 数
N 倍正常消耗
费用
免费开源;LLM 费用自担
提示
为每个角色设置 token 预算上限

安全

权限、密钥、影响范围

凭据存储: 密钥存于环境变量
数据出站: 已配置的提供商

故障排查

常见错误与修复

移交出现循环

为每个角色添加明确的退出条件

替代方案

Wegent 对比其他方案

替代方案何时用它替代权衡
手写编排代码只有一个团队的简单需求没有声明式规格

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills