Official agent skill

Langgraph

by langchain-ai in langchain-ai/docs

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

OfficialMITAuto-check passedAI & LLM Engineering

Install Langgraph

skills CLI
$ npx skills add langchain-ai/docs --skill langgraph -a claude-code

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

GitHub CLI
$ gh skill install langchain-ai/docs 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/langchain-ai/docs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/.mintlify/skills/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
425
Token cost
~1.1k tokens
SKILL.md length
285 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

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

  • You need custom graph-based control flow
  • SKILL.md covers When to use, When NOT to use, Install and Quick reference, plus 4 more sections
  • Calls pip and npm; reaches reference.langchain.com
  • Human-in-the-loop

What it does

Langgraph is an agent skill from langchain-ai/docs, published by the product's own GitHub organization. Build stateful, durable agent workflows with LangGraph. Use when you need custom graph-based control flow, human-in-the-loop, persistence, or multi-agent orchestration.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Python 3.10+, Node.js 22+

It sits in AI & LLM Engineering, covering Building AI agents and Human-in-the-loop approvals. It works with LangGraph, LangChain and LangSmith. The repository describes itself as: Unified LangChain documentation. The licence is MIT.

When your agent uses it

  • You need custom graph-based control flow
  • Human-in-the-loop
  • Multi-agent orchestration

Example prompts

  • “/langgraph”

Requirements

  • Python 3
  • Node.js
  • Compatibility (from SKILL.md): Python 3.10+, Node.js 22+

What it can do on your machine

Read from SKILL.md and the folder at commit dcfc8b4. 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

    Shell commands in SKILL.md call:

    • pip
    • npm

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • reference.langchain.com

    Also links to:

    • docs.langchain.com

    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.

  • Compatibility

    Python 3.10+, Node.js 22+

    From compatibility in the SKILL.md frontmatter.

Context cost

Langgraph loads about 1.1k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 285 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from langchain-ai/docs at commit dcfc8b4, republished under its MIT licence (© langchain-ai). 285 words, ~1,060 tokens.

Download SKILL.mdSave it as .claude/skills/langgraph/SKILL.md (or your agent's skills folder).
name
langgraph
description
Build stateful, durable agent workflows with LangGraph. Use when you need custom graph-based control flow, human-in-the-loop, persistence, or multi-agent orchestration.
compatibility
Python 3.10+, Node.js 22+
license
MIT
metadata.author
langchain-ai
metadata.version
1.0

LangGraph

LangGraph is a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents. It provides durable execution, streaming, human-in-the-loop interactions, and time-travel debugging.

When to use

Use LangGraph when you need to:

  • Design custom agent workflows with explicit graph-based control flow
  • Add durable execution so agents survive failures and restarts
  • Implement human-in-the-loop with interrupts and approval steps
  • Build multi-agent systems with state shared across agents
  • Stream intermediate results from long-running agent tasks
  • Time-travel debug by replaying agent execution from any checkpoint

When NOT to use

  • For a simple tool-calling agent, use LangChain agents instead—less boilerplate for common patterns
  • For a batteries-included agent with planning and subagents, use Deep Agents instead
  • LangGraph is the orchestration layer—use it when you need fine-grained control over agent behavior

Install

bash
# Python
pip install -U langgraph

# JavaScript/TypeScript
npm install @langchain/langgraph @langchain/core

Quick reference

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

def my_node(state: MessagesState):
    return {"messages": [{"role": "ai", "content": "hello world"}]}

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

result = graph.invoke(
    {"messages": [{"role": "user", "content": "Hello!"}]}
)
Functional API (for simple pipelines)
python
from langgraph.func import entrypoint, task

@task
def step_one(input: str) -> str:
    return f"processed: {input}"

@entrypoint()
def pipeline(input: str) -> str:
    return step_one(input).result()
Add human-in-the-loop
python
from langgraph.types import interrupt

def human_approval(state: MessagesState):
    answer = interrupt({"question": "Approve this action?"})
    return {"messages": [{"role": "user", "content": answer}]}

Key concepts

ConceptDescription
StateGraphDefine nodes and edges that form your agent's control flow
MessagesStateBuilt-in state schema for chat-based agents
compile()Compile a graph builder into an executable graph
interrupt()Pause execution and wait for human input
CheckpointerPersist state for durable execution and time-travel
Graph API vs Functional APIGraph API for complex workflows; Functional API for linear pipelines

Key documentation

API reference

For SDK class and method details, use the LangChain API Reference site:

  • Browse: https://reference.langchain.com/python/langgraph
  • MCP server: https://reference.langchain.com/mcp
  • langchain—Core building blocks for models, tools, and simple agents
  • deep-agents—High-level agent harness built on LangGraph
  • langsmith—Trace, evaluate, and deploy your LangGraph agents

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

Files

Just SKILL.md in src/.mintlify/skills/langgraph of langchain-ai/docs.

Open the folder on GitHubat commit dcfc8b4

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 skilllangchain-ai/docs425—~1.1kAutomated safety check: PassMIT
Deep Agents Corelangchain-ai/langchain-skills1.3k1 repos~3.1kAutomated safety check: PassMIT
LangSmith Trace DebuggingComposioHQ/awesome-claude-skills77k9 repos~2.7kAutomated safety check: PassNone
Dive Into LangGraphluochang212/dive-into-langgraph457—~837Automated safety check: NotesCustom licence
LangGraph Decision Modelslangchain-ai/langchain-skills1.3k—~2.3kAutomated safety check: PassMIT
Langchain Dependencieslangchain-ai/langchain-skills1.3k1 repos~3.6kAutomated safety check: PassMIT

Similar skills

  • 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 starsUsed in 1 repo~3.1k tokens
    AI & LLM EngineeringAuto-check passed
  • LangSmith Trace Debugging

    ComposioHQ/awesome-claude-skills

    Debugs LangChain and LangGraph agents by pulling recent execution traces with the langsmith-fetch CLI and reporting errors, tool calls, timings and token use.

    77k GitHub starsUsed in 9 repos~2.7k tokens
    AI & LLM EngineeringAuto-check passed
  • 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
  • LangGraph Decision Models

    langchain-ai/langchain-skills

    Official

    Routes LangGraph agents with typed decision models that return probabilities, and finds LLM calls that only exist to produce a routing decision.

    1.3k GitHub stars~2.3k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Langchain Dependencies

    langchain-ai/langchain-skills

    Official

    INVOKE THIS SKILL when setting up a new project or when asked about package versions, installation, or dependency management for LangChain, LangGraph, LangSmith, or Deep Agents.

    1.3k GitHub starsUsed in 1 repo~3.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Deepagents Setup Configuration

    soba-labs/langchain-agent-skills

    Initialize, validate, and troubleshoot Deep Agents projects in Python or JavaScript using the deepagents package.

    107 GitHub stars~1.9k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from langchain-ai/docs

All 17 skills in this repo
  • Add Docs Page

    langchain-ai/docs

    Official

    Add, move, rename, or delete a page on the LangChain docs site.

    425 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Deep Agents

    langchain-ai/docs

    Official

    Build batteries-included agents with planning, context management, subagent delegation, and sandboxed execution.

    425 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Docs Code Samples

    langchain-ai/docs

    Official

    A skill your agent uses when migrating inline code samples from LangChain docs (MDX files) into external, testable code files that are extracted by this repo’s snippet scripts and used as Mintlify…

    425 GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Docs Edit

    langchain-ai/docs

    Official

    Edit a docs page that already has an open pull request, or revise a page in place.

    425 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Docs Restructure

    langchain-ai/docs

    Official

    Restructure documentation that spans several pages. An agent skill from langchain-ai/docs.

    425 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Docs Team Voice

    langchain-ai/docs

    Official

    Write or revise documentation prose so it reads like the rest of this site, in the docs team's shared voice.

    425 GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Questions about Langgraph

What does Langgraph do?

Build stateful, durable agent workflows with LangGraph. An agent skill from langchain-ai/docs. Langgraph is an agent skill from langchain-ai/docs, published by the product's own GitHub organization. Build stateful, durable agent workflows with LangGraph.

When should I use Langgraph?

Langgraph fits situations like: you need custom graph-based control flow; human-in-the-loop; multi-agent orchestration.

How do I install Langgraph in Claude Code?

Run `npx skills add langchain-ai/docs --skill langgraph -a claude-code`. Or copy the skill folder (src/.mintlify/skills/langgraph in langchain-ai/docs) 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 langchain-ai/docs --skill langgraph -a codex`. Or copy the skill folder (src/.mintlify/skills/langgraph in langchain-ai/docs) 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 langchain-ai/docs --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 the command-line tools its instructions call (pip and npm). Our summary lists: Python 3; Node.js. Compatibility (from SKILL.md): Python 3.10+, Node.js 22+.

Does Langgraph access the network?

SKILL.md names 2 domains. In commands or code: reference.langchain.com; the agent is likely to contact it when it follows the instructions. As links in the text: docs.langchain.com. 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. Review the folder before installing.

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 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Langgraph?

Skills that share tags, products or a category with Langgraph: Deep Agents Core (langchain-ai/langchain-skills, 1.3k stars), LangSmith Trace Debugging (ComposioHQ/awesome-claude-skills, 77k stars), Dive Into LangGraph (luochang212/dive-into-langgraph, 457 stars) and LangGraph Decision Models (langchain-ai/langchain-skills, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langgraph?

langchain-ai (a GitHub organization, an official publisher) maintains it in langchain-ai/docs, which has 425 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.

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