Ai Multi Agent Systemsのロゴ

Ai Multi Agent Systems

コミュニティ
j4flmao
ai-multi-agent-systems

Use this skill when the user says 'multi-agent system', 'LangGraph multi-agent', 'AutoGen', 'CrewAI', 'OpenAI Agents SDK handoffs', 'agents sharing state', 'blackboard', 'human approval in agent graph', 'A2A protocol'. Builds the runtime for several cooperating agents: orchestration style (deterministic graph vs dynamic conversation), shared state, inter-agent protocols, checkpointing and human-in-the-loop, budgets, and observability. Do NOT use for: choosing the topology shape itself (ai/ai-agents/multi-agent-topology), a single agent's loop (ai/ai-agents/core-architectures), or experimental swarm/debate research (rnd/ai-agents/swarm-architectures).

概要

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

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

  • どのLLMでも利用可能

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

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

AIスキル「Ai Multi Agent Systems」を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/multi-agent-systems
  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/multi-agent-systems .claude/skills/ai-multi-agent-systems
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Multi-Agent Systems

Purpose

Implement and operate systems where several specialized agents cooperate. The engineering problems are classic distributed-systems problems wearing an LLM costume: shared state, message contracts, termination, retries, durability across human waits, and tracing. Prefer deterministic orchestration (explicit graph) for production; use dynamic conversational orchestration only where flexibility is worth the unpredictability.

Agent Protocol

Trigger

"multi-agent", "LangGraph supervisor", "AutoGen", "CrewAI", "agent handoff", "shared state between agents", "blackboard", "agent approval step", "A2A", "agents talking to each other".

Input Context

  • Roles already decided (or the topology skill output).
  • Framework constraints and language.
  • Which nodes touch production state; approval owners.
  • Durability needs (can a run wait hours/days for a human?).

Output Artifact

Runtime design and code skeleton: state schema, nodes, routing, checkpointer, interrupts, budgets, tracing.

Response Format

Orchestration: {graph|conversation|handoff}  Framework: {name@version}
State schema: {TypedDict/Pydantic fields + reducers}
Nodes: {agent/tool nodes}  Routing: {conditional edges}
Durability: checkpointer={postgres|sqlite|memory}, thread_id={key}
HITL: interrupt before {nodes}
Budgets: recursion_limit={n}, tokens={n}, timeout={s}
Tracing: {backend}

Completion Criteria

  • Typed shared state with explicit fields routing reads (repo rule: not transcript-only).
  • Every cycle bounded (recursion limit / round cap).
  • Durable checkpointer for any run that can pause.
  • Interrupt before production-mutating nodes.
  • Tool outputs treated as untrusted data.

Orchestration Styles

StyleExamplesProsConsUse when
Deterministic graphLangGraph StateGraphPredictable, testable, resumableMust model flows up frontBusiness processes, production
Dynamic conversationAutoGen/AG2 group chat, CrewAI hierarchicalFlexible on novel tasksLoops, hard to debug, costlyResearch, exploration
HandoffsOpenAI Agents SDK handoffs, LangGraph Command(goto=...)Natural for triagePing-pong riskCustomer-service routing

Ecosystem churn is high (e.g. OpenAI's experimental Swarm was superseded by the Agents SDK; Microsoft is consolidating AutoGen and Semantic Kernel into its Agent Framework). Check current docs and isolate framework code behind your own interfaces.

Shared State (Blackboard)

Agents read and write fields of a typed state object instead of forwarding transcripts. In LangGraph, each field can declare a reducer that defines how concurrent updates merge.

python
from __future__ import annotations

import operator
from typing import Annotated, Literal, TypedDict

from langgraph.checkpoint.postgres import PostgresSaver
from langgraph.graph import END, START, StateGraph
from langgraph.graph.message import add_messages


class TeamState(TypedDict):
    messages: Annotated[list, add_messages]          # audit trail, not the routing source
    spec: str
    code: str
    lint_errors: list[str]
    test_report: str
    review_notes: Annotated[list[str], operator.add]  # parallel writers append
    approval_status: Literal["pending", "approved", "rejected"]
    iterations: int


def supervisor(state: TeamState) -> Literal["coder", "reviewer", "deploy", "escalate"]:
    if state["iterations"] >= 4:
        return "escalate"
    if not state["code"] or state["lint_errors"] or "FAILED" in state["test_report"]:
        return "coder"
    if not state["review_notes"]:
        return "reviewer"
    return "deploy"


builder = StateGraph(TeamState)
builder.add_node("coder", coder_agent)          # write access to workspace only
builder.add_node("checks", run_lint_and_tests)  # deterministic node, no LLM
builder.add_node("reviewer", reviewer_agent)    # read-only tools
builder.add_node("deploy", deploy_node)         # production-mutating
builder.add_node("escalate", notify_human)
builder.add_edge(START, "coder")
builder.add_edge("coder", "checks")
builder.add_conditional_edges("checks", supervisor)
builder.add_conditional_edges("reviewer", supervisor)
builder.add_edge("deploy", END)
builder.add_edge("escalate", END)

with PostgresSaver.from_conn_string(DB_URI) as saver:   # durable checkpoints
    saver.setup()
    graph = builder.compile(checkpointer=saver, interrupt_before=["deploy"])
    cfg = {"configurable": {"thread_id": "ticket-1234"}, "recursion_limit": 25}
    graph.invoke(initial_state, cfg)
    # ...later, after a human approves in the UI:
    graph.update_state(cfg, {"approval_status": "approved"})
    graph.invoke(None, cfg)

coder_agent, run_lint_and_tests, reviewer_agent, deploy_node, notify_human, DB_URI, and initial_state are application-defined. deploy_node must itself refuse to run unless approval_status == "approved" (defense in depth). Inside a node you can also call langgraph.types.interrupt(payload) and resume with Command(resume=value).

Communication Protocols

MechanismDescriptionUse
Shared state / blackboardTyped fields in one storeIn-process graphs
Message passing (actor)Agents own state, exchange typed messages via queuesDistributed agents, isolation
MCPStandard protocol for exposing tools/resources to agentsTool interoperability
A2A (Agent2Agent)Open protocol for agent-to-agent task delegation across vendorsCross-organization agents

See references/communication-protocols.md for blackboard vs actor details.

Human-in-the-Loop

Pausing must not hold a process or thread: serialize state to the checkpointer, release compute, resume by thread_id when the human answers. Show the reviewer exactly what will happen (diff, SQL, deploy target), record who approved, and expire stale approvals. Details: references/human-in-the-loop.md.

Failure Handling

FailureHandling
Agent output fails schemaRetry once with the validation error, then fail the node
Tool transient errorBounded retries with backoff inside the tool, not by re-running the agent
Cycle without progressRecursion limit + iteration counter in state → escalate
Process crashResume from last checkpoint (nodes must be idempotent)
Prompt injection via tool outputTreat as data; no tool output can change permissions or trigger approvals

Observability

One trace per run, one span per node and per LLM/tool call, tagged with thread_id, agent name, tokens, and cost. Store state snapshots per step (checkpointers already do) for replay and debugging.

Anti-Patterns

  • Group chat with no termination condition other than a magic word.
  • Routing by asking an LLM to read the whole transcript when a state field would do.
  • In-memory checkpointer in production with human approvals.
  • Every agent holding every tool; reviewer with write access.
  • Re-running an entire multi-agent workflow on a single tool timeout.

Checklist

  • Orchestration style justified; framework version pinned.
  • Typed state with reducers for concurrent writes.
  • Deterministic nodes for checks (lint, tests, validation).
  • Recursion limit, iteration counters, token/time budgets.
  • Durable checkpointer; interrupts before mutating nodes; approval audit.
  • Per-node tracing and cost attribution.
  • End-to-end eval on representative tasks vs single-agent baseline.

References

  • Communication Protocols — blackboard vs actor model.
  • Human-in-the-Loop — checkpoint-based approval flows.
  • LangGraph docs (persistence, human-in-the-loop, multi-agent); Model Context Protocol and A2A specifications.

Shared References

Additional reference material for this skill, stored outside its own references/ folder.

  • ../../harness-engineering/multi-agent-coordination/references/consensus-coordination.md — Consensus and Agreement in Multi-Agent LLM Systems
  • ../../harness-engineering/multi-agent-coordination/references/dag-task-decomposition.md — DAG-Based Task Decomposition Reference Guide
  • ../../harness-engineering/multi-agent-coordination/references/failure-rate-mitigation.md — Failure Mitigation in Multi-Agent Systems
  • ../../harness-engineering/multi-agent-coordination/references/inter-agent-protocols.md — Inter-Agent Communication Protocols Reference Guide
  • ../../harness-engineering/multi-agent-coordination/references/orchestrator-patterns.md — Orchestrator Patterns Reference Guide
  • ../../harness-engineering/multi-agent-coordination/references/role-specialization-patterns.md — Role Specialization Patterns for Agent Teams
  • ../../harness-engineering/multi-agent-coordination/references/state-sharing-mechanisms.md — State Sharing Mechanisms for Multi-Agent Systems
  • ../../harness-engineering/multi-agent-coordination/references/supervisor-worker-hierarchies.md — Supervisor-Worker Hierarchies Reference Guide

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

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

Use this skill when the user says 'multi-agent system', 'LangGraph multi-agent', 'AutoGen', 'CrewAI', 'OpenAI Agents SDK handoffs', 'agents sharing state', 'blackboard', 'human approval in agent graph', 'A2A protocol'. Builds the runtime for several cooperating agents: orchestration style (deterministic graph vs dynamic conversation), shared state, inter-agent protocols, checkpointing and human-in-the-loop, budgets, and observability. Do NOT use for: choosing the topology shape itself (ai/ai-agents/multi-agent-topology), a single agent's loop (ai/ai-agents/core-architectures), or experiment...

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

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

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

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

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

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

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

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

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

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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