Claude Code Tools

mastering-langgraph-agent-skill

github

Build stateful AI agents and agentic workflows with LangGraph in Python. Covers tool-using agents, branching workflows, memory persistence, human-in-the-loop, multi-agent systems, and production deployment. Supports 14+ AI coding agents via Agent Skill Standard.

Stars
⭐ 32
Last Updated
2026-04-30
Source
github

Mastering LangGraph Agent Skill

License: MIT Python 3.9+ LangGraph Agent Skill Standard SkillzWave

Build stateful AI agents and agentic workflows with LangGraph in Python. This skill provides comprehensive guidance for tool-using agents, branching workflows, conversation memory, human-in-the-loop oversight, multi-agent systems, and production deployment.

Table of Contents

Overview

This skill covers essential LangGraph patterns for building production-ready AI agents:

TopicDescription
Tool-Using AgentsLLM-tool loops that continue until task completion
Branching WorkflowsMulti-step pipelines with conditional routing
Persistence & MemoryCheckpointers for conversation context across sessions
Human-in-the-LoopPause workflows for human approval with interrupt()
Multi-Agent SystemsSupervisor and swarm patterns for agent collaboration
Production DeploymentLangGraph Platform, Docker, and self-hosted options
DebuggingTime-travel, LangSmith tracing, and testing strategies

Key Concepts

ConceptDescription
StateGraphCore graph construction API
Nodes & EdgesDefine steps and transitions
Conditional EdgesRoute based on state values
MessagesStateBuilt-in state for chat applications
CheckpointersEnable memory and time-travel
Command ObjectsControl flow from within nodes
ToolMessageHandle tool call results

Quick Start

from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import InMemorySaver
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage, AnyMessage
from typing_extensions import TypedDict, Annotated
import operator

# Define state with append-mode messages
class State(TypedDict):
    messages: Annotated[list[AnyMessage], operator.add]

# Create chat node
llm = ChatOpenAI(model="gpt-4")

def chat(state: State) -> dict:
    response = llm.invoke(state["messages"])
    return {"messages": [response]}

# Build and compile graph
graph = StateGraph(State)
graph.add_node("chat", chat)
graph.add_edge(START, "chat")
graph.add_edge("chat", END)

chain = graph.compile(checkpointer=InMemorySaver())

# Invoke with thread_id for memory persistence
result = chain.invoke(
    {"messages": [HumanMessage(content="Hello!")]},
    config={"configurable": {"thread_id": "user-123"}}
)

Reference Documentation

This skill includes detailed reference guides for each major topic:

ReferenceTopic
core-api.mdStateGraph, nodes, edges, compilation
tool-agent-pattern.mdReAct agents, tool integration
workflow-patterns.mdBranching, parallel execution, prompt chaining
persistence-memory.mdCheckpointers, thread_id, time-travel
hitl-patterns.mdinterrupt(), breakpoints, human approval
multi-agent-patterns.mdSupervisor, swarm, nested hierarchies
production-deployment.mdLangGraph Platform, Docker, RemoteGraph
debugging-monitoring.mdTesting, LangSmith, visualization
official-resources.md150+ official documentation links

Requirements

  • Python: >= 3.9
  • LangGraph: pip install langgraph
  • LLM Provider: OpenAI, Anthropic, or other supported providers

Installing with Skilz (Universal Installer)

The recommended way to install this skill across different AI coding agents is using the skilz universal installer. This skill supports the Agent Skill Standard, which means it works with 14+ coding agents including Claude Code, OpenAI Codex, Cursor, and Gemini.

Install Skilz

pip install skilz

Install from Git

You can use either -g or --git with HTTPS or SSH URLs:

# HTTPS URL
skilz install -g https://github.com/SpillwaveSolutions/mastering-langgraph-agent-skill

# SSH URL
skilz install --git git@github.com:SpillwaveSolutions/mastering-langgraph-agent-skill.git

Install from SkillzWave Marketplace

skilz install SpillwaveSolutions_mastering-langgraph-agent-skill/mastering-langgraph

Agent-Specific Installation

Claude Code

# Install to user home (available in all projects)
skilz install -g https://github.com/SpillwaveSolutions/mastering-langgraph-agent-skill

# Install to current project only
skilz install -g https://github.com/SpillwaveSolutions/mastering-langgraph-agent-skill --project

OpenCode

# User-level install
skilz install -g https://github.com/SpillwaveSolutions/mastering-langgraph-agent-skill --agent opencode

# Project-level install
skilz install -g https://github.com/SpillwaveSolutions/mastering-langgraph-agent-skill --project --agent opencode

Gemini CLI

# Project-level install (Gemini only supports project level)
skilz install -g https://github.com/SpillwaveSolutions/mastering-langgraph-agent-skill --agent gemini

OpenAI Codex

# User-level install
skilz install -g https://github.com/SpillwaveSolutions/mastering-langgraph-agent-skill --agent codex

# Project-level install
skilz install -g https://github.com/SpillwaveSolutions/mastering-langgraph-agent-skill --project --agent codex

Other Supported Agents

Skilz supports 14+ coding agents including Windsurf, Qwen Code, Aidr, and more. For the full list of supported platforms, visit:

License

MIT


SkillzWave - Largest Agentic Marketplace for AI Agent Skills | SpillWave - Leaders in AI Agent Development