Capability · Framework — agents

LangGraph

LangGraph is the recommended agent API inside the LangChain ecosystem. It models agents as graphs of nodes and edges with explicit state, first-class persistence, checkpointing, time-travel debugging, and human-in-the-loop support. LangGraph Platform adds a managed deployment surface with queues and long-running task infrastructure for production.

Framework facts

Category
agents
Language
Python / TypeScript
License
MIT
Repository
https://github.com/langchain-ai/langgraph

Install

pip install langgraph langchain-anthropic
# or
npm install @langchain/langgraph @langchain/anthropic

Quickstart

from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic
from langchain_core.tools import tool

@tool
def get_weather(city: str) -> str:
    '''Get weather for a city.'''
    return f'It is sunny in {city}.'

model = ChatAnthropic(model='claude-opus-4-7')
agent = create_react_agent(model, tools=[get_weather])
result = agent.invoke({'messages': [('user', 'weather in Delhi?')]})

Alternatives

  • CrewAI — higher-level, role-based orchestration
  • AutoGen — Microsoft multi-agent conversations
  • OpenAI Agents SDK — OpenAI's official alternative
  • Pydantic AI — typed, Pythonic alternative

Frequently asked questions

When should I use LangGraph over plain LangChain?

Use LangGraph whenever your application has multiple steps, tool calls, cycles, or needs state persistence. Plain LangChain chains are fine for simple linear pipelines and retrieval flows.

Does LangGraph require LangChain?

Nodes can call any LLM or function — you don't have to use LangChain primitives. But integrations with LangChain tools and models are seamless, and LangSmith tracing works out of the box.

Sources

  1. LangGraph — docs — accessed 2026-04-20
  2. LangGraph — GitHub — accessed 2026-04-20