LangChain Agent Fundamentals
langchain-ai/langchain-skills
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.
Implement LangGraph error handling with current v1 patterns.
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install soba-labs/langchain-agent-skills langgraph-error-handling --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/langgraph-error-handling .claude/skills/langgraph-error-handling && rm -rf skills-srcUse ~/.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/
Install the "langgraph-error-handling" agent skill from https://github.com/soba-labs/langchain-agent-skills/tree/main/skills/langgraph-error-handling into .claude/skills/langgraph-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langgraph-error-handling", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/soba-labs/langchain-agent-skills/tree/main/skills/langgraph-error-handlingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install soba-labs/langchain-agent-skills langgraph-error-handling --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/langgraph-error-handling .agents/skills/langgraph-error-handling && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "langgraph-error-handling" agent skill from https://github.com/soba-labs/langchain-agent-skills/tree/main/skills/langgraph-error-handling into .agents/skills/langgraph-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langgraph-error-handling", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install soba-labs/langchain-agent-skills langgraph-error-handling --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/langgraph-error-handling .cursor/skills/langgraph-error-handling && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "langgraph-error-handling" agent skill from https://github.com/soba-labs/langchain-agent-skills/tree/main/skills/langgraph-error-handling into .cursor/skills/langgraph-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langgraph-error-handling", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/soba-labs/langchain-agent-skills.git --path skills/langgraph-error-handling--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install soba-labs/langchain-agent-skills langgraph-error-handling --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/langgraph-error-handling .gemini/skills/langgraph-error-handling && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "langgraph-error-handling" agent skill from https://github.com/soba-labs/langchain-agent-skills/tree/main/skills/langgraph-error-handling into .gemini/skills/langgraph-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langgraph-error-handling", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install soba-labs/langchain-agent-skills langgraph-error-handlingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/langgraph-error-handling .github/skills/langgraph-error-handling && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "langgraph-error-handling" agent skill from https://github.com/soba-labs/langchain-agent-skills/tree/main/skills/langgraph-error-handling into .github/skills/langgraph-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langgraph-error-handling", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install soba-labs/langchain-agent-skills langgraph-error-handling --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/langgraph-error-handling .opencode/skills/langgraph-error-handling && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "langgraph-error-handling" agent skill from https://github.com/soba-labs/langchain-agent-skills/tree/main/skills/langgraph-error-handling into .opencode/skills/langgraph-error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langgraph-error-handling", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
langgraph-error-handlingImplement LangGraph error handling with current v1 patterns.
Langgraph Error Handling is an agent skill from soba-labs/langchain-agent-skills. Implement LangGraph error handling with current v1 patterns. Use when users need to classify failures, add RetryPolicy for transient issues, build LLM recovery loops with Command routing, add human-in-the-loop with interrupt()/resume, handle ToolNode errors, or choose a safe strategy between retry, recovery, and escalation.
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 24 other files, including scripts, reference files and assets (for example `assets/examples/human-loop-example/js/index.js`, `assets/examples/human-loop-example/js/package.json` and `assets/examples/human-loop-example/python/graph.py`).
It sits in AI & LLM Engineering, covering Building AI agents, Error handling and Human-in-the-loop approvals. It works with LangGraph. The repository describes itself as: A collection of agent-optimized LangChain, LangGraph and LangSmith skills for AI coding assistants. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit a2d4a10. It shows what the files ask for, not the result of running them.
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.
Ships 1 file in scripts/ (JavaScript and Python, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
uvFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Langgraph Error Handling loads about 1.5k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 88 tokens; SKILL.md has 387 words of instructions outside code blocks.
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.
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.
The full file from soba-labs/langchain-agent-skills at commit a2d4a10, republished under its MIT licence (© soba-labs). 387 words, ~1,488 tokens.
.claude/skills/langgraph-error-handling/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.RetryPolicy to flaky nodes (API, DB, model/tool calls)Command + error state + retry counters)interrupt() and resumeToolNode failuresUse this order:
429, timeout, 5xx, temporary DB lock) -> RetryPolicyCommandinterrupt() + resume| Error Type | Owner | Primary Mechanism |
|---|---|---|
| Transient | System | RetryPolicy |
| LLM-recoverable | LLM | State update + Command(goto=...) |
| User-fixable | Human | interrupt() + Command(resume=...) |
| Unexpected | Developer | Raise/log/debug |
For full taxonomy, load references/error-types.md.
from langgraph.types import RetryPolicy
builder.add_node(
"call_api",
call_api,
retry_policy=RetryPolicy(max_attempts=3, initial_interval=1.0),
)builder.addNode("callApi", callApi, {
retryPolicy: { maxAttempts: 3, initialInterval: 1.0 },
});Notes:
retry_on/retryOn for non-transient domains.Use MessagesState in Python for message state.
from typing import Literal
from typing_extensions import NotRequired
from langgraph.graph import MessagesState
from langgraph.types import Command
class State(MessagesState):
error: NotRequired[str]
retry_count: NotRequired[int]
def agent(state: State) -> Command[Literal["tool", "__end__"]]:
if state.get("retry_count", 0) >= 3:
return Command(goto="__end__")
if state.get("error"):
return Command(goto="tool")
return Command(goto="tool")import { StateGraph, Command, END } from "@langchain/langgraph";
// If a node returns Command in JS, add `ends` on addNode.
builder.addNode("agent", agentNode, { ends: ["tool", END] });from langgraph.types import interrupt, Command
def human_review(state):
approved = interrupt({
"question": "Proceed?",
"payload": state["pending_action"],
})
return Command(goto="execute" if approved else "cancel")
# resume
graph.invoke(Command(resume=True), config={"configurable": {"thread_id": "t-1"}})import { Command, interrupt } from "@langchain/langgraph";
const approved = interrupt({ question: "Proceed?" });
// later
await graph.invoke(new Command({ resume: true }), {
configurable: { thread_id: "t-1" },
});Requirements:
thread_id on resume.For deep HITL patterns, load references/human-escalation.md.
from langgraph.prebuilt import ToolNode
tool_node = ToolNode(tools, handle_tool_errors=True)
tool_node = ToolNode(tools, handle_tool_errors="Please try again.")
tool_node = ToolNode(tools, handle_tool_errors=(ValueError, TypeError))Use custom handlers when you need deterministic error shaping for model recovery. For broader tool-recovery design, load references/llm-recovery.md.
interrupt() re-runs the node on resume: side effects before interrupt must be idempotent, or moved after interrupt / separate node.Command routing requires ends metadata on addNode(...).max_attempts, plus state counters for recovery loops).scripts/classify_error.py: classify exception category and recommended handlingscripts/wrap_with_retry.py: generate boilerplate node wrappers with retry/recovery/escalation optionsRun from repo root:
uv run skills/langgraph-error-handling/scripts/classify_error.py TimeoutError --verbose
uv run skills/langgraph-error-handling/scripts/wrap_with_retry.py call_llm --with-llm-recoveryassets/examples/retry-example/: retry + recovery loop (Python and JS)assets/examples/human-loop-example/: interrupt/resume approval flow (Python and JS)references/error-types.md: error taxonomy and classification rulesreferences/retry-strategies.md: retry tuning, backoff, circuit-breaker-style patternsreferences/llm-recovery.md: recovery-loop and ToolNode strategiesreferences/human-escalation.md: human approval, interrupts, and escalation patterns| Symptom | Root Cause | Fix |
|---|---|---|
interrupt() fails at runtime | no checkpointer | compile with checkpointer |
| Resume starts new run | different thread_id | reuse same thread_id |
| JS Command route not taken | missing ends | add ends to addNode |
| Infinite loop | no termination counter/condition | add retry counter + terminal branch |
| Retry never triggers | exception excluded by retry filter | set explicit retry_on/retryOn |
© soba-labs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 15 other files (scripts, references, assets) in skills/langgraph-error-handling of soba-labs/langchain-agent-skills.
Open the folder on GitHubat commit a2d4a10
Langgraph Error Handling 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Langgraph Error Handling this skillsoba-labs/langchain-agent-skills | 107 | — | ~1.5k | Automated safety check: Pass | MIT | |
| LangChain Agent Fundamentalslangchain-ai/langchain-skills | 1.3k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Langgraphkid-sid/claude-spellbook | 189 | — | ~3.4k | Automated safety check: Pass | MIT | |
| Dive Into LangGraphluochang212/dive-into-langgraph | 457 | — | ~837 | Automated safety check: Notes | Custom licence | |
| Langgraph Human In The Looplangchain-ai/langchain-skills | 1.3k | 2 repos | ~4.1k | Automated safety check: Pass | MIT | |
| Deep Agents Corelangchain-ai/langchain-skills | 1.3k | 1 repos | ~3.1k | Automated safety check: Pass | MIT |
langchain-ai/langchain-skills
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.
kid-sid/claude-spellbook
A skill your agent uses when building or debugging LangGraph workflows — designing state graphs, adding conditional routing, wiring checkpointers, streaming tokens, implementing human-in-the-loop…
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.
langchain-ai/langchain-skills
INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph.
langchain-ai/langchain-skills
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.
langchain-ai/docs
Build stateful, durable agent workflows with LangGraph. An agent skill from langchain-ai/docs.
soba-labs/langchain-agent-skills
Use the writetodos tool effectively for task planning and decomposition in Deep Agents.
soba-labs/langchain-agent-skills
Initialize, validate, and troubleshoot Deep Agents projects in Python or JavaScript using the deepagents package.
soba-labs/langchain-agent-skills
Implement multi-agent coordination patterns (supervisor-subagent, router, orchestrator-worker, handoffs) for LangGraph applications.
soba-labs/langchain-agent-skills
Initialize and configure LangGraph projects with proper structure, langgraph.json configuration, environment variables, and dependency management.
soba-labs/langchain-agent-skills
Design state schemas, implement reducers, configure persistence, and debug state issues for LangGraph applications.
soba-labs/langchain-agent-skills
A skill your agent uses when you need to test or evaluate LangGraph/LangChain agents: writing unit or integration tests, generating test scaffolds, mocking LLM/tool behavior, running trajectory…
Works with
Categories
Implement LangGraph error handling with current v1 patterns. Langgraph Error Handling is an agent skill from soba-labs/langchain-agent-skills. Implement LangGraph error handling with current v1 patterns.
Langgraph Error Handling fits situations like: users need to classify failures; add RetryPolicy for transient issues; build LLM recovery loops with Command routing; add human-in-the-loop with interrupt()/resume.
Run `npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -a claude-code`. Or copy the skill folder (skills/langgraph-error-handling in soba-labs/langchain-agent-skills) into .claude/skills/langgraph-error-handling in your project. Claude Code loads it when a task matches its description.
Run `npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -a codex`. Or copy the skill folder (skills/langgraph-error-handling in soba-labs/langchain-agent-skills) into .agents/skills/langgraph-error-handling in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling -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-error-handling, .gemini/skills/langgraph-error-handling, .github/skills/langgraph-error-handling and .opencode/skills/langgraph-error-handling in your project.
Going by SKILL.md and its folder, Langgraph Error Handling needs JavaScript and Python for the scripts in its folder and the command-line tools its instructions call (uv). Our summary lists: Python 3; Node.js.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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.
Langgraph Error Handling is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6k 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 16k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Langgraph Error Handling: LangChain Agent Fundamentals (langchain-ai/langchain-skills, 1.3k stars), Langgraph (kid-sid/claude-spellbook, 189 stars), Dive Into LangGraph (luochang212/dive-into-langgraph, 457 stars) and Langgraph Human In The Loop (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.
soba-labs (a GitHub organization) maintains it in soba-labs/langchain-agent-skills, which has 107 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on August 17, 2026.
Source: soba-labs/langchain-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.