Multi Agent Topology logo

Multi Agent Topology

Community
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).

Overview

Publisherj4flmao
Repositoryagent-skills
Skill namemulti-agent-topology
Stars
41
Forks
6
Bundled files
Instructions only
LicenseMIT
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 j4flmao on GitHub. Read the source before you install it.

Installation

Install the Multi Agent Topology 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/j4flmao/agent-skills/tree/main/skills/ai/ai-agents/multi-agent-topology
  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/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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Multi Agent Topology 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 Topology 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 Topology 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.

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.

Frequently asked questions

What does the Multi Agent Topology AI skill do?

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...

Why use Multi Agent Topology on TypingMind?

Because you install it once and use it with any model. Multi Agent Topology 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 Topology in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents/multi-agent-topology. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Multi Agent Topology?

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 Topology?

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

Is the Multi Agent Topology AI skill free?

Yes. It is published on GitHub by j4flmao under the MIT 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 👇