# LangGraph
LangGraph is a low-level orchestration framework built on top of [[LangChain]] for building stateful, long-running [[AI Agents]]. While LangChain creates [[Directed Acyclic Graphs (DAG)]] for linear workflows, LangGraph enables cyclic computational graphs; essential for complex agent behaviors where LLMs continuously loop and dynamically decide actions based on evolving conditions.
Version 1.0 was released in November 2025.
## LangGraph.js — the TypeScript port
LangGraph is not Python-only. **LangGraph.js** is a first-party [[TypeScript]] port published as `@langchain/langgraph` under the [[MIT License|MIT]] licence, and it tracks the Python line closely — 1.x, at **1.4.12** as of 2026-08-20.
The persistence story is real rather than aspirational. Official checkpointer packages ship for SQLite, Postgres, MongoDB and Redis (`@langchain/langgraph-checkpoint-sqlite`, `-postgres`, `-mongodb`, `-redis`), all on their own 1.x lines, plus a `-validation` package for testing custom checkpointer implementations against the expected contract. Durable execution and resume-from-checkpoint therefore work in JS, not just Python.
Two caveats. Feature parity with Python is close but the Python line still leads on new capabilities, so check both docs when something is missing. And the package drags `@langchain/core` in with it, which is a meaningful dependency if you wanted a slim agent loop rather than the LangChain ecosystem.
### Is the graph the right shape?
Worth asking before adopting. LangGraph's abstraction is a state machine over nodes and edges, which fits branching multi-step pipelines well. It fits "run one agent in a loop inside a session with a token budget" less well — that shape is a loop with a policy, and expressing it as a graph adds ceremony without buying much. The checkpointer model is a good design reference for durable sessions even when the graph abstraction itself is not what you want.
## Key Features
- **Stateful execution**: Maintain and modify agent state throughout interactions
- **Durable execution**: Agents persist through failures and resume from checkpoints
- **Cyclic graphs**: Support loops and conditional branching (unlike DAG-only frameworks)
- **Human-in-the-loop**: Inspect and modify agent state at any point
- **Memory systems**: Both short-term working memory and long-term cross-session memory
- **Concurrent users**: Manage independent graph instances per user at scale
## When to Use LangGraph vs LangChain
| Scenario | Framework |
|----------|-----------|
| Simple, linear workflows | [[LangChain]] |
| Document Q&A systems | [[LangChain]] |
| Complex multi-step agents | LangGraph |
| Long-running autonomous tasks | LangGraph |
| State-dependent decision making | LangGraph |
| Production-scale agent deployments | LangGraph |
## Architecture
LangGraph models agents as state machines with:
- **Nodes**: Individual processing steps or tool calls
- **Edges**: Transitions between nodes (can be conditional)
- **State**: Persistent data passed between nodes
- **Cycles**: Ability to return to previous nodes based on conditions
```
┌─────────────────────────────────────┐
│ Agent Graph │
│ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │Start │───▶│Think │───▶│ Act │ │
│ └──────┘ └──────┘ └──────┘ │
│ ▲ │ │
│ └────────────┘ │
│ (cycle/loop) │
└─────────────────────────────────────┘
```
## Enterprise Adoption
- **Vodafone**: Autonomous agents for data engineering and operations
- **Klarna**: Customer service agents with LangSmith integration
- **Elastic**: AI security assistant for 20,000+ customers
## References
- https://www.langchain.com/langgraph
- https://docs.langchain.com/oss/python/langgraph/overview
- https://github.com/langchain-ai/langgraph
- JS/TS: https://github.com/langchain-ai/langgraphjs
- JS/TS reference: https://reference.langchain.com/javascript
## Related
- [[LangChain]]
- [[AI Agents]]
- [[AI Agent Swarms]]
- [[Large Language Models (LLMs)]]
- [[Directed Acyclic Graphs (DAG)]]
- [[Python]]
- [[TypeScript]]
- [[Google Agent Development Kit (ADK)]]