スキル一覧に戻る
MattMagg

langgraph

by MattMagg

Claude Code plugins for building AI agents across frameworks (Google ADK, OpenAI, and more)

2🍴 0📅 2026年1月18日
GitHubで見るManusで実行

SKILL.md


name: LangGraph description: Workflow patterns and gotchas for LangGraph. Directs to RAG for implementation.

LangGraph Workflow

When to Choose LangGraph

  • Need stateful, cyclic agent workflows
  • Building complex multi-step reasoning
  • Want conditional branching and loops
  • Require human-in-the-loop checkpoints

Decision Framework

Graph Pattern Selection

NeedPatternRAG Query
Sequential stepsLinear graph"simple sequential graph"
Decision branchingConditional edges"conditional edge routing"
Iteration/retryCycles"graph cycle loop"
Parallel executionParallel branches"parallel graph execution"
Human approvalCheckpoints"human in loop checkpoint"
Agent with toolsReAct pattern"react agent langgraph"

Query RAG: mcp__agentic-rag__query_sdk("pattern example", sdk="langgraph", mode="build")

Critical Gotchas

These cause debugging nightmares:

  1. State must be TypedDict - Not a regular dict; needs type annotations
  2. Node returns partial state - Return only keys you're updating, not full state
  3. END is special - Import it: from langgraph.graph import END
  4. Edges define flow - Forgetting an edge = node never reached
  5. Conditional edges return node names - Return the string name, not the function
  6. Compile before run - graph.compile() is required before invoke
  7. Checkpointer for memory - Without it, state resets each run
  8. State channels merge - Multiple updates to same key need reducer

Workflow: Building a LangGraph Agent

Step 1: State Definition

RAG Query: mcp__agentic-rag__query_sdk("TypedDict state definition", sdk="langgraph", mode="build")

Define your state schema with TypedDict and Annotated for reducers.

Step 2: Node Functions

RAG Query: mcp__agentic-rag__query_sdk("graph node function", sdk="langgraph", mode="build")

Each node takes state, returns partial state update.

Step 3: Graph Construction

RAG Query: mcp__agentic-rag__query_sdk("StateGraph add_node add_edge", sdk="langgraph", mode="build")

Step 4: Edge Definition

RAG Query: mcp__agentic-rag__query_sdk("conditional_edges routing", sdk="langgraph", mode="build")

Step 5: Compilation

RAG Query: mcp__agentic-rag__query_sdk("graph compile checkpointer", sdk="langgraph", mode="build")

Step 6: Execution

RAG Query: mcp__agentic-rag__query_sdk("compiled graph invoke stream", sdk="langgraph", mode="build")

Common Error Patterns

SymptomLikely CauseRAG Query
Node never runsMissing edge"graph edge definition"
State not updatingReturning wrong keys"node state return"
Infinite loopNo END condition"conditional edge END"
Type errorState not TypedDict"TypedDict state"
Memory lostNo checkpointer"MemorySaver persistence"
Merge conflictMissing reducer"Annotated reducer operator"

Graph Patterns

Decision Tree

Nodes for each decision point, conditional edges for branching. RAG Query: mcp__agentic-rag__query_sdk("decision tree graph", sdk="langgraph", mode="build")

ReAct Agent

Reason-Act-Observe loop with tool calling. RAG Query: mcp__agentic-rag__query_sdk("react agent pattern", sdk="langgraph", mode="build")

Plan-and-Execute

Planning node, execution loop, verification. RAG Query: mcp__agentic-rag__query_sdk("plan execute pattern", sdk="langgraph", mode="build")

Advanced Features

Query RAG when you need:

  • Streaming: "langgraph streaming events"
  • Subgraphs: "nested subgraph composition"
  • Human-in-loop: "interrupt checkpoint approval"
  • Time travel: "state history replay"
  • Parallel branches: "parallel node execution"

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です