# LangGraph.js: features, protocols, quickstart

## TL;DR

LangGraph.js is the JavaScript and TypeScript edition of LangGraph from LangChain Inc., an MIT-licensed low-level runtime that models agents as graphs of nodes over shared state, with checkpointing, interrupts for human review and long-term stores. It suits TypeScript teams that want explicit control over multi-step or multi-agent flows instead of a prebuilt agent loop.

## Key facts

| Field | Value |
| --- | --- |
| Type | Framework |
| Languages / SDKs | TypeScript, JavaScript |
| License | MIT |
| Pricing model | [Open core](https://www.langchain.com/pricing) |
| Orchestration pattern | Graph |
| GitHub stars | 3,327 (as of 2026-09-30) |
| GitHub forks | 593 |
| Last push | 2026-09-29 |
| Latest release | @langchain/langgraph-cli@1.5.1 |
| Repository | [langchain-ai/langgraphjs](https://github.com/langchain-ai/langgraphjs) |
| Website | [www.langchain.com](https://www.langchain.com/langgraph) |
| Documentation | [docs.langchain.com](https://docs.langchain.com/oss/javascript/langgraph/overview) |
| Last verified | 2026-09-30 |

## Key features

- Graph API: `StateGraph` over a `StateSchema` (for example Zod fields), with nodes, fixed or conditional edges, and `Command` for routing from inside a node. ([source](https://docs.langchain.com/oss/javascript/langgraph/graph-api))
- Functional API that brings checkpointing and interrupts to code written with ordinary functions and control flow. ([source](https://docs.langchain.com/oss/javascript/langgraph/functional-api))
- Checkpointers that save thread state at each step, with official savers for SQLite, PostgreSQL, MongoDB and Redis besides the in-memory `MemorySaver`. ([source](https://docs.langchain.com/oss/javascript/langgraph/checkpointers))
- `interrupt()` pauses a node and returns a payload under `__interrupt__`; `new Command({ resume })` continues the same thread. ([source](https://docs.langchain.com/oss/javascript/langgraph/interrupts))
- Time travel: replay a thread from an earlier checkpoint or fork it with changed state. ([source](https://docs.langchain.com/oss/javascript/langgraph/use-time-travel))
- Stores for long-term memory shared across threads, separate from per-thread checkpoints. ([source](https://docs.langchain.com/oss/javascript/langgraph/stores))
- Subgraphs: a compiled graph can serve as a node of another graph, the building block for multi-agent designs. ([source](https://docs.langchain.com/oss/javascript/langgraph/use-subgraphs))
- Add-on packages `@langchain/langgraph-supervisor` and `@langchain/langgraph-swarm` for supervisor and swarm-style agent teams. ([source](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-supervisor/README.md))

## Architecture and orchestration pattern

Pattern: Graph.

A LangGraph.js program is a `StateGraph`: a state schema, nodes that return partial state updates, and edges that choose the next node, either fixed or conditional. A node can also return a `Command` that updates state and names the next node. The runtime follows the Pregel model of super-steps, so nodes on parallel branches run in the same step. A Functional API offers the same runtime for code written with plain functions.

The library has no agent-role abstraction of its own. Multi-agent systems are built by composing graphs, since a compiled graph can be a node in a parent graph, or by using the supervisor and swarm add-on packages in the same repository. LangChain's JavaScript multi-agent guides (subagents, handoffs, router) run on this runtime, and its `createAgent` loop is built on LangGraph.

Persistence has two layers. Checkpointers save a thread's state after every step under a `thread_id`, which enables resumption, replay and forking; official savers cover SQLite, PostgreSQL, MongoDB and Redis. Stores keep data across threads for long-term memory. `MemorySaver` and `MemoryStore` are intended for development.

### Human in the loop

Any node can call `interrupt(value)`. The run stops, the checkpointer saves state, and the payload is returned to the caller in the `__interrupt__` field. The caller resumes by invoking the graph again on the same `thread_id` with `new Command({ resume: value })`, which becomes the return value of `interrupt()`. The docs cover approve or reject gates, review-and-edit of generated content, and validation of human input. Since v1, `StateGraph` can declare typed interrupts in its constructor.

A checkpointer and a thread ID are required. On resume the node runs again from its first line, so side effects placed before the interrupt should be idempotent, and loops that call `interrupt()` repeatedly inside one node replay earlier iterations. Past checkpoints can be replayed or forked with edited state through time travel.

## Protocols

| Protocol | Support | Evidence | Note |
| --- | --- | --- | --- |
| MCP | Partial (checked 2026-09-30) | [link](https://docs.langchain.com/oss/javascript/langchain/mcp) | Client only, through the companion LangChain package `@langchain/mcp-adapters` (`MultiServerMCPClient`), whose docs page is labeled legacy; LangGraph.js has no MCP code of its own, and its JS dev server ignores local MCP settings. |
| A2A | Unknown (checked 2026-09-30) | — | LangSmith's Agent Server A2A endpoint is documented against the Python `langgraph-api` package; no A2A route was found in the JS `langgraph-api` source, only an example stream transformer that formats events in A2A shape. |
| AG-UI | Partial (checked 2026-09-30) | [link](https://docs.langchain.com/oss/javascript/langchain/frontend/integrations/copilotkit) | LangChain's JS docs mount CopilotKit's runtime with `LangGraphAgent` next to a LangGraph deployment so it speaks AG-UI; the bridge is CopilotKit's package, not part of LangGraph.js, and the AG-UI README lists LangChain under partnerships. |

## Best for

- TypeScript projects that need explicit, typed control over each step and branch of an agent
- Flows that must pause for a human decision and resume later from saved state
- Keeping agent state in your own SQLite, PostgreSQL, MongoDB or Redis database
- Teams that already use LangGraph in Python and want the same model in Node.js

## Not for

- Getting a basic tool-calling agent running quickly; the docs point to LangChain's prebuilt agents or Deep Agents for that
- Python codebases, which use the separate LangGraph Python library
- Teams that want role and task abstractions supplied by the framework

## Quickstart

```sh
npm install @langchain/langgraph @langchain/core
```

Install not yet verified by this site.

```ts
import { Command, MemorySaver, START, END, StateGraph, StateSchema, interrupt } from "@langchain/langgraph";
import * as z from "zod";

const State = new StateSchema({ draft: z.string(), approved: z.boolean().nullable() });

const graph = new StateGraph(State)
  .addNode("write", () => ({ draft: "Refund order 123" }))
  .addNode("review", (state) => ({ approved: interrupt({ check: state.draft }) as boolean }))
  .addEdge(START, "write")
  .addEdge("write", "review")
  .addEdge("review", END)
  .compile({ checkpointer: new MemorySaver() });

const config = { configurable: { thread_id: "t1" } };
const first = await graph.invoke({ draft: "", approved: null }, config);
console.log(first.__interrupt__); // waiting for a reviewer
const done = await graph.invoke(new Command({ resume: true }), config);
console.log(done.approved); // true
```

### Common pitfalls

- `@langchain/langgraph` declares `node >=18` and needs `@langchain/core` (^1.1.48) and `zod` (^3.25.32 or ^4.2.0) as peer dependencies.
- Model providers are separate packages; the docs use LangChain integrations such as `langchain` plus a provider package and its API key.
- `interrupt()` only works with a checkpointer and a `thread_id` in the config; `MemorySaver` loses state on restart.
- On resume the interrupted node re-runs from the top, so keep side effects after `interrupt()` or make them idempotent.
- v1 deprecated the prebuilt `createReactAgent` in favour of LangChain's `createAgent`; the swarm add-on still only supports `createReactAgent`.

Official quickstart: https://docs.langchain.com/oss/javascript/langgraph/install

## Pros

- v1 kept graph primitives and the execution model unchanged, so upgrades are mostly package bumps. ([source](https://docs.langchain.com/oss/javascript/releases/langgraph-v1))
- Official checkpoint savers for SQLite, PostgreSQL, MongoDB and Redis ship from the same project. ([source](https://docs.langchain.com/oss/javascript/langgraph/checkpointers))
- Interrupts can be declared with types in the `StateGraph` constructor, which constrains payloads and resume values. ([source](https://docs.langchain.com/oss/javascript/releases/langgraph-v1))
- Usable without LangChain; the README says it is built by LangChain Inc. but does not require LangChain. ([source](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-core/README.md))

## Cons

- Deliberately low-level; the overview steers newcomers to LangChain's prebuilt agents first. ([source](https://docs.langchain.com/oss/javascript/langgraph/overview))
- The `createReactAgent` prebuilt is deprecated in v1, so older examples need migrating to LangChain's `createAgent`. ([source](https://docs.langchain.com/oss/javascript/releases/langgraph-v1))
- The swarm add-on has not been tested with LangChain 1.0 agents and only supports `createReactAgent`. ([source](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-swarm/README.md))
- Resuming an interrupt re-executes the whole node, which can repeat non-idempotent side effects. ([source](https://docs.langchain.com/oss/javascript/langgraph/interrupts))
- The JS dev server warns that local MCP features are not yet supported and ignores them. ([source](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-api/src/server.mts))

## Alternatives

- [LangGraph](https://multiagentguide.top/tools/langgraph.md)
- [Mastra](https://multiagentguide.top/tools/mastra.md)
- [OpenAI Agents SDK (JavaScript/TypeScript)](https://multiagentguide.top/tools/openai-agents-js.md)
- [VoltAgent](https://multiagentguide.top/tools/voltagent.md)
- [AgentKit by Inngest](https://multiagentguide.top/tools/inngest-agentkit.md)

## FAQ

### Does LangGraph.js support MCP?

Partly. MCP tools come in through LangChain's separate `@langchain/mcp-adapters` package (`MultiServerMCPClient`). LangGraph.js itself has no MCP code, and its JS dev server ignores local MCP settings.

### Is LangGraph.js free?

Yes, it is MIT-licensed. LangChain Inc. sells LangSmith plans for tracing and managed deployment, listed on its pricing page.

### How does LangGraph.js relate to LangGraph for Python?

It is a separate repository and npm package (`@langchain/langgraph`) with the same graph, checkpoint and interrupt concepts. Some server features, such as the Agent Server A2A endpoint, are documented only for the Python server package.

### Which Node.js version does it need?

`@langchain/langgraph` declares Node.js 18 or newer, with `@langchain/core` and `zod` as peer dependencies.

### What is the current version?

The core package `@langchain/langgraph` was at 1.4.18 on 2026-09-25. The repository also releases the CLI and other packages under separate tags.

## Sources

- [LangGraph.js GitHub repository](https://github.com/langchain-ai/langgraphjs)
- [LangGraph.js core README](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-core/README.md)
- [@langchain/langgraph package.json](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-core/package.json)
- [@langchain/langgraph 1.4.18 release](https://github.com/langchain-ai/langgraphjs/releases/tag/%40langchain/langgraph%401.4.18)
- [LangGraph.js releases](https://github.com/langchain-ai/langgraphjs/releases)
- [JS langgraph-api server source (MCP warning)](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-api/src/server.mts)
- [langgraph-swarm README](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-swarm/README.md)
- [langgraph-supervisor README](https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph-supervisor/README.md)
- [LangGraph.js overview (docs)](https://docs.langchain.com/oss/javascript/langgraph/overview)
- [Install LangGraph.js (docs)](https://docs.langchain.com/oss/javascript/langgraph/install)
- [Graph API (docs)](https://docs.langchain.com/oss/javascript/langgraph/graph-api)
- [Functional API (docs)](https://docs.langchain.com/oss/javascript/langgraph/functional-api)
- [Persistence (docs)](https://docs.langchain.com/oss/javascript/langgraph/persistence)
- [Checkpointers (docs)](https://docs.langchain.com/oss/javascript/langgraph/checkpointers)
- [Interrupts (docs)](https://docs.langchain.com/oss/javascript/langgraph/interrupts)
- [Time travel (docs)](https://docs.langchain.com/oss/javascript/langgraph/use-time-travel)
- [Stores (docs)](https://docs.langchain.com/oss/javascript/langgraph/stores)
- [Subgraphs (docs)](https://docs.langchain.com/oss/javascript/langgraph/use-subgraphs)
- [What's new in LangGraph.js v1](https://docs.langchain.com/oss/javascript/releases/langgraph-v1)
- [LangChain JS multi-agent guide](https://docs.langchain.com/oss/javascript/langchain/multi-agent)
- [LangChain JS MCP adapters (legacy docs)](https://docs.langchain.com/oss/javascript/langchain/mcp)
- [LangChain JS CopilotKit / AG-UI integration](https://docs.langchain.com/oss/javascript/langchain/frontend/integrations/copilotkit)
- [Agent Server A2A endpoint (docs)](https://docs.langchain.com/langsmith/server-a2a)
- [AG-UI README, supported integrations](https://github.com/ag-ui-protocol/ag-ui/blob/main/README.md)
- [LangChain / LangSmith pricing](https://www.langchain.com/pricing)
- [LangGraph product page](https://www.langchain.com/langgraph)

## Unknown fields

protocols.a2a: searched the LangChain TypeScript docs index, the LangGraph.js README and a code search of langchain-ai/langgraphjs for 'a2a'. The Agent Server A2A page lists `langgraph-api >= 0.4.21`, a Python package version; the JS `libs/langgraph-api` source has no A2A route, and the only A2A code is an example stream transformer under examples/streaming. Whether LangSmith-hosted JS deployments expose `/a2a` is not stated.

---

Data as of 2026-09-30. Not affiliated with listed projects. HTML version: https://multiagentguide.top/tools/langgraphjs
