本文へスキップ
Skillpedia
エージェント48k · #5256

multi-agent-architect

できること

このAIエージェントは、複数のエージェントから成る複雑なAIシステムの構築と改善を支援します。LangGraphやLangChainといったツールを使い、異なるAIの「エージェント」の間で作業を整理します。目標を達成するために、エージェント同士が効果的に通信し、協力し合うようにします。

使う場面

  • ✓ゼロから新しいマルチエージェントAIシステムを作るとき。
  • ✓異なるAIエージェント間の通信とワークフローを整理するとき。
  • ✓LangGraphやLangChainを使った既存のAIシステムをデバッグor最適化するとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/multi-agent-architect/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/multi-agent-architect/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“太陽光エネルギーに関する論文を書くのを手伝ってもらうため、調査エージェントとコーディングエージェントを持つAIシステムを作ってください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

各エージェントの役割(スーパーバイザー、調査担当、コーダーなど)、情報をどのように共有するか(状態)、どのように通信するかを定義します。そして、これらの要素を組み立てて、ワークフローを決める「グラフ」にします。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Multi-Agent Architect & Updater Skill

Overview

This skill turns Claude into a Senior AI Multi-Agent Architect specialized in LangGraph, LangChain, and DeepAgents. It provides structured workflows for creating and updating production-grade multi-agent systems — including supervisor agents, planners, researchers, coders, and memory-backed autonomous pipelines. Use it whenever you need to design, build, debug, or scale any multi-agent AI system.

If this skill adapts material from an external GitHub repository, declare both:

  • source_repo: owner/repo
  • source_type: official or source_type: community

When to Use This Skill

  • Use when you need to create a new agent or multi-agent workflow from scratch
  • Use when working with LangGraph state graphs, nodes, edges, or conditional routing
  • Use when the user asks about agent communication, memory systems, or tool-calling pipelines
  • Use when debugging or optimizing an existing LangChain/LangGraph agent system
  • Use when architecting supervisor, planner, research, coding, or validation agent roles
  • Use when integrating DeepAgents with hierarchical planning and delegation

How It Works

Step 1: Understand the Goal

Before writing any code, clarify:

  • What is the business objective this agent system must achieve?
  • What agent roles are needed (supervisor, planner, researcher, coder, validator)?
  • What tools does each agent require?
  • What memory strategy is needed (Redis, Vector DB, LangChain Memory)?
  • What communication protocol connects agents (shared state, message passing)?

Step 2: Define the State Schema

All agents share a typed state object passed through the graph:

from typing import TypedDict

class AgentState(TypedDict):
    user_goal: str
    tasks: list[str]
    completed_tasks: list[str]
    next_agent: str
    context: dict
    step_count: int          # guards against infinite loops
    error: str | None

Step 3: Define Agent Nodes

Each agent is an async function that reads from state and returns an updated state:

import logging
from langchain_openai import ChatOpenAI

logger = logging.getLogger(__name__)

async def research_node(state: AgentState) -> AgentState:
    logger.info("research_node: starting")
    llm = ChatOpenAI(model="gpt-4o")
    result = await llm.bind_tools(research_tools).ainvoke(state["user_goal"])
    state["context"]["research"] = result.content
    state["next_agent"] = "coder"
    return state

Step 4: Build the LangGraph

Wire nodes together with edges and conditional routing:

from langgraph.graph import StateGraph, END
from langgraph.prebuilt import ToolNode

def build_graph() -> StateGraph:
    graph = StateGraph(AgentState)

    graph.add_node("supervisor", supervisor_node)
    graph.add_node("research",   research_node)
    graph.add_node("coder",      coding_node)
    graph.add_node("validator",  validation_node)
    graph.add_node("tools",      ToolNode(all_tools))

    graph.set_entry_point("supervisor")

    graph.add_conditional_edges(
        "supervisor",
        route_next,
        {"research": "research", "coder": "coder", "end": END}
    )

    graph.add_edge("research",  "supervisor")
    graph.add_edge("coder",     "validator")
    graph.add_edge("validator", "supervisor")

    return graph.compile()

def route_next(state: AgentState) -> str:
    if state["step_count"] > 20:
        return "end"
    return state["next_agent"]

Step 5: Add Memory

from langchain_community.chat_message_histories import RedisChatMessageHistory

def get_memory(session_id: str):
    return RedisChatMessageHistory(
        session_id=session_id,
        url=os.getenv("REDIS_URL"),
        ttl=3600
    )

Step 6: Run the Graph

async def run(user_goal: str, session_id: str):
    graph = build_graph()
    initial_state = AgentState(
        user_goal=user_goal,
        tasks=[],
        completed_tasks=[],
        next_agent="supervisor",
        context={},
        step_count=0,
        error=None,
    )
    return await graph.ainvoke(initial_state)

Step 7: Expose via FastAPI (optional)

from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI()

class RunRequest(BaseModel):
    goal: str
    session_id: str

@app.post("/run")
async def run_agent(req: RunRequest):
    result = await run(req.goal, req.session_id)
    return {"result": result}

…

よくある質問

この文脈での「エージェント」とは何ですか?

エージェントは、専門化されたAIの作業者のようなものです。情報の調査、コードの作成、結果の検証など、それぞれ特定の仕事を担当します。

LangGraphとLangChainとは何ですか?

これらは、マルチエージェントシステムを構築・管理するためのツールです。LangGraphはワークフローと通信を整理し、LangChainは異なるAI部品をつなぐ役割を果たします。

エージェント同士はどのように通信するのですか?

「状態(state)」と呼ばれる、ユーザーの目標、完了したタスク、文脈などの関連情報を保持する領域を共有します。これにより、全員が自分の仕事に必要な情報を持てるようになります。

詳細

作者による元の説明

Design and optimize production-grade multi-agent systems with LangGraph, LangChain, and DeepAgents for complex AI workflows.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#5256
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル