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.
npx skills add soba-labs/langchain-agent-skills --skill langgraph-state-managementgit clone --depth 1 https://github.com/soba-labs/langchain-agent-skillsWrote 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.
[](https://agentmods.dev/skills/soba-labs/langchain-agent-skills/langgraph-state-management)<a href="https://agentmods.dev/skills/soba-labs/langchain-agent-skills/langgraph-state-management"><img src="https://agentmods.dev/badge/skills/soba-labs/langchain-agent-skills/langgraph-state-management/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.
<a href="https://agentmods.dev/skills/soba-labs/langchain-agent-skills/langgraph-state-management"><img src="https://agentmods.dev/badge/skills/soba-labs/langchain-agent-skills/langgraph-state-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00167 | $0.03074 |
| Opus 5.5 | $0.00067 | $0.01230 |
| Sonnet 5.5 | $0.00033 | $0.00615 |
| Haiku 4.5 | $0.00017 | $0.00307 |
Grade A, and why
langgraph-state-management 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 2mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 389 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LangGraph State Management
State Design Workflow
Follow this workflow when designing or modifying state for a LangGraph application:
- Identify data requirements — What data flows through the graph?
- Choose a schema pattern — Match the use case to a template
- Define reducers — Decide how concurrent updates merge
- Configure persistence — Select and set up a checkpointer
- Validate and test — Run schema validation and reducer tests
Quick Start
Python — Minimal Chat State
from langgraph.graph import StateGraph, START, END, MessagesState
from langchain_core.messages import AIMessage
class State(MessagesState):
pass
def chat_node(state: State):
return {"messages": [AIMessage(content="Hello!")]}
graph = StateGraph(State).add_node("chat", chat_node)
graph.add_edge(START, "chat").add_edge("chat", END)
app = graph.compile()
Python — Subclass MessagesState
For convenience, subclass the built-in MessagesState (includes messages with add_messages reducer):
from langgraph.graph import MessagesState
class State(MessagesState):
documents: list[str]
query: str
TypeScript — StateSchema with Zod
import { StateGraph, StateSchema, MessagesValue, ReducedValue, START, END } from "@langchain/langgraph";
import { AIMessage } from "@langchain/core/messages";
import { z } from "zod/v4";
const State = new StateSchema({
messages: MessagesValue,
documents: z.array(z.string()).default(() => []),
count: new ReducedValue(
z.number().default(0),
{ reducer: (current, update) => current + update }
),
});
const graph = new StateGraph(State)
.addNode("chat", (state) => ({ messages: [new AIMessage("Hello!")] }))
.addEdge(START, "chat")
.addEdge("chat", END)
.compile();
Schema Patterns
Choose the pattern matching the application type. See references/schema-patterns.md for complete examples with both Python and TypeScript.
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/chat_state.py 225 B runs code
- assets/research_state.py 561 B runs code
- assets/tool_calling_state.py 449 B runs code
- assets/workflow_state.py 517 B runs code
- references/persistence-backends.md 18 KB
- references/reducers.md 19 KB
- references/schema-patterns.md 11 KB
- references/state-debugging.md 19 KB
- references/state-typing.md 17 KB
- scripts/inspect_checkpoints.py 10 KB runs code
- scripts/migrate_state.py 9.3 KB runs code
- scripts/test_reducers.py 11 KB runs code
- scripts/validate_state_schema.py 12 KB runs code
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.
- 2mo ago First seen · 389 lines · 167 tokens per session scan A f1483a25d7b4
langgraph-state-management is a skill published in the GitHub repository soba-labs/langchain-agent-skills (106 stars, last pushed 18d ago), licensed MIT. It adds 167 tokens to every session and 3,074 once invoked, about $0.0007 per session on Opus 5.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-08-30.
langgraph-state-management compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| langgraph-state-managementsoba-labs/langchain-agent-skills | Skill | 106 | 18d ago | MIT | A | 167 | Claude Code |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 69k | yesterday | Apache-2.0 | A | 217 | Claude Code, Codex |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.0k | today | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 529 | 3d ago | MIT | A | 105 | Claude Code, Codex |
| migrate-segw-to-raparc-mcp/arc-1 | Skill | 253 | yesterday | MIT | A | 106 | Claude Code |