# 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.
## 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
## Related
- [[LangChain]]
- [[AI Agents]]
- [[AI Agent Swarms]]
- [[Large Language Models (LLMs)]]
- [[Directed Acyclic Graphs (DAG)]]
- [[Python]]