⌬WorkflowOrchestrationFree
LangGraph
Build stateful, multi-actor agent workflows as directed graphs — cycles, branching, human-in-the-loop, and persistent state built in.
LangGraph
LangGraph extends LangChain with a graph-based runtime for building stateful agent and multi-actor workflows. Unlike linear chains, LangGraph supports cycles, conditional branching, parallel execution, and durable persistence — making it the go-to framework for production agentic systems.
Key features
- Stateful graphs — each node reads and writes to a shared typed state object
- Cycles — agents can loop, retry, and re-plan — not just run top-to-bottom
- Human-in-the-loop — pause execution at any node and resume after human review
- Persistence — checkpoint state to SQLite, Postgres, or Redis for fault tolerance
- Multi-agent — route messages between specialized sub-graphs (supervisor, swarm patterns)
- LangGraph Platform — hosted deployment with streaming, webhooks, and a Studio debugger
Quick start
npx ai-supply add langgraph-stateful-agent-workflows
# Or install directly
pip install langgraph langchain-anthropic
from typing import TypedDict
from langgraph.graph import StateGraph, END
from langchain_anthropic import ChatAnthropic
class State(TypedDict):
messages: list
llm = ChatAnthropic(model="claude-opus-4-5")
def call_model(state: State):
response = llm.invoke(state["messages"])
return {"messages": state["messages"] + [response]}
graph = StateGraph(State)
graph.add_node("agent", call_model)
graph.set_entry_point("agent")
graph.add_edge("agent", END)
app = graph.compile()
result = app.invoke({"messages": [{"role": "user", "content": "Hello!"}]})
print(result["messages"][-1].content)
Curated mirror of the open-source LangGraph project (MIT). Install upstream from the repository.