← Guides

LangGraph AI Agent Framework: How It Works, Pricing and Alternatives (2026)

What the LangGraph AI agent framework is in November 2026 (version 1.2), how graphs, state, checkpoints and human approval work, a minimal Python agent, what LangSmith Deployment costs, how LangGraph compares with CrewAI, the OpenAI Agents SDK and Google ADK, and when SPIRITT builds and runs the agent for you.

Flat risograph illustration of the LangGraph AI agent framework: a developer and a small robot stand at a wall board where round nodes connect with arrows into a loop, with a checkpoint flag and a person icon approving one step

LangGraph is an open-source framework from LangChain for building AI agents as graphs: nodes do the work (a model call, a tool, a function), edges decide what runs next, and a shared state object carries data between steps, with checkpoints so a run can pause for human approval and resume later. It reached version 1.0 in October 2025, is at 1.2 in November 2026, runs in Python and JavaScript, and is free; LangChain charges only for hosted tracing and deployment through LangSmith, from $39 per seat a month. SPIRITT, the operating system for AI transformation, is the option when you want the running agent rather than the framework: it codes the LangGraph agent (or any other stack), tests it, deploys it on its own cloud computer, connects it to 1,500+ apps and runs it 24/7 with budgets and approvals. This guide explains how LangGraph works, shows a minimal agent, lists real costs and compares the main alternatives.

What is LangGraph?

LangGraph is a low-level orchestration framework. Where higher-level libraries give you a ready-made agent loop, LangGraph gives you the building blocks to define the loop yourself, which is why teams pick it for long-running, stateful agents that need exact control over every step. LangChain's own higher-level agent API is built on top of it, and so is Deep Agents, LangChain's open-source harness for long-running agents with planning, sub-agents and a file system.

The core ideas:

  • State. A typed object (a Python TypedDict or Pydantic model) that every node reads and updates. Reducers decide how updates merge, for example appending messages.
  • Nodes. Plain functions that take the state and return an update. A node can call a model, run a tool or do ordinary computation.
  • Edges. Fixed edges always go to the next node; conditional edges pick the next node from the state, which is how loops and branching work.
  • Checkpointers. Save the state after each step to memory, SQLite or Postgres. That gives you durable execution, resume after failure, conversation threads and "time travel" to replay from any earlier step.
  • Interrupts. Pause the graph mid-run to wait for a human to approve, edit or reject, then continue from the same point.
  • Streaming and subgraphs. Stream tokens and intermediate steps to a UI, and nest graphs to build multi-agent systems.

A minimal LangGraph AI agent in Python

from typing import TypedDict
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import InMemorySaver

class State(TypedDict):
    question: str
    draft: str
    approved: bool

def write_draft(state: State):
    return {"draft": f"Answer to: {state['question']}"}  # call your model here

def review(state: State):
    return {"approved": len(state["draft"]) > 0}

def route(state: State):
    return END if state["approved"] else "write_draft"

g = StateGraph(State)
g.add_node("write_draft", write_draft)
g.add_node("review", review)
g.add_edge(START, "write_draft")
g.add_edge("write_draft", "review")
g.add_conditional_edges("review", route)
app = g.compile(checkpointer=InMemorySaver())
app.invoke({"question": "What changed in our refund policy?"}, {"configurable": {"thread_id": "1"}})

Swap the placeholder for a model call with tools and you have the classic ReAct loop: the model decides on a tool, a tool node runs it, a conditional edge sends the result back to the model until it answers. Replace InMemorySaver with a Postgres checkpointer for production.

What LangGraph costs (checked November 2026)

PartWhat it isPrice
LangGraph libraryOpen-source framework, Python and JavaScriptFree (MIT)
LangSmith DeveloperTracing and evals for one user, up to 5k base traces a month$0
LangSmith PlusUnlimited seats, 10k base traces a month, Agent Server, 1 free small serverless deployment$39 per seat a month, then pay as you go
UsageTraces, deployments, Fleet and sandboxes metered in LangChain Standard Units$1 per LSU
LangSmith EnterpriseSelf-hosted and hybrid deployment, SSO, RBACCustom
ModelsWhatever models your nodes callBilled by each model provider

You can also run LangGraph anywhere you can run Python or Node, with no LangChain account: in a container, on a serverless platform or on your own servers. You then own hosting, scaling, secrets and monitoring.

LangGraph vs other AI agent frameworks

FrameworkStyleBest forPrice
LangGraphExplicit graphs, state, checkpoints, interruptsComplex, long-running agents you need to control step by stepFree; LangSmith Plus $39 per seat a month for hosting and tracing
CrewAIRole-based crews of agents plus event-driven flowsFast multi-agent prototypes with clear rolesOpen source; hosted Basic free (50 executions a month)
OpenAI Agents SDKFew primitives: agents, handoffs, guardrails, sessionsQuick starts, handoffs and voice agentsFree, open source
Google ADKGraph, sequential, parallel and loop workflowsGemini and Google Cloud teamsFree, open source
Microsoft Agent FrameworkAgents and multi-agent workflows for Python and .NETAzure and .NET teamsFree, open source
Pydantic AITyped agents with validated outputsPython teams that want type safetyFree, open source
SPIRITTPlain English; SPIRITT writes, deploys and runs the codeTeams that want the agent running in productionFree to start; Starter $32, Pro $256, Max $1,024 a month

Pick LangGraph when you need durable state, precise branching, human approval at specific steps and the ability to replay a run. Pick a lighter SDK when a simple loop with tools is enough. Our guides to the AI agent SDK choice and Python AI agent libraries go deeper on each option.

Where LangGraph projects get stuck

The graph is usually the easy part. The work that slows teams down sits around it:

  1. Integrations. OAuth for Gmail, Slack, HubSpot or Salesforce, token refresh and rate limits for every tool node.
  2. Hosting. A server that keeps checkpoints, runs on a schedule, survives restarts and scales.
  3. A safe place to act. Browser and code-execution nodes need an isolated sandbox.
  4. Observability. Traces, cost per run and evals before each change. See AI agent observability.
  5. Memory. Deciding what the agent should remember across threads. See AI agent memory.
  6. Controls people can manage. Approvals, budgets and an audit trail that a non-developer can read.

How SPIRITT builds and runs a LangGraph agent

SPIRITT is a state-of-the-art coding agent as well as an autonomous workforce that runs sales, ops, admin and engineering work. Ask it for a LangGraph agent and it writes the graph, the tool nodes and the tests in your repository, composes models from several labs within each task, opens a pull request, then deploys the agent on its own isolated cloud computer. It connects the agent to your apps from 1,500+ integrations, keeps keys at the network boundary so the agent never sees them, sets Read, Write and Destructive rules per integration, and sends approvals to Slack or the SPIRITT app when the graph hits an interrupt. It runs on a schedule or on events, reports every run with itemized costs, and fixes the code when a tool changes.

If your team prefers no framework at all, describe the job in plain English and SPIRITT runs it directly. Either way you can see each step, and a design pattern such as orchestrator and workers or evaluator and optimizer maps cleanly onto both.

FAQ

What is the LangGraph AI agent framework?

LangGraph is LangChain's open-source framework for building stateful AI agents as graphs of nodes and edges, with checkpoints for durable execution and interrupts for human approval. It is available for Python and JavaScript and reached version 1.0 in October 2025.

Is LangGraph free?

Yes. The library is open source under the MIT license. You pay for the models you call, and optionally for LangSmith tracing and deployment: Developer is free for one user, Plus costs $39 per seat a month plus usage.

What is the difference between LangChain and LangGraph?

LangChain provides model and tool integrations and a high-level agent API. LangGraph is the lower-level runtime underneath, used when you want explicit control of state, branching, persistence and human-in-the-loop steps.

How do I build an AI agent in LangGraph?

Define a state type, write nodes as functions, connect them with edges and conditional edges, compile the graph with a checkpointer and invoke it with a thread ID. For a tool-using agent, add a model node that decides on tools and a tool node, with a conditional edge looping between them.

Is LangGraph good for multi-agent systems?

Yes. Subgraphs, supervisor patterns and handoffs between agents are first-class in LangGraph, and shared state with checkpoints makes long multi-agent runs resumable.

Should I use LangGraph or CrewAI?

LangGraph gives more control over state and flow and suits production agents that must pause, resume and be audited. CrewAI is faster for role-based prototypes. Both are free and open source.

Can SPIRITT host a LangGraph agent?

Yes. SPIRITT can write a LangGraph agent for you or take one you built, deploy it on its own cloud computer, connect it to your apps and run it on a schedule with approvals, budgets and an audit trail.

How we checked

SPIRITT publishes this guide. LangGraph facts come from the LangGraph documentation and its PyPI release history (1.0.0 on October 17, 2025; 1.2.24 current on November 23, 2026). LangSmith prices come from langchain.com/pricing, read on November 23, 2026; CrewAI, OpenAI Agents SDK, Google ADK, Microsoft Agent Framework and Pydantic AI facts come from their official documentation checked in November 2026. We read the current Google top results for "LangGraph AI agent framework" in the US to cover the questions searchers ask. SPIRITT facts come from spiritt.ai and the SPIRITT product.

Ship the LangGraph agent, hosted and watched

Buy from builders who use what they sellBuilt usingSPIRITT