Design and orchestrate multi-agent AI systems with specialist agents, coordination patterns, and shared memory. Outputs agent topology, communication protocol, error handling, and evaluation framework.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Design and orchestrate multi-agent AI systems with specialist agents, coordination patterns, and shared memory. Outputs agent topology, communication protocol, error handling, and evaluation framework.
Multi-agent systems decompose complex tasks across specialist agents that collaborate — one researches, one writes, one reviews. The design challenges are coordination (how agents communicate), memory (what state they share), and reliability (handling agent failures without failing the whole task).
When to Use Multi-Agent
SINGLE AGENT FIRST — add agents only when:
✓ Task is too long for one context window
✓ Task has genuinely parallel subtasks
✓ Different subtasks need different specialisations
✓ Quality benefits from review/critique loop
MULTI-AGENT PATTERNS:
Orchestrator → Workers (most common)
Pipeline (Agent A → Agent B → Agent C)
Parallel fan-out with reducer
Debate (Agent A vs Agent B → Judge)
Reflection (Writer → Critic → Writer)
"""Coordinates specialist agents to complete complex tasks."""
def
__init__
self, model: str = "claude-opus-4-5"
self
async
def
run
self, task: str
str
# Step 1: Plan — decompose task into subtasks
await
self
# Step 2: Execute subtasks (some parallel, some sequential)
await
self
# Step 3: Synthesise — combine results
await
self
return
async
def
_plan
self, task: str
dict
self
1024
"role"
"user"
"content"
f"""
Decompose this task into 2-5 subtasks that can be worked on by specialist agents.
For each subtask specify: agent_type, description, dependencies (list of prior subtask IDs).
Task: {task}
Respond with JSON: {{"subtasks": [{{"id": "1", "agent_type": "researcher", "description": "...", "dependencies": []}}]}}
"""
"You are a thorough researcher. Find and synthesise relevant information."
"writer"
"You are a skilled writer. Create clear, well-structured content."
"critic"
"You are a critical reviewer. Identify flaws, gaps, and improvements."
"coder"
"You are an expert software engineer. Write clean, correct code."
"analyst"
"You are a data analyst. Draw insights from information."
"You are a helpful AI assistant."
"
"
f"Prior work ({dep_id}):
{output}"
for
in
if
else
""
try
"claude-sonnet-4-6"
if
"critic"
else
"claude-opus-4-5"
2048
"role"
"user"
"content"
f"""
Original task: {original_task}
Your specific task: {description}{context_text}
Complete your task thoroughly.
"""
return
0
True
except
as
return
""
False
str
async
def
_synthesise
self, task: str, results: list[AgentResult]
str
for
in
if
"
"
f"**{r.agent_name}**:
{r.output}"
for
in
self
4096
"role"
"user"
"content"
f"""
Original task: {task}
Work completed by specialist agents:
{work_summary}
Synthesise all work into a final, coherent response for the original task.
"""
return
0
Reflection Pattern (Writer + Critic)
asyncdefreflection_loop(task: str, max_rounds: int = 3) -> str:
"""Writer produces draft; Critic improves it; repeat."""
draft = await write(task)
forroundinrange(max_rounds):
critique = await critique(draft, task)
if"no significant improvements"in critique.lower():
break
draft = await revise(draft, critique, task)
return draft
asyncdefwrite(task: str) -> str:
response = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=2048,
system="You are a skilled writer. Produce clear, comprehensive content.",
messages=[{"role": "user", "content": f"Write: {task}"}]
)
return response.content[0].text
asyncdefcritique(draft: str, original_task: str) -> str:
response = client.messages.create(
model="claude-opus-4-5",
max_tokens=1024,
system="You are a critical editor. Identify specific improvements needed. If the work is good, say so.",
messages=[{"role": "user", "content": f"Task: {original_task}
Draft:
{draft}
Provide specific critique."}]
)
return response.content[0].text
Anti-Patterns to Avoid
Anti-Pattern
Problem
Fix
Multi-agent for simple tasks
Unnecessary complexity and latency
Single agent first; add agents only when justified
No error handling per agent
One agent failure kills the whole pipeline
Each agent failure is handled; pipeline continues
Agents calling agents recursively
Infinite loops; unpredictable costs
Fixed topology; max depth limit
No cost tracking
Multi-agent costs multiply quickly
Track and cap total tokens per orchestration run
Agents share mutable state
Race conditions; inconsistent results
Immutable message passing between agents
10 Rules
Single agent first — add specialist agents only when genuinely needed.
Orchestrator coordinates; workers execute — never let workers coordinate other workers.
Every agent has a single, clear responsibility.
Agents communicate through messages — no shared mutable state.
Each agent failure is handled gracefully — the orchestrator decides whether to retry or proceed.
Set cost caps per orchestration run — multi-agent costs multiply quickly.
The reflection pattern (write + critique + revise) improves quality for creative tasks.
Parallel execution for independent subtasks — don't serialize what can run concurrently.
Log every agent call with inputs and outputs — debugging requires the full trace.
Evaluate multi-agent systems on end-to-end task success — not individual agent performance.