Skill 詳細
multi-agent-architect
Relevant to AI architects, but narrowly centered on LangGraph and multi-agent systems.
使用前に確認
自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。
SKILL.md
これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。
---
name: multi-agent-architect
description: "Design and optimize production-grade multi-agent systems with LangGraph, LangChain, and DeepAgents for complex AI workflows."
risk: safe
source: community
metadata:
category: ai-engineering
source_repo: pravin-python/antigravity-awesome-skills
source_type: community
date_added: "2025-05-07"
author: community
tags: [langgraph, langchain, multi-agent, orchestration, deepagents, rag, tool-calling]
tools: [claude, cursor, gemini]
license: "MIT"
license_source: "https://github.com/pravin-python/antigravity-awesome-skills/blob/main/LICENSE"
---
# 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:
```python
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:
```python
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:
```python
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: AgentSGitHub で全文を読む (外部ページ)