langgraph-fundamentals
INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.
Install / Use
npx skills add langchain-ai/langchain-skills --skill langgraph-fundamentalsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Tags
Our assessment of langgraph-fundamentals
langgraph-fundamentals scores 82/100 on our quality scale, 2307th of 2,790 Automation skills we index.
Its SKILL.md is 5.7 KB long, well organised into 10 sections and no code examples: a solid amount of guidance for an agent.
With 1,246 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so langgraph-fundamentals is actively maintained.
- Our last check on 2026-11-07 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-03. Automated pattern scan on 2026-10-03. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
langgraph-fundamentals compared with similar skills
All 4 of these similar skills score higher than langgraph-fundamentals; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| langgraph-fundamentals (this skill)by langchain-ai | 82 | 1.2k | 54d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.7k | 7d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install langgraph-fundamentals?
- Run
npx skills add langchain-ai/langchain-skills --skill langgraph-fundamentals. The install tabs above show the steps for each supported agent. - Which AI agents does langgraph-fundamentals work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is langgraph-fundamentals safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is langgraph-fundamentals still maintained?
- The repository was last updated about 2 months ago, so langgraph-fundamentals is actively maintained.
Skill content
View source on GitHubname: 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>
Designing a LangGraph application
Follow these 5 steps when building a new graph:
- Map out discrete steps — sketch a flowchart of your workflow. Each step becomes a node.
- 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.
- Design your state — state is shared memory for all nodes. Store raw data, format prompts on-demand inside nodes.
- Build your nodes — implement each step as a function that takes state and returns partial updates.
- Wire it together — connect nodes with edges, add conditional routing, compile with a checkpointer if needed.
| Use LangGraph When | Use Alternatives When | |-------------------|----------------------| | Need fine-grained control over agent orchestration | Quick prototyping → LangChain agents | | Building complex workflows with branching/loops | Simple stateless workflows → LangChain direct | | Require human-in-the-loop, persistence | Batteries-included features → Deep Agents |
</when-to-use-langgraph>State Management
<state-update-strategies>| Need | Solution | Example | |------|----------|---------| | Overwrite value | No reducer (default) | Simple fields like counters | | Append to list | Reducer (operator.add / concat) | Message history, logs | | Custom logic | Custom reducer function | Complex 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>| Need | Edge Type | When to Use |
|------|-----------|-------------|
| Always go to same node | add_edge() | Fixed, deterministic flow |
| Route based on state | add_conditional_edges() | Dynamic branching |
| Update state AND route | Command | Combine logic in single node |
| Fan-out to multiple nodes | Send | Parallel processing with dynamic inputs |
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 nextresume: Value to resume afterinterrupt()— see human-in-the-loop skill
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.
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.
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.
| Mode | What it Streams | Use Case |
|------|----------------|----------|
| values | Full state after each step | Monitor complete state |
| updates | State deltas | Track incremental updates |
| messages | LLM tokens + metadata | Chat UIs |
| custom | User-defined data | Progress indicators |
Error Handling
Match the error type to the right handler:
<error-handling-table>| Error Type | Who Fixes | Strategy | Example |
|---|---|---|---|
| Transient (network, rate limits) | System | RetryPolicy(max_attempts=3) | add_node(..., retry_policy=...) |
| LLM-recoverable (tool failures) | LLM | ToolNode(tools, handle_tool_errors=True) | Error returned as ToolMessage |
| User-fixable (missing info) | Human | interrupt({"message": ...}) | Collect missing data (see HITL skill) |
| Unexpected | Developer | Let bubble up | raise |
Core boundaries
- Return partial state updates from nodes instead of mutating state directly.
- Route loops through a named node;
STARTis entry-only. - Define reducers for accumulated list fields; otherwise, the last write wins.
- Account for static edges when using
Commandwithgoto, 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:
- For Python, read references/python.md.
- For TypeScript, read references/typescript.md.
Read both only when the task covers both languages. For conceptual questions that require no code, do not load either reference.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
81.9k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Claude-Code-Game-Studios
39.7kTurn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Scrapling
103.6k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
