Agent skill

Langgraph

by magnus919 in magnus919/agent-skills

Build multi-agent AI systems with LangGraph — the low-level orchestration framework for stateful, graph-based agent workflows.

MITAuto-check passedAI & LLM Engineering

Install Langgraph

skills CLI
$ npx skills add magnus919/agent-skills --skill langgraph -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install magnus919/agent-skills langgraph --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/magnus919/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/langgraph .claude/skills/langgraph && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
langgraph
GitHub stars
116
Token cost
~2.8k tokens
SKILL.md length
1,129 words
Files
17 (incl. scripts, references, assets)
Skills in repo
130
Repo updated
First seen
Licence
MIT

At a glance

Build multi-agent AI systems with LangGraph — the low-level orchestration framework for stateful, graph-based agent workflows.

  • Works in 4 steps: Use the Pattern Selection Guide below to… → Load the corresponding reference file… → Use the Choosing Your Starting Point… → …
  • Unrelated requests
  • SKILL.md covers Quick Start, When to Reach For This, Pattern Selection Guide and Choosing Your Starting Point, plus 4 more sections
  • Runs Python scripts from its folder

What it does

Langgraph is an agent skill from magnus919/agent-skills. Build multi-agent AI systems with LangGraph — the low-level orchestration framework for stateful, graph-based agent workflows. Covers supervisor, swarm, and hierarchical multi-agent patterns; subgraph composition; state management (checkpointers/stores); persistence; evals; and production debugging. Reach for this when designing agent architectures that need cycles, conditional branching, parallel execution, or human-in-the-loop patterns. Do not use this skill for unrelated requests; route to the nearest named…

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 21 other files, including scripts, reference files and assets (for example `README.md`, `assets/templates/subgraph-agent.py` and `assets/templates/supervisor-graph.py`).

It sits in AI & LLM Engineering, covering Building AI agents, State management and Human-in-the-loop approvals. It works with LangGraph and LangChain. The repository describes itself as: Curated collection of AI agent skills for Hermes and other agent frameworks. The licence is MIT.

When your agent uses it

  • Unrelated requests
  • Route to the nearest named specialist

Example prompts

  • “/langgraph”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Use the Pattern Selection Guide below to choose supervisor, swarm, or hierarchical architecture — each pattern links to its recommended…
  2. Load the corresponding reference file for the deep pattern walkthrough
  3. Use the Choosing Your Starting Point table below to pick scaffold, template, or reference based on your task
  4. For a complete runnable example matching your pattern, use the linked template in assets/templates/

What it can do on your machine

Read from SKILL.md and the folder at commit c545c2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python, from the files we listed), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Langgraph loads about 2.8k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 134 tokens; SKILL.md has 1,129 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~134
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from magnus919/agent-skills at commit c545c2b, republished under its MIT licence (© magnus919). 1,129 words, ~2,830 tokens.

Download SKILL.mdSave it as .claude/skills/langgraph/SKILL.md (or your agent's skills folder). This skill also uses 16 other files; get the full folder from GitHub.
name
langgraph
description
Build multi-agent AI systems with LangGraph — the low-level orchestration framework for stateful, graph-based agent workflows. Covers supervisor, swarm, and hierarchical multi-agent patterns; subgraph composition; state management (checkpointers/stores); persistence; evals; and production debugging. Reach for this when designing agent architectures that need cycles, conditional branching, parallel execution, or human-in-the-loop patterns. Do not use this skill for unrelated requests; route to the nearest named specialist.
license
MIT
metadata.source
LangGraph by LangChain Inc — https://langchain.com/langgraph
metadata.spec-version
1.0
metadata.version
1.0.2

LangGraph

LangGraph is LangChain's low-level orchestration framework for building stateful, long-running, multi-agent AI workflows using directed graph architectures (inspired by Pregel/Beam and NetworkX). It models agents as nodes in a graph, with edges controlling flow — enabling cycles, conditional branching, parallel execution, human-in-the-loop, and subgraph composition that linear chains cannot express.

This skill covers all major patterns for building and deploying LangGraph systems: core graph architecture, the three canonical multi-agent patterns (supervisor, swarm, hierarchical), persistence and state management, production debugging, and evaluation methodology.

Before you begin: Install dependencies:

bash
pip install langgraph langchain langchain-openai langsmith

Quick Start

Create your first LangGraph agent in under 10 lines:

python
from langgraph.graph import StateGraph, MessagesState, START, END

def hello_agent(state: MessagesState):
    return {"messages": [{"role": "ai", "content": "Hello, world!"}]}

graph = StateGraph(MessagesState)
graph.add_node("agent", hello_agent)
graph.add_edge(START, "agent")
graph.add_edge("agent", END)
graph = graph.compile()

graph.invoke({"messages": [{"role": "user", "content": "hi!"}]})

Next steps:

  1. Use the Pattern Selection Guide below to choose supervisor, swarm, or hierarchical architecture — each pattern links to its recommended template
  2. Load the corresponding reference file for the deep pattern walkthrough
  3. Use the Choosing Your Starting Point table below to pick scaffold, template, or reference based on your task
  4. For a complete runnable example matching your pattern, use the linked template in assets/templates/

Design Principles — These Govern Every Graph Decision

  1. State is the source of truth — all inter-node communication happens through state, not through side channels or global variables.
  2. Nodes are pure-ish — a node receives state, does work, returns updates. It should not depend on state that isn't passed to it.
  3. Reducers prevent conflicts — any state key written by multiple nodes in parallel MUST have a reducer.
  4. Start simple — a single agent with good prompts beats a multi-agent system with bad routing. Add agents only when a single prompt or toolset becomes unwieldy.
  5. Use Send() for dynamic fan-out — when you don't know how many workers you'll need at compile time, spawn them dynamically from the orchestrator node.
  6. Subgraph state isolation — subgraphs with different state schemas need a wrapper function to transform state at the boundary. Shared-schema subgraphs can be added directly as nodes.

When to Reach For This

ContextWhat to load
Building a new LangGraph workflow from scratchreferences/architecture.md — core concepts first
Designing a multi-agent routing systemreferences/multi-agent-supervisor.md or references/multi-agent-swarm.md — compare patterns
Composing nested agent teamsreferences/multi-agent-hierarchical.md — subgraph composition
Adding persistence, interrupts, or long-term memoryreferences/persistence.md — checkpointers and stores
Deploying to production or debugging failuresreferences/production.md — deployment, observability, failure modes
Setting up eval pipelines for routing accuracyreferences/evals.md — evaluation methodology
Diagnosing a specific failure (loop, context loss, crash)references/troubleshooting.md — known failure modes
Placing a typed System One judgment in a graphreferences/architecture.md; decision contract and calibration in System One, workflow authority and whole-task evidence in harness-engineering

Pattern Selection Guide

Your constraintPreferWhy
Routing accuracy > latencySupervisorCentralized routing node, focused prompt: ~94% accuracy
Latency is primary constraintSwarmDirect agent-to-agent handoffs, ~40% fewer LLM calls
Clear domain boundariesSwarmAgents rarely misroute, handoffs are crisp
Ambiguous domain boundariesSupervisorOverlapping concerns resolved by dedicated router
< 3 distinct domainsSkip multi-agentA specialized single agent is simpler
Multi-domain requests commonSwarmLatency savings compound across handoffs
Need centralized audit trailSupervisorEvery routing decision visible in traces
Nested team structuresHierarchicalSubgraphs as nodes, each team self-contained

Choosing Your Starting Point

Your goalStart withWhy
Build a project from scratch, need generated codescripts/lg-supervisor-scaffold.py or scripts/lg-swarm-scaffold.pyScaffolds generate complete project structure (state.py, agents.py, graph.py) with placeholders to fill in
Understand a complete, working exampleassets/templates/ matching your chosen patternTemplates are self-contained runnable files with all patterns wired — best for learning by reading
Deep dive into a pattern's internalsCorresponding reference in references/References explain tradeoffs, failure modes, and design rationale — best for customization
Debug or optimize an existing systemreferences/production.md or references/troubleshooting.mdProduction reference covers deployment + observability; troubleshooting reference covers symptom→fix tables

Core Primitives

LangGraph uses two APIs:

APIWhen to usePattern
Graph API (StateGraph)Full control over graph structure, conditional edges, subgraphsadd_node() + add_edge()/add_conditional_edges()
Functional API (@task + @entrypoint)Simpler linear workflows, less boilerplateDecorator-based, Pythonic

Both APIs produce the same compiled graph — choose based on how much control you need.

Show full SKILL.md (460 more words)Show less

Key Gotchas

  • Subgraph persistence defaults to per-invocation — each subgraph call starts fresh. Set checkpointer=True for per-thread memory, checkpointer=False for fully stateless.
  • Per-thread subgraphs cannot run in parallel — same-namespace checkpoint conflicts. Use ToolCallLimitMiddleware or disable parallel tool calls.
  • The supervisor bottleneck — every interaction requires a routing LLM call, even for obvious intents. Add a fast-path classifier (keyword matching or small model) for unambiguous requests.
  • Swarm ping-pong — no natural recursion guard. Track handoff_count in state and hard-limit at 3, then escalate to human or fallback agent.
  • Lost messages on handoff — Command.update must include paired messages from the specialist's tool-calling loop, or the next agent sees malformed history.
  • State access from parent to subgraph — subgraphs manage their own checkpoint namespace. Use Store for cross-graph-boundary data.
  • Checkpoint bloat — long conversations accumulate checkpoints. Prune periodically or set retention policies on DB-backed checkpointers.
  • No auto-load-on-install — skills aren't auto-discovered at session start by name mention. The agent must explicitly call skill_view(name='langgraph') to load this skill.

Reference Files

FileLoad when
references/architecture.mdYou need to understand LangGraph core concepts: graph structure, nodes, edges, state, the two APIs, and basic agent loop construction. Read this first if you're new to LangGraph.
references/multi-agent-supervisor.mdYou're designing a supervisor-based multi-agent system with a central routing node. Contains architecture, structured output routing, specialist wrappers, and full code examples.
references/multi-agent-swarm.mdYou're designing a swarm-based multi-agent system with direct agent-to-agent handoffs. Contains handoff tool patterns, Command-based routing, and comparative metrics vs supervisor.
references/multi-agent-hierarchical.mdYou're composing nested agent teams using subgraphs. Covers subgraph wiring (shared vs different state schemas), persistence modes, namespace isolation, and hierarchical team structures.
references/persistence.mdYou're adding checkpointer-based short-term memory or store-based long-term memory. Covers per-invocation vs per-thread vs stateless modes, checkpoint backends, and cross-thread memory patterns.
references/production.mdYou're deploying a LangGraph system to production. Covers Agent Server deployment, LangSmith observability, streaming patterns, and common production failure modes with fixes.
references/evals.mdYou're setting up evaluation pipelines for multi-agent systems. Covers routing accuracy, resolution coverage, LangSmith eval datasets, and LLM-as-judge evaluators.
references/troubleshooting.mdYou're debugging a specific LangGraph failure. Covers routing loops, context loss, checkpointer conflicts, token waste, and state inspection techniques.
assets/templates/supervisor-graph.pyRunnable supervisor example with billing, tech support, and account specialists — fast-path classifier, structured output routing, audit trail, and recursion guard.
assets/templates/swarm-graph.pyRunnable swarm example with triage agent plus 3 specialists — direct agent-to-agent handoffs via Command, recursion guard, and full traceability.
assets/templates/subgraph-agent.pyRunnable subgraph composition examples — all 3 wiring patterns (different state schemas, shared state keys, per-thread with namespace isolation).

Scripts

ScriptWhat it does
scripts/lg-supervisor-scaffold.pyGenerates a complete supervisor pattern project with state schema, routing agent, specialist nodes, and graph assembly
scripts/lg-swarm-scaffold.pyGenerates a complete swarm pattern project with handoff tools, triage agent, specialist agents, and conditional routing
scripts/lg-eval-generator.pyGenerates evaluation datasets and runs LangSmith evaluators for routing accuracy and resolution coverage

© magnus919, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 16 other files (scripts, references, assets) in langgraph of magnus919/agent-skills.

  • SKILL.md
  • README.md
  • assets/templates/subgraph-agent.py
  • assets/templates/supervisor-graph.py
  • assets/templates/swarm-graph.py
  • evals/evals.json
  • references/architecture.md
  • references/evals.md
  • references/multi-agent-hierarchical.md
  • references/multi-agent-supervisor.md
  • references/multi-agent-swarm.md
  • references/persistence.md
  • references/production.md
  • references/troubleshooting.md
  • scripts/lg-eval-generator.py
  • scripts/lg-supervisor-scaffold.py
  • … and 1 more

Open the folder on GitHubat commit c545c2b

Compare with similar skills

Langgraph next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Langgraph compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langgraph this skillmagnus919/agent-skills116—~2.8kAutomated safety check: PassMIT
Dive Into LangGraphluochang212/dive-into-langgraph457—~837Automated safety check: NotesCustom licence
Deep Agents Corelangchain-ai/langchain-skills1.3k—~3.1kAutomated safety check: PassMIT
Langgraphdavila7/claude-code-templates32k5 repos~1.9kAutomated safety check: PassMIT
Langgraphlangchain-ai/docs426—~1.1kAutomated safety check: PassMIT
LangChain Agent Fundamentalslangchain-ai/langchain-skills1.3k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Dive Into LangGraph

    luochang212/dive-into-langgraph

    A Chinese-language guide and reference for building agents with LangGraph 1.0, from a first ReAct agent through middleware, memory, MCP, RAG and web search.

    457 GitHub stars~837 tokensUpdated 27 days ago
    AI & LLM EngineeringAuto-check: notes
  • Deep Agents Core

    langchain-ai/langchain-skills

    Official

    Explains how to build agents with the Deep Agents framework: create_deep_agent, the built-in middleware, the harness, SKILL.md format and configuration options.

    1.3k GitHub stars~3.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Langgraph

    davila7/claude-code-templates

    Expert in LangGraph - the production-grade framework for building stateful, multi-actor AI applications.

    32k GitHub starsUsed in 5 repos~1.9k tokens
    AI & LLM EngineeringAuto-check passed
  • Langgraph

    langchain-ai/docs

    Official

    Build stateful, durable agent workflows with LangGraph. An agent skill from langchain-ai/docs.

    426 GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • LangChain Agent Fundamentals

    langchain-ai/langchain-skills

    Official

    Shows how to build LangChain agents with create_agent, define tools, add a checkpointer and use middleware for human approval and error handling, in Python and TypeScript.

    1.3k GitHub stars~3.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Langgraph

    sickn33/agentic-awesome-skills

    Expert in LangGraph - the production-grade framework for building stateful, multi-actor AI applications.

    47k GitHub starsUsed in 2 repos~639 tokens
    AI & LLM EngineeringAuto-check passed

More from magnus919/agent-skills

All 130 skills in this repo
  • Artifact Pyramids

    magnus919/agent-skills

    Organize durable agent research outputs as summaries, analysis, and evidence dossiers.

    116 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Ascii City Engine

    magnus919/agent-skills

    Build portable, first-person colored ASCII city engines and small GIS-derived city packs.

    116 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Color Management

    magnus919/agent-skills

    Manage color workflows with ICC profiles, working spaces, gamut mapping, and color science.

    116 GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Data Scientist

    magnus919/agent-skills

    A skill your agent uses for PhD-level expertise in data science, statistics, and machine learning: rigorous statistical analysis, experimental design, causal inference, advanced modeling, research…

    116 GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Docker Compose

    magnus919/agent-skills

    Use Docker Compose to define, run, debug, and harden multi-container applications.

    116 GitHub stars~2k tokensUpdated today
    Auto-check: notes
  • Fpga Development

    magnus919/agent-skills

    Design, review, simulate, and verify FPGA logic using explicit RTL contracts, clock and reset models, CDC analysis, timing constraints, and reproducible implementation evidence.

    116 GitHub stars~2.7k tokensUpdated today
    Auto-check passed

Questions about Langgraph

What does Langgraph do?

Build multi-agent AI systems with LangGraph — the low-level orchestration framework for stateful, graph-based agent workflows. Langgraph is an agent skill from magnus919/agent-skills. Build multi-agent AI systems with LangGraph — the low-level orchestration framework for stateful, graph-based agent workflows.

When should I use Langgraph?

Langgraph fits situations like: unrelated requests; route to the nearest named specialist.

How do I install Langgraph in Claude Code?

Run `npx skills add magnus919/agent-skills --skill langgraph -a claude-code`. Or copy the skill folder (langgraph in magnus919/agent-skills) into .claude/skills/langgraph in your project. Claude Code loads it when a task matches its description.

How do I install Langgraph in Codex?

Run `npx skills add magnus919/agent-skills --skill langgraph -a codex`. Or copy the skill folder (langgraph in magnus919/agent-skills) into .agents/skills/langgraph in your project. Codex loads it when a task matches its description.

Can I use Langgraph in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add magnus919/agent-skills --skill langgraph -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/langgraph, .gemini/skills/langgraph, .github/skills/langgraph and .opencode/skills/langgraph in your project.

What does Langgraph need to run?

Going by SKILL.md and its folder, Langgraph needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Langgraph access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Langgraph safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Langgraph use?

Langgraph is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Langgraph use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 15k tokens, read only when the agent opens those files.

What are the alternatives to Langgraph?

Skills that share tags, products or a category with Langgraph: Dive Into LangGraph (luochang212/dive-into-langgraph, 457 stars), Deep Agents Core (langchain-ai/langchain-skills, 1.3k stars), Langgraph (davila7/claude-code-templates, 32k stars) and Langgraph (langchain-ai/docs, 426 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langgraph?

magnus919 (a GitHub user) maintains it in magnus919/agent-skills, which has 116 GitHub stars. The repository holds 130 skills in this directory. The repository was last updated on October 8, 2026.

Source: magnus919/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.