Multi Agent Collaboration logo

Multi Agent Collaboration

CommunityPopular
mateaix
multi_agent_collaboration

当任务需要多个 Agent 的专业能力协同完成时,编排多 Agent 并行或串行协作,整合各方结果。

Overview

Publishermateaix
Repositorymateclaw
Skill namemulti_agent_collaboration
Stars
1.1K
Forks
337
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mateaix on GitHub. Read the source before you install it.

Installation

Install the Multi Agent Collaboration AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mateaix/mateclaw/tree/dev/mateclaw-server/src/main/resources/skills/multi_agent_collaboration
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mateaix/mateclaw.git /tmp/mateclaw
mkdir -p .claude/skills
cp -r /tmp/mateclaw/mateclaw-server/src/main/resources/skills/multi_agent_collaboration .claude/skills/multi_agent_collaboration
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Multi Agent Collaboration in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Multi Agent Collaboration on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Multi Agent Collaboration is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

多 Agent 协作

何时使用

当任务明显需要多个专业 Agent 共同完成,或用户明确要求多 Agent 协作时使用。

应该使用

  • 任务可拆分为多个专业子域,每个子域有对应 Agent
  • 多个独立子任务可以并行执行(节省时间)
  • 需要来自不同 Agent 的结果进行综合分析
  • 用户明确要求"让 A 和 B 一起做"

不应使用

  • 一个 Agent 可以完成,无需分工
  • 只是简单咨询,用 chat_with_agent 即可
  • 刚收到某 Agent 的消息,不要立刻回调它(防死循环)

两种协作模式

模式一:串行(有依赖关系)

B 的任务需要 A 的结果时使用:

# 第一阶段:A 完成
result_a = delegateToAgent(
  agentName="research-agent",
  task="[来自 Agent coordinator 的请求] 收集最新 AI 大模型基准测试数据,返回原始数据表格。"
)

# 第二阶段:B 基于 A 的结果处理
result_b = delegateToAgent(
  agentName="data-analyst",
  task="[来自 Agent coordinator 的请求] 基于以下数据生成分析报告和可视化建议:\n\n" + result_a
)

模式二:并行(互相独立)

多个子任务之间没有依赖时使用,最多同时 3 个:

results = delegateParallel(
  tasksJson="[
    {\"agentName\": \"research-agent\", \"task\": \"[来自 Agent coordinator 的请求] 搜索竞品 A 的最新功能更新\"},
    {\"agentName\": \"data-analyst\",   \"task\": \"[来自 Agent coordinator 的请求] 分析我们产品上月用户留存数据\"},
    {\"agentName\": \"writer-agent\",   \"task\": \"[来自 Agent coordinator 的请求] 起草本次竞品分析报告的大纲\"}
  ]"
)

所有任务完成后一次性返回全部结果,再由当前 Agent 整合。

完整工作流程

第一步:查询可用 Agent

listAvailableAgents()

根据各 Agent 的描述分配任务。

第二步:判断串行 or 并行

判断条件模式
子任务 B 依赖子任务 A 的结果串行
子任务互相独立,可同时进行并行
混合(部分有依赖)先并行无依赖任务,再串行有依赖任务

第三步:分配并执行

使用对应模式(见上)。

第四步:整合结果

由当前 Agent(编排者)负责整合所有 Agent 的返回结果,形成最终回复。不要把整合工作再委托给某个子 Agent。

关键规则

  • 任务说明中加 [来自 Agent <名称> 的请求] 帮助目标 Agent 识别来源
  • 并行任务数量不超过 3 个;超过时按优先级分批
  • 不让两个 Agent 互相调用对方(会形成死循环)
  • 整合由编排者负责,不再向下委托
  • 如需上下文连贯,在 task 中附带前一阶段的关键结论

与 chat_with_agent 的区别

技能场景
chat_with_agent一对一,咨询或单任务委托
multi_agent_collaboration一对多,多 Agent 分工、并行或串行编排

Frequently asked questions

What does the Multi Agent Collaboration AI skill do?

当任务需要多个 Agent 的专业能力协同完成时,编排多 Agent 并行或串行协作,整合各方结果。

Why use Multi Agent Collaboration on TypingMind?

Because you install it once and use it with any model. Multi Agent Collaboration is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Multi Agent Collaboration in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mateaix/mateclaw/tree/dev/mateclaw-server/src/main/resources/skills/multi_agent_collaboration. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Multi Agent Collaboration?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Multi Agent Collaboration?

As many as you like. As long as a model supports skills, you can use Multi Agent Collaboration with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Multi Agent Collaboration AI skill free?

Yes. It is published on GitHub by mateaix under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇