Command Palette

Search for a command to run...

Назад к скиллам
скилл № 16440

multi-agent-topology

Use when the user asks whether to use multiple agents, supervisor-worker, agent hierarchy, pipeline of agents, handoffs or a critic/debate setup. Produces a…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить multi-agent-topology в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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

Reason Example
Tool/permission separation Coder can write files; reviewer can only read
Context isolation Research sub-agents each read many pages, return short summaries
Parallelism Independent subtasks fan out and run concurrently
Separation of duties Generator 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

flowchart LR
  subgraph Pipeline
    A1[Extract] --> A2[Transform] --> A3[Format]
  end
  subgraph SupervisorWorker[Supervisor-worker]
    S((Supervisor)) --> W1[Worker A]
    S --> W2[Worker B]
    W1 --> S
    W2 --> S
  end
  subgraph Debate
    G[Generator] --> C{Critic}
    C -- revise --> G
    C -- accept --> J[Final]
  end
Topology Control Best for Main risk Mitigation
Pipeline Fixed order Known stages Error propagation Validate between stages
Supervisor-worker Central router Dynamic delegation Supervisor bottleneck, lossy summaries Typed results, supervisor never executes
Hierarchical Supervisors of supervisors Very large tasks Latency, telephone effect Limit depth to 2
Handoff (peer transfer) Current agent passes control Conversational triage Ping-pong loops Handoff count cap
Debate / critic Generator + critic(s) Quality-critical outputs Sycophantic agreement, cost Ground critic in tests/evidence; round cap
Parallel + aggregator Fan-out/fan-in Independent subtasks, voting Inconsistent outputs Deterministic merge rules

Edge Contracts

Pass structured state, not free-form chat logs:

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 bette
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл multi-agent-topology?

Use when the user asks whether to use multiple agents, supervisor-worker, agent hierarchy, pipeline of agents, handoffs or a critic/debate setup. Produces a topology diagram, role table with least-privilege tools, typed edge contracts and round caps. Not for framework runtime and checkpointing (use ai-multi-agent-systems) or R&D swarms (use swarm-architectures).

Как установить скилл multi-agent-topology?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл multi-agent-topology запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить multi-agent-topology с