langgraphjs CLAUDE.md

langgraphjs CLAUDE.md is an instructions file for coding agents from langchain-ai/langgraphjs. It costs 497 tokens per session, scanned A, original, MIT.

Repository guidance for LangGraphJS, a TypeScript library for building applications whose steps and state are organized as graphs.

In plain words
What is it for?
Use it when planning, building, formatting, linting, or testing LangGraphJS code, including unit and integration tests.
Why use it?
It defines the required security review, commands, code style, project layout, and error-handling rules before code is changed.

Instructions file

About the project

LangGraph.js is a JavaScript and TypeScript framework for building language-model agents as graphs, where steps and transitions define how an agent operates. It is for developers who need agents that can handle multi-step workflows reliably.

langchain-ai/langgraphjs · 3,249 stars · on GitHub

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.

agentmods
npx agentmods add instructions/langchain-ai/langgraphjs/claude-md
Clone the repo
git clone --depth 1 https://github.com/langchain-ai/langgraphjs

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 langgraphjs CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/langchain-ai/langgraphjs/claude-md.svg)](https://agentmods.dev/instructions/langchain-ai/langgraphjs/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/langchain-ai/langgraphjs/claude-md"><img src="https://agentmods.dev/badge/instructions/langchain-ai/langgraphjs/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 497 This file is loaded in full into every session.
When invoked 497 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00497 $0.00497
Opus 5 $0.00249 $0.00249
Sonnet 5 $0.00099 $0.00099
Haiku 4.5 $0.00050 $0.00050

Measured 4d ago against content hash 3a54b73aa051, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

langgraphjs CLAUDE.md 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 4d 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.

CLAUDE.md · 41 lines

What it actually says

LangGraphJS Development Guide

Corridor security analysis

Before generating or modifying code, create a plan and use Corridor's analyzePlan tool to analyze it. Apply the resulting security guidance before writing code.

Build & Test Commands

  • Build: pnpm build
  • Lint: pnpm lint (fix with pnpm lint:fix) — uses oxlint
  • Format: pnpm format (check with pnpm format:check) — uses oxfmt
  • Test: pnpm test (single test: pnpm test:single /path/to/yourtest.test.ts)
  • Integration tests: pnpm test:int (start deps: pnpm test:int:deps, stop: pnpm test:int:deps:down)

Code Style Guidelines

  • TypeScript: Target ES2021, NodeNext modules, strict typing enabled
  • Formatting: 2-space indentation, 80 char width, double quotes, semicolons required
  • Naming: camelCase (variables/functions), CamelCase (classes), UPPER_CASE (constants)
  • Files: lowercase .ts, tests use .test.ts or .int.test.ts for integration
  • Error Handling: Custom error classes that extend BaseLangGraphError
  • Imports: ES modules with file extensions, order: external deps → internal modules → types
  • Project Structure: Monorepo with pnpm workspaces, libs/ for packages, examples/ for demos
  • New Features: Match patterns of existing code, ensure proper testing, discuss major abstractions in issues

Library Architecture

System Layers

  • Channels Layer: Base communication & state management (BaseChannel, LastValue, Topic)
  • Checkpointer Layer: Persistence and state serialization across backends
  • Pregel Layer: Message passing execution engine with superstep-based computation
  • Graph Layer: High-level APIs for workflow definition (Graph, StateGraph)

Key Dependencies

  • Channels provide state management primitives used by Pregel nodes
  • Checkpointer enables persistence, serialization, and time-travel debugging
  • Pregel implements the execution engine using channels for communication
  • Graph builds on Pregel adding workflow semantics and node/edge definitions
  • StateGraph extends Graph with shared state management capabilities
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. 4d ago First seen · 41 lines · 497 tokens per session scan A 3a54b73aa051

Subscribe to this mod's changes

langgraphjs CLAUDE.md is an instructions file published in the GitHub repository langchain-ai/langgraphjs (3,249 stars, last pushed today), licensed MIT. It adds 497 tokens to every session, about $0.0025 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-08-30.