Official agent skill

Langgraph Fundamentals

by langchain-ai in langchain-ai/langchain-skills

INVOKE THIS SKILL when writing ANY LangGraph code. An agent skill from langchain-ai/langchain-skills.

OfficialMITAuto-check passedAI & LLM Engineering

Install Langgraph Fundamentals

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

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

GitHub CLI
$ gh skill install langchain-ai/langchain-skills langgraph-fundamentals --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/langchain-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/config/skills/langgraph-fundamentals .claude/skills/langgraph-fundamentals && 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-fundamentals
GitHub stars
1.3k
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
640 words
Files
3 (incl. references)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

INVOKE THIS SKILL when writing ANY LangGraph code. An agent skill from langchain-ai/langchain-skills.

  • Works in 5 steps: Map out discrete steps — sketch a… → Identify what each step does —… → Design your state — state is shared… → …
  • Tasks that involve Building AI agents
  • SKILL.md covers State Management, Nodes, Edges and Command, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Langgraph Fundamentals is an agent skill from langchain-ai/langchain-skills, published by the product's own GitHub organization. INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/python.md` and `references/typescript.md`).

It sits in AI & LLM Engineering, covering Building AI agents. It works with LangGraph and LangChain. The licence is MIT.

When your agent uses it

  • Tasks that involve Building AI agents

Example prompts

  • “/langgraph-fundamentals”

Workflow steps

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

  1. Map out discrete steps — sketch a flowchart of your workflow. Each step becomes a node.
  2. Identify what each step does — categorize nodes: LLM step, data step, action step, or user input step. For each, determine static context…
  3. Design your state — state is shared memory for all nodes. Store raw data, format prompts on-demand inside nodes.
  4. Build your nodes — implement each step as a function that takes state and returns partial updates.
  5. Wire it together — connect nodes with edges, add conditional routing, compile with a checkpointer if needed.

What it can do on your machine

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

    No scripts in the folder and no shell commands in SKILL.md.

    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 Fundamentals loads about 1.5k tokens when it runs, and up to ~6k if it reads all its reference files. Until then it costs about 44 tokens; SKILL.md has 640 words of instructions outside code blocks.

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

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/langchain-skills at commit 16a992f, republished under its MIT licence (© langchain-ai). 640 words, ~1,471 tokens.

Download SKILL.mdSave it as .claude/skills/langgraph-fundamentals/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
langgraph-fundamentals
description
INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.
<overview>
LangGraph models agent workflows as **directed graphs**:
  • StateGraph: Main class for building stateful graphs
  • Nodes: Functions that perform work and update state
  • Edges: Define execution order (static or conditional)
  • START/END: Special nodes marking entry and exit points
  • State with Reducers: Control how state updates are merged

Graphs must be compile()d before execution. </overview>

<design-methodology>
Designing a LangGraph application

Follow these 5 steps when building a new graph:

  1. Map out discrete steps — sketch a flowchart of your workflow. Each step becomes a node.
  2. Identify what each step does — categorize nodes: LLM step, data step, action step, or user input step. For each, determine static context (prompt), dynamic context (from state), retry strategy, and desired outcome.
  3. Design your state — state is shared memory for all nodes. Store raw data, format prompts on-demand inside nodes.
  4. Build your nodes — implement each step as a function that takes state and returns partial updates.
  5. Wire it together — connect nodes with edges, add conditional routing, compile with a checkpointer if needed.
</design-methodology>
<when-to-use-langgraph>
Use LangGraph WhenUse Alternatives When
Need fine-grained control over agent orchestrationQuick prototyping → LangChain agents
Building complex workflows with branching/loopsSimple stateless workflows → LangChain direct
Require human-in-the-loop, persistenceBatteries-included features → Deep Agents
</when-to-use-langgraph>

State Management

<state-update-strategies>
NeedSolutionExample
Overwrite valueNo reducer (default)Simple fields like counters
Append to listReducer (operator.add / concat)Message history, logs
Custom logicCustom reducer functionComplex merging
</state-update-strategies>

Nodes

<node-function-signatures>

Node functions return partial state updates. Signatures for configuration and runtime access differ by language; use the applicable implementation reference.

</node-function-signatures>

Edges

<edge-type-selection>
NeedEdge TypeWhen to Use
Always go to same nodeadd_edge()Fixed, deterministic flow
Route based on stateadd_conditional_edges()Dynamic branching
Update state AND routeCommandCombine logic in single node
Fan-out to multiple nodesSendParallel processing with dynamic inputs
</edge-type-selection>

Command

Command combines state updates and routing in a single return value. Fields:

  • update: State updates to apply (like returning a dict from a node)
  • goto: Node name(s) to navigate to next
  • resume: Value to resume after interrupt() — see human-in-the-loop skill
<command-return-type-annotations>

Python: Use Command[Literal["node_a", "node_b"]] as the return type annotation to declare valid goto destinations.

TypeScript: Pass { ends: ["node_a", "node_b"] } as the third argument to addNode to declare valid goto destinations.

</command-return-type-annotations>
<warning-command-static-edges>

Warning: Command only adds dynamic edges — static edges defined with add_edge / addEdge still execute. If node_a returns Command(goto="node_c") and you also have graph.add_edge("node_a", "node_b"), both node_b and node_c will run.

</warning-command-static-edges>

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

Send API

Fan-out with Send: return [Send("worker", {...})] from a conditional edge to spawn parallel workers. Requires a reducer on the results field.


Running Graphs: Invoke and Stream

<invoke-basics>

Call graph.invoke(input, config) to run a graph to completion and return the final state.

</invoke-basics>
<stream-mode-selection>
ModeWhat it StreamsUse Case
valuesFull state after each stepMonitor complete state
updatesState deltasTrack incremental updates
messagesLLM tokens + metadataChat UIs
customUser-defined dataProgress indicators
</stream-mode-selection>

Error Handling

Match the error type to the right handler:

<error-handling-table>
Error TypeWho FixesStrategyExample
Transient (network, rate limits)SystemRetryPolicy(max_attempts=3)add_node(..., retry_policy=...)
LLM-recoverable (tool failures)LLMToolNode(tools, handle_tool_errors=True)Error returned as ToolMessage
User-fixable (missing info)Humaninterrupt({"message": ...})Collect missing data (see HITL skill)
UnexpectedDeveloperLet bubble upraise
</error-handling-table>

Core boundaries

  • Return partial state updates from nodes instead of mutating state directly.
  • Route loops through a named node; START is entry-only.
  • Define reducers for accumulated list fields; otherwise, the last write wins.
  • Account for static edges when using Command with goto, because both routes execute.

Implementation references

If writing, modifying, or debugging LangGraph code, determine the project's language from its existing files, then read the applicable reference before implementing:

Read both only when the task covers both languages. For conceptual questions that require no code, do not load either reference.

© 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

SKILL.md and 2 other files (references) in config/skills/langgraph-fundamentals of langchain-ai/langchain-skills.

  • SKILL.md
  • references/python.md
  • references/typescript.md

Open the folder on GitHubat commit 16a992f

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in langchain-ai/langchain-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Langgraph Fundamentals 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 Fundamentals compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langgraph Fundamentals this skilllangchain-ai/langchain-skills1.3k1 repos~1.5kAutomated safety check: PassMIT
Mem0 Platform SDKmem0ai/mem067k1 repos~2.2kAutomated safety check: PassApache-2.0
LangSmith Trace DebuggingComposioHQ/awesome-claude-skills77k8 repos~2.7kAutomated safety check: PassNone
Add Example AgentGetBindu/Bindu10k—~1.1kAutomated safety check: NotesCustom licence
Failproof AI SDK IntegrationFailproofAI/failproofai5.3k—~6kAutomated safety check: PassCustom licence
Edgeone Makers MigrationTencentEdgeOne/edgeone-makers-tools1.9k1 repos~4.1kAutomated safety check: PassMIT

Similar skills

  • Adds persistent memory to AI apps with the Mem0 Python and TypeScript SDKs: store, search, update and delete user memories, with framework integrations.

    67k GitHub starsUsed in 1 repo~2.2k 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 8 repos~2.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Example Agent

    GetBindu/Bindu

    Add a new self-contained example agent under examples/. An agent skill from GetBindu/Bindu.

    10k GitHub stars~1.1k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Failproof AI SDK Integration

    FailproofAI/failproofai

    Helps instrument a custom Python or TypeScript agent to record events for Failproof AI, verify what gets written, and run an evaluator worker that scores the runs.

    5.3k GitHub stars~6k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Edgeone Makers Migration

    TencentEdgeOne/edgeone-makers-tools

    Migrate existing AI agent projects (LangChain, LangGraph, OpenAI Agents SDK, Claude Agent SDK, CrewAI) to EdgeOne Makers platform conventions.

    1.9k GitHub starsUsed in 1 repo~4.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Omnigent Framework Detection

    omnigent-ai/omnigent

    Scans Python agent code for framework imports and recommends the matching Omnigent executor type, or says when the framework is not natively supported yet.

    11k GitHub stars~610 tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from langchain-ai/langchain-skills

All 22 skills in this repo
  • Agent Eval Engineering

    langchain-ai/langchain-skills

    Official

    Builds agent evaluations in stages: inspect the repository and traces, agree a Task Spec with you, then build, audit and run a Harbor task with an independent verifier.

    1.3k GitHub stars~4k tokensUpdated 2 days ago
    Auto-check passed
  • Swarm Parallel Dispatch

    langchain-ai/langchain-skills

    Official

    Fans a list of independent items out to subagents in parallel, merges the results back into a table and supports retrying only the rows that failed.

    1.3k GitHub stars~3k tokensUpdated 2 days ago
    Auto-check passed
  • Langgraph Human In The Loop

    langchain-ai/langchain-skills

    Official

    INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph.

    1.3k GitHub starsUsed in 1 repo~4.1k tokens
    Auto-check passed
  • 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
    Auto-check passed
  • Langgraph Persistence

    langchain-ai/langchain-skills

    Official

    INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping.

    1.3k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed
  • 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 2 days ago
    Auto-check passed

Questions about Langgraph Fundamentals

What does Langgraph Fundamentals do?

INVOKE THIS SKILL when writing ANY LangGraph code. An agent skill from langchain-ai/langchain-skills. Langgraph Fundamentals is an agent skill from langchain-ai/langchain-skills, published by the product's own GitHub organization. INVOKE THIS SKILL when writing ANY LangGraph code.

When should I use Langgraph Fundamentals?

Langgraph Fundamentals fits situations like: tasks that involve Building AI agents.

How do I install Langgraph Fundamentals in Claude Code?

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

How do I install Langgraph Fundamentals in Codex?

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

Can I use Langgraph Fundamentals 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/langchain-skills --skill langgraph-fundamentals -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-fundamentals, .gemini/skills/langgraph-fundamentals, .github/skills/langgraph-fundamentals and .opencode/skills/langgraph-fundamentals in your project.

What does Langgraph Fundamentals need to run?

SKILL.md names no scripts, command-line tools or credentials: Langgraph Fundamentals is instructions for the agent only.

Does Langgraph Fundamentals 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 Fundamentals 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 Fundamentals use?

Langgraph Fundamentals is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Langgraph Fundamentals use?

About 1.5k tokens (SKILL.md is roughly 5.9k 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 4.6k tokens, read only when the agent opens those files.

What are the alternatives to Langgraph Fundamentals?

Skills that share tags, products or a category with Langgraph Fundamentals: Mem0 Platform SDK (mem0ai/mem0, 67k stars), LangSmith Trace Debugging (ComposioHQ/awesome-claude-skills, 77k stars), Add Example Agent (GetBindu/Bindu, 10k stars) and Failproof AI SDK Integration (FailproofAI/failproofai, 5.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langgraph Fundamentals?

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

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