Multi Agent Topologyのロゴ

Multi Agent Topology

コミュニティ
j4flmao
multi-agent-topology

Use this skill when the user says 'supervisor agent', 'agent hierarchy', 'pipeline of agents', 'agent debate', 'handoff between agents', 'which multi-agent topology', 'should I use multiple agents'. Chooses the interaction graph between agents (single, pipeline, supervisor-worker, hierarchical, handoff, debate/critic) and defines authority, message contracts, and failure handling for each edge. Do NOT use for: framework-level orchestration and runtime choices (ai/multi-agent-systems), single-agent loop design (ai/ai-agents/core-architectures), or R&D swarm prototypes (rnd/ai-agents/swarm-architectures).

概要

公開者j4flmao
リポジトリagent-skills
スキル名multi-agent-topology
スター
41
フォーク
6
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    j4flmaoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Multi Agent Topology」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents/multi-agent-topology
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/ai/ai-agents/multi-agent-topology .claude/skills/multi-agent-topology
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでMulti Agent Topologyを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にMulti Agent Topologyを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Multi Agent Topologyは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Multi-Agent Topology

Purpose

A topology is the graph of who talks to whom, who decides, and what data crosses each edge. Adding agents adds latency, cost, and failure points, so the first question is whether more than one agent is needed at all. When it is, pick the simplest topology that gives each agent a narrow role, a small tool set, and a typed contract with its neighbours.

Agent Protocol

Trigger

"supervisor", "worker agents", "agent hierarchy", "agent pipeline", "handoff", "debate", "critic agent", "should this be multi-agent".

Input Context

  • Task decomposition: subtasks, dependencies, and which need different tools or permissions.
  • Tool count and context size if done by one agent.
  • Latency/cost budget; need for parallelism.
  • Where human approval is required.

Output Artifact

Topology diagram (Mermaid), role table, edge contracts (typed messages), termination and failure rules.

Response Format

Topology: {single|pipeline|supervisor-worker|hierarchical|handoff|debate}
Why multi-agent: {tool split | context isolation | parallelism | separation of duties}
Roles: {agent: responsibility, tools, can_write?}
Edges: {from -> to: message schema}
Termination: {condition}; max rounds={n}
Failure: {retry | reroute | escalate}

Completion Criteria

  • Single-agent baseline considered and rejected with a reason.
  • Each agent has a small, cohesive toolset (split past ~10-15 tools or on eval evidence) and least privilege (reviewers read-only).
  • Every edge has a typed schema.
  • Round/turn limits on every cycle.
  • HITL breakpoint before production-mutating nodes.

When Multiple Agents Pay Off

ReasonExample
Tool/permission separationCoder can write files; reviewer can only read
Context isolationResearch sub-agents each read many pages, return short summaries
ParallelismIndependent subtasks fan out and run concurrently
Separation of dutiesGenerator and independent verifier

Poor reasons: "it mirrors a human org chart", "more agents = smarter". Multi-agent systems typically use several times more tokens than a single agent; justify the spend with measured quality gains.

Topologies

TopologyControlBest forMain riskMitigation
PipelineFixed orderKnown stagesError propagationValidate between stages
Supervisor-workerCentral routerDynamic delegationSupervisor bottleneck, lossy summariesTyped results, supervisor never executes
HierarchicalSupervisors of supervisorsVery large tasksLatency, telephone effectLimit depth to 2
Handoff (peer transfer)Current agent passes controlConversational triagePing-pong loopsHandoff count cap
Debate / criticGenerator + critic(s)Quality-critical outputsSycophantic agreement, costGround critic in tests/evidence; round cap
Parallel + aggregatorFan-out/fan-inIndependent subtasks, votingInconsistent outputsDeterministic merge rules

Edge Contracts

Pass structured state, not free-form chat logs:

python
from __future__ import annotations

from typing import Literal

from pydantic import BaseModel, Field


class WorkOrder(BaseModel):
    task_id: str
    objective: str
    inputs: dict[str, str]
    constraints: list[str] = Field(default_factory=list)
    deadline_s: int = 300


class WorkResult(BaseModel):
    task_id: str
    status: Literal["done", "failed", "needs_human"]
    summary: str = Field(max_length=2000)
    artifacts: list[str] = Field(default_factory=list)   # file paths / ids, not blobs
    evidence: list[str] = Field(default_factory=list)    # test output, sources

Validate every message against its schema at the boundary; a malformed result is a failed task, not something to "interpret".

Supervisor Rules

  1. The supervisor routes, aggregates, and decides termination; it does not do the domain work.
  2. Workers get the minimum context for their task (objective, inputs, constraints), not the whole conversation.
  3. Results return as summaries plus artifact references, keeping the supervisor's context small.
  4. A global budget (steps, tokens, time) is owned by the supervisor and enforced on every dispatch.

Debate That Works

  • Critics must cite evidence (failing test, source mismatch), otherwise their critique is ignored.
  • Use different instructions or models for generator and critic to reduce correlated errors.
  • Fixed number of rounds (2-3 typical); stop early on accept.
  • Aggregate by rules (all tests pass, majority vote on discrete answers), not by asking another model "which is better" without criteria.

Anti-Patterns

  • Agents chatting in an unbounded group chat until someone says "TERMINATE".
  • Passing full transcripts between agents (context bloat, prompt injection propagation).
  • Every agent having every tool.
  • Deep hierarchies (3+ levels) for tasks a pipeline could do.
  • No owner for the global budget.

Checklist

  • Single-agent baseline measured.
  • Topology chosen from table with stated risk mitigations.
  • Roles, tools, and write permissions per agent.
  • Pydantic/TypedDict schemas on every edge.
  • Round caps, global budget, HITL before destructive nodes.
  • Per-agent traces linked by one trace id.

References

  • Du et al., "Improving Factuality and Reasoning in Language Models through Multiagent Debate" (2023).
  • Anthropic, "How we built our multi-agent research system" (2025) — orchestrator-worker with context isolation.
  • Sibling: ../../multi-agent-systems/SKILL.md for runtime/framework selection.

よくある質問

AIスキル「Multi Agent Topology」では何ができますか?

Use this skill when the user says 'supervisor agent', 'agent hierarchy', 'pipeline of agents', 'agent debate', 'handoff between agents', 'which multi-agent topology', 'should I use multiple agents'. Chooses the interaction graph between agents (single, pipeline, supervisor-worker, hierarchical, handoff, debate/critic) and defines authority, message contracts, and failure handling for each edge. Do NOT use for: framework-level orchestration and runtime choices (ai/multi-agent-systems), single-agent loop design (ai/ai-agents/core-architectures), or R&D swarm prototypes (rnd/ai-agents/swarm-ar...

TypingMindでMulti Agent Topologyを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Multi Agent Topologyはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにMulti Agent Topologyをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents/multi-agent-topologyを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Multi Agent Topologyを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Multi Agent Topologyで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもMulti Agent Topologyを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Multi Agent Topology」は無料ですか?

はい。j4flmaoがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇