langgraph

langgraph is a skill for Claude Code, Codex from magnus919/agent-skills. It costs 100 tokens per session (2,358 once invoked), scanned A, original, MIT.

A framework for building stateful AI workflows as graphs, where separate steps are connected by rules that control what happens next. It is designed for long-running and multi-agent systems, where several AI agents may cooperate.

In plain words
What is it for?
Building supervisor, swarm, or hierarchical agent systems; managing shared state and persistence; composing subworkflows; and debugging or evaluating production agent workflows.
Why use it?
It makes branching, cycles, parallel work, saved state, human approval, and recovery explicit instead of hiding them inside a single sequence of prompts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building supervisor, swarm, or hierarchical agent systems; managing shared state and persistence; composing subworkflows; and debugging or evaluating production agent workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/langgraph
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add magnus919/agent-skills --skill langgraph
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin langgraph/plugin install langgraph after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for langgraph

README.md
[![agentmods](https://agentmods.dev/badge/skills/magnus919/agent-skills/langgraph/github.svg)](https://agentmods.dev/skills/magnus919/agent-skills/langgraph)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/langgraph"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/langgraph/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for langgraph

Your own site · 80×15
<a href="https://agentmods.dev/skills/magnus919/agent-skills/langgraph"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/langgraph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00100 $0.02358
Opus 5 $0.00050 $0.01179
Sonnet 5 $0.00020 $0.00472
Haiku 4.5 $0.00010 $0.00236

Measured 6d ago against content hash 6c4bcc4c3bee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

langgraph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (assets/templates/subgraph-agent.py, assets/templates/supervisor-graph.py, assets/templates/swarm-graph.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

langgraph/SKILL.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

pip install langgraph langchain langchain-openai langsmith

Quick Start

Create your first LangGraph agent in under 10 lines:

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.

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 141 lines · 100 tokens per session scan A 6c4bcc4c3bee

Subscribe to this mod's changes

langgraph is a skill published in the GitHub repository magnus919/agent-skills (75 stars, last pushed today), licensed MIT. It adds 100 tokens to every session and 2,358 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.