β Back to AgentFolio
πΈοΈ
LangGraph
Agent Framework
Graph-based stateful agent workflows
What it is
LangGraph builds on LangChain to let you define agent workflows as directed graphs with explicit state management. Nodes are functions or agents; edges define flow. Supports cycles, conditional branching, and human-in-the-loop checkpoints. ~2.2x faster than CrewAI in benchmarks.
Best for
Complex agent workflows requiring explicit state, conditional branching, or loops. Best for production systems where you need fine-grained control over agent behavior.
π€ Human use cases
- Build production-grade AI agents with explicit state machines
- Create chatbots with memory that can branch based on context
- Design multi-step reasoning systems with loops and conditions
- Implement human-in-the-loop approval workflows
π€ Agent use cases
- Define agent control flow as code rather than prompt instructions
- Implement reliable retry logic with graph cycles
- Build supervisor agents that route tasks to specialists
- Create auditable agent workflows with full state history
How to install / get access
pip install langgraph langchain-core
from langgraph.graph import StateGraph
from typing import TypedDict
class State(TypedDict):
messages: list
graph = StateGraph(State)
graph.add_node('agent', my_agent_fn)
graph.set_entry_point('agent')
app = graph.compile()