شعار 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 يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها j4flmao على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Multi Agent Topology في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents/multi-agent-topology
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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

فعّل Multi Agent Topology في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Multi Agent Topology تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Multi Agent Topology بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف 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.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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...

لماذا تستخدم Multi Agent Topology على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Multi Agent Topology عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Multi Agent Topology في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents/multi-agent-topology. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Multi Agent Topology؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Multi Agent Topology؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Multi Agent Topology معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Multi Agent Topology مجانية؟

نعم. نشرها j4flmao على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇