LangGraph
PackageOpen-source framework for building stateful, long-running agents as graphs
- Price
- Free, open source
- Access
- None, runs locally
About
LangGraph is LangChain's MIT-licensed, low-level orchestration runtime for agents and workflows in Python and JavaScript. It gives durable execution, streaming and human-in-the-loop, but you design the graph yourself. Hosted deployment is a separate LangSmith product.
What you can do with it
- Build a multi-step agent that mixes LLM calls with fixed code steps
- Pause a workflow for human approval and resume it later
- Persist agent state with checkpointers so runs survive failures
Get started
- Install the library with pip install -U langgraph
- Add your LLM calls and tools as graph nodes
Example
from langgraph.graph import StateGraph, MessagesState, START, END
def mock_llm(state: MessagesState):
return {"messages": [{"role": "ai", "content": "hello world"}]}
graph = StateGraph(MessagesState)
graph.add_node(mock_llm)
graph.add_edge(START, "mock_llm")
graph.add_edge("mock_llm", END)
graph = graph.compile()
graph.invoke({"messages": [{"role": "user", "content": "hi!"}]})Details
- Hosting
- Runs locally
- Available in
- Worldwide
- Official SDKs
- Python, JavaScript/TypeScript
- MCP server
- None