deepagents-planning-to…
Use the write_todos tool effectively for task planning and decomposition in Deep Agents. Use when users want to (1) implement…
Implement multi-agent coordination patterns (supervisor-subagent, router, orchestrator-worker, handoffs) for LangGraph applications. Use when users want to (1) implement multi-agent systems, (2) coordinate multiple specialized agents, (3) choose between coordination patterns,
Claude Code
$ npx -y skills add soba-labs/langchain-agent-skills --skill langgraph-agent-patterns --agent claude-code
Codex
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-agent-patterns -a codex -y
Cursor
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-agent-patterns -a cursor -y
Gemini CLI
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-agent-patterns -a gemini-cli -y
GitHub Copilot
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-agent-patterns -a github-copilot -y
OpenCode
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-agent-patterns -a opencode -y
Windsurf
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-agent-patterns -a windsurf -y
name: langgraph-agent-patterns description: Implement multi-agent coordination patterns (supervisor-subagent, router, orchestrator-worker, handoffs) for LangGraph applications. Use when users want to (1) implement multi-agent systems, (2) coordinate multiple specialized agents, (3) choose between coordination patterns, (4) set up supervisor-subagent workflows, (5) implement router-based agent selection, (6) create parallel orchestrator-worker patterns, (7) implement agent handoffs, (8) design state schemas for multi-agent systems, or (9) debug multi-agent coordination issues.
Implement and configure multi-agent coordination patterns for LangGraph applications.
Choose the right pattern based on your coordination needs:
| Pattern | Best For | When to Use | |---------|----------|-------------| | **Supervisor** | Complex workflows, dynamic routing | Agents need to collaborate, routing is context-dependent | | **Router** | Simple categorization, independent tasks | One-time routing, deterministic decisions | | **Orchestrator-Worker** | Parallel execution, high throughput | Independent subtasks, results need aggregation | | **Handoffs** | Sequential workflows, context preservation | Clear sequence, each agent builds on previous |
**Quick Decision:**
For detailed comparison: See references/pattern-comparison.md
**Overview:** Central coordinator delegates to specialized subagents based on context.
**Quick Start:**
# Generate supervisor graph boilerplate uv run scripts/generate_supervisor_graph.py my-team \ --subagents "researcher,writer,reviewer" # TypeScript uv run scripts/generate_supervisor_graph.py my-team \ --subagents "researcher,writer,reviewer" \ --typescript
**Key Components:** 1. **State with routing**: `next` field for routing decisions 2. **Supervisor node**: Makes routing decisions based on context 3. **Subagent nodes**: Specialized agents with distinct capabilities 4. **Conditional edges**: Route from supervisor to subagents
**Example Flow:**
User Request → Supervisor → Researcher → Supervisor → Writer → Supervisor → FINISH
**For complete implementation:** See references/supervisor-subagent.md
**Overview:** One-time routing to specialized agents based on initial request.
**Key Components:** 1. **State with route**: Single routing decision field 2. **Router node**: Categorizes request (keyword, LLM, or semantic) 3. **Specialized agents**: Independent agents for each category 4. **Conditional routing**: Route to agent, then END
**Example Flow:**
User Request → Router → Sales Agent → END
├→ Support Agent → END
└→ Billing Agent → END**Routing Strategies:**
**For complete implementation:** See references/router-pattern.md
**Overview:** Decompose task into parallel subtasks, aggregate results.
**Key Components:** 1. **State with subtasks**: Task decomposition and results accumulation 2. **Orchestrator node**: Splits task into independent subtasks 3. **Worker nodes**: Process subtasks in parallel 4. **Aggregator node**: Synthesizes results 5. **Send fan-out**: Return `Send(...)` objects from conditional edges and use a list reducer (for example `Annotated[list[dict], operator.add]`) so worker outputs accumulate
**Example Flow:**
Task → Orchestrator → Worker 1 ┐
→ Worker 2 ├→ Aggregator → Result
→ Worker 3 ┘**Best Practices:**
**For complete implementation:** See references/orchestrator-worker.md
**Overview:** Sequential agent handoffs with context preservation.
**Key Components:** 1. **State with context**: Shared context across handoffs 2. **Agent nodes**: Each agent hands off to next 3. **Handoff logic**: Explicit or conditional handoffs 4. **Context management**: Preserve and pass information
**Example Flow:**
Request → Researcher → Writer → Editor → FINISH
(with context preservation)**Handoff Strategies:**
**For complete implementation:** See references/handoffs.md
Runnable mini-projects (Python + JavaScript):
Each pattern requires specific state schema design:
**Supervisor Pattern:**
class SupervisorState(TypedDict):
messages: Annotated[list[BaseMessage], add_messages]
next: Literal["agent1", "agent2", "FINISH"]
current_agent: str**Router Pattern:**
class RouterState(TypedDict):
messages: list[BaseMessage]
route: Literal["category1", "category2"]**Orchestrator-Worker:**
import operator
class OrchestratorState(TypedDict):
task: str
subtasks: list[dict]
results: Annotated[list[dict], operator.add]**Handoffs:**
class HandoffState(TypedDict):
messages: Annotated[list[BaseMessage], add_messages]
next_agent: str
context: dict**For detailed state patterns:** See references/state-management-patterns.md
# Validate
A comprehensive collection of agent-optimized skills for AI coding assistants working in the LangChain ecosystem.
Use the write_todos tool effectively for task planning and decomposition in Deep Agents. Use when users want to (1) implement…
Initialize, validate, and troubleshoot Deep Agents projects in Python or JavaScript using the `deepagents` package. Use when…
Implement LangGraph error handling with current v1 patterns. Use when users need to classify failures, add RetryPolicy for…
Initialize and configure LangGraph projects with proper structure, langgraph.json configuration, environment variables, and…
Design state schemas, implement reducers, configure persistence, and debug state issues for LangGraph applications. Use when…
Use this skill when you need to test or evaluate LangGraph/LangChain agents: writing unit or integration tests, generating test…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration