Model or dataset
langchain-ai/langgraphjs avatar
langchain-ai/langgraphjs

LangGraph.js: stateful agent orchestration as a graph, in TypeScript

Framework to build resilient language agents as graphs.

3,325 stars592 forksTypeScriptMIT

At a glance

What is it?
LangGraph.js is a low-level TypeScript orchestration library for stateful agents. It gives you durable execution, interrupts and checkpointers, but only if you are willing to model your agent as a graph.
Who is it for?
Adopt LangGraph.js when your agent needs to survive process restarts, pause for a human, or expose its own streaming events, and when your team already writes TypeScript. Skip it for one-shot prompt-and-response calls where a plain model invocation is enough, and skip it if you want a framework that decides the agent loop for you.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What LangGraph.js solves, and who ends up using it

A single model call is easy. An agent that runs for minutes, calls tools, waits for approval, and must not repeat a side effect after a crash is not. LangGraph.js targets that second case. The README calls it a "low-level orchestration framework for building stateful agents" and lists durable execution, human-in-the-loop, comprehensive memory and debugging with LangSmith as the reasons to use it. The intended audience is a TypeScript engineer who already knows how to call a model and now needs the surrounding machinery: where state lives between steps, how a run resumes, how a human edits state mid-flight. The README also points readers who just want a working agent at Deep Agents, a higher-level package built on LangGraph. That pointer is honest about scope. LangGraph.js is infrastructure, not a ready-made assistant.

The graph model: nodes, edges and a state channel

The public interface draws inspiration from NetworkX, and the runtime is inspired by Pregel and Apache Beam, per the acknowledgements. In practice you define a graph of nodes, each node a function over a shared state object, and edges that decide which node runs next. Execution proceeds in steps: a node reads state, returns an update, and the graph merges that update before selecting the next node. Because the state transition is explicit, the framework can persist it. That is the mechanism behind durable execution: the README says agents "persist through failures and can run for extended periods, automatically resuming from exactly where they left off." The same explicit state is what makes interrupts possible, since a human can inspect and modify state "at any point during execution." The trade-off is real. You are writing a state machine, and a state machine has to be designed before it is useful. Teams that want the loop hidden from them will find this layer in the way.

Installing LangGraph.js and running a first graph

The README gives a two-package install. @langchain/langgraph carries the graph runtime and @langchain/core the base abstractions it builds on.

bash
npm install @langchain/langgraph @langchain/core

After that, the repository is laid out as a pnpm workspace with libs/, examples/ and docs/ at the top level, so the fastest way to see a working graph is to read the example directories rather than start from a blank file. The examples folder includes quickstart/, chatbots/, multi_agent/, plan-and-execute/, reflection/, rewoo/ and sql-agent/, plus UI examples for React, Vue, Svelte, Angular and a React transport variant. The package.json pins the toolchain: packageManager is [email protected] and engines requires node ^22.11 || ^24 || >=26. If your runtime is older than Node 22.11, the workspace tooling will not match what the repository declares. The README does not walk through a first graph in the text, so the concrete starting points are the quickstart example and the JavaScript docs site it links to.

Checkpointers, interrupts and where they break down

Durable execution is not free. It requires a checkpointer, a persistence backend that stores graph state between steps, and the README links a dedicated checkpointing API reference rather than describing the storage contract inline. That means the promise of resuming "from exactly where they left off" depends on infrastructure you supply and operate. If the checkpointer is unavailable when a node completes, the resume point is whatever was last written. Interrupts have a comparable shape: pausing for a human is straightforward to describe and harder to wire end to end, because the resuming caller must know which interrupt it is answering. The README does not document rollback of a partially applied state update, and it does not describe what happens to in-flight tool calls when an interrupt fires. Those are the questions to answer against the API reference before trusting the framework with a workflow that moves money or writes to a customer record.

Streaming and the SDK surface

LangGraph.js exposes its execution as a stream, and the repository links a separate streaming-cookbook project for examples. That is a meaningful separation: streaming behaviour is documented outside the main README, so the shape of emitted events is something you learn from the cookbook and the API reference at reference.langchain.com rather than from the front page. The repository also ships @langchain/langgraph-sdk as a workspace package, which is the client side of talking to a deployed graph. The UI examples in examples/ (ui-react, ui-vue, ui-svelte, ui-angular, ui-multimodal, ui-react-transport) exist to show that integration. Recent releases at the time of writing are version 1.0.36-rc.1 of @langchain/react, @langchain/svelte and @langchain/vue, all published on 2026-09-09, so the front-end bindings are still on release candidates while the core package tracks its own line.

When a graph framework is the wrong tool

The clearest wrong fit is a single-turn application. If your program takes user input, calls a model once, and returns text, a graph adds a state schema, a checkpointer decision and a deployment story for no benefit. The README's own tip points casual agent builders at Deep Agents instead, which is a signal that the low-level layer is not the default entry point. A second wrong fit is a team without TypeScript depth. The runtime is TypeScript, the examples are TypeScript, and the graph definition is code. There is a Python equivalent, LangGraph, with its own documentation, so a Python shop should look there rather than port. A third case is a workflow that is genuinely a queue of independent jobs. LangGraph.js models state that flows between steps; using it for fan-out work with no shared state means carrying the state machinery for nothing.

LangGraph.js against LangChain and Deep Agents

The comparison that matters is inside the same ecosystem. LangChain, per the README, "provides integrations and composable components to streamline LLM application development," while LangGraph "enables agent orchestration." Those are different jobs. LangChain gives you model wrappers, retrievers and tool abstractions; LangGraph gives you the control flow and the persistence around them. Deep Agents sits above LangGraph as a higher-level package for agents that plan, use subagents and work against file systems. So the decision is a layer choice, not a vendor choice: pick Deep Agents if the built-in planning loop matches your problem, LangGraph.js if you need to author the loop, and plain LangChain if you never needed a loop. The README notes LangGraph can be used without LangChain at all, which is worth remembering when the integration surface feels heavier than the problem.

Maintenance, licence and upgrade cost

The repository is not archived, and the last push was on 2026-09-09. The release cadence visible in the changelog data is frequent, with three front-end packages cut on the same day, and the repo uses Changesets for versioning and publishing, so version bumps are generated from committed changeset files. The workspace pins [email protected] and requires Node ^22.11 || ^24 || >=26, which means an upgrade of the library can also force a Node upgrade in your CI. The licence is MIT, which permits commercial use and modification; the repository's LICENSE file is the authority, and anything about your own distribution obligations belongs with your legal team rather than this article. The practical upgrade cost is the checkpointer and SDK packages moving in step with the core, since they are workspace-linked and overridden together in the root package.json.

Editorial conclusion

Adopt LangGraph.js when your agent needs to survive process restarts, pause for a human, or expose its own streaming events, and when your team already writes TypeScript. Skip it for one-shot prompt-and-response calls where a plain model invocation is enough, and skip it if you want a framework that decides the agent loop for you. Verify first that a checkpointer fits your persistence layer, that your Node version satisfies the engines field in package.json, and that the interrupt semantics match how your UI resumes a run.

Frequently asked questions

Can I use LangGraph.js in TypeScript?

Yes. The repository's primary language is TypeScript, the runtime is published as @langchain/langgraph on npm, and the examples and UI bindings are written in TypeScript and its front-end variants.

What problems does LangGraph.js solve?

It targets long-running, stateful agents rather than single model calls. The README lists durable execution that resumes where a run left off, human-in-the-loop inspection and modification of state, short-term and long-term memory, and debugging through LangSmith.

How does LangGraph.js work?

You define a graph of nodes over a shared state object and edges that select the next node. The acknowledgements state the runtime is inspired by Pregel and Apache Beam, and the public interface by NetworkX, which is what allows state to be persisted and resumed between steps.

What language is LangGraph.js written in?

TypeScript. The repository lists TypeScript as its primary language, and the root package.json declares TypeScript 4.9.5 or 5.4.5 in devDependencies. A separate Python library, LangGraph, exists for Python projects.

Official sources

  1. langchain-ai/langgraphjs on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/langchain-ai-langgraphjs.svg)](https://hysenlabs.com/projects/langchain-ai-langgraphjs)