LangGraph in production: Temporal's LangGraph Plugin adds Durable Execution

AUTHORS
Ethan Ruhe, David Hyde, Brian Strauch
PUBLISHED
Jul 16, 2026
CATEGORY
DURATION
8 MIN
  • AI/ML
  • Durable Execution
  • Python

Temporal powers many of the most demanding agent experiences in the world, including those from OpenAI, Cursor, Lovable, Block, Abridge, Hebbia, and many more.

Today, Temporal's LangGraph integration for Python is in Public Preview, together with our LangSmith integrations for both Python and TypeScript. If you build agents with LangGraph, you can now run them on Temporal without rewriting your codebase, and get automatic failure recovery, human-in-the-loop steps that wait for days at no cost, and runs that survive any crash.

uv add "temporalio[langgraph]"

LangGraph and Temporal do different jobs. LangGraph is an agent framework: a way to define what your agent does. But LangGraph leaves key production concerns to be solved somewhere else in the stack: recovery, human review, and long-running work. Temporal is an agent orchestrator, and unlocking reliable capability is its entire job.

Our position is simple. If you use LangGraph, you should also use Temporal.

What LangGraph leaves unsolved#

LangGraph is a simple, efficient way to express an agent: the graph model is clear, the ecosystem is rich, and prototypes come together fast. But, it's not a complete production story.

Recovery is manual. LangGraph checkpoints state, but checkpoints are not durable execution. A LangGraph run lives in a single process, so if that process dies then the run dies with it. The checkpoint preserves your data, not your execution: something has to detect the failure, decide where to re-enter the graph, and restart it. In production, this responsibility belongs to an orchestration layer you now have to build and operate.

Human review stops the world. When a LangGraph agent hits interrupt(), execution halts and the resume problem lands on you: persist the pending state, track which runs are waiting on whom, and stand up the system that both notices an approval arrived and re-enters the right graph at the right step. That system has to be at least as reliable as the agent, or approvals themselves get lost.

Long-running work strains the execution model. Agents that run for days, fan out to sub-agents, or carry growing state push hard on LangGraph's checkpointing, intermediate-state handling, and memory management. While a demo will allude to what's possible when everything goes smoothly, keeping it upright across weeks of real traffic quickly becomes its own engineering project.

These factors are the difference between a framework and orchestration. While frameworks define agents, running them durably is an orchestration problem. It's the problem Temporal solves as the durable execution platform behind many of the most capable AI companies on the market, and the integration we're announcing today gets you confidently to production, without asking you to give up LangGraph.

Your graph, running durably#

Your LangGraph code stays. You add execution metadata to your nodes and register the graph with a plugin. That's the whole integration surface:

# abridged; full sample linked below
def make_hello_graph() -> StateGraph:
    g = StateGraph(State)
    g.add_node(
        "process_query",
        process_query,  # an ordinary LangGraph node
        metadata={
            "execute_in": "activity",
            "start_to_close_timeout": timedelta(seconds=10),
        },
    )
    g.add_edge(START, "process_query")
    return g

@workflow.defn
class HelloWorldWorkflow:
    @workflow.run
    async def run(self, query: str) -> str:
        result = await temporal_graph("hello-world").compile().ainvoke({"value": query})
        return result["value"]

# Worker registration
plugin = LangGraphPlugin(graphs={"hello-world": make_hello_graph()})
worker = Worker(client, task_queue="langgraph-hello-world",
                workflows=[HelloWorldWorkflow], plugins=[plugin])

Getting your graph to run reliably is easy. Let's start with the first concern: recovery. The integration runs your LangGraph graph as a Temporal Workflow. Each node can execute as a Temporal

Activity, and execution is checkpointed at every node. This is durable execution, not just durable data, so the run itself survives. A model call times out, a tool errors, the machine running your agent loses power mid-run: whatever breaks, Temporal retries the failed step per policy and resumes the graph from durable state, on the same worker or a different one. The single-process ceiling is gone and recovery becomes the responsibility of the runtime rather than the code you write.

The integration supports both LangGraph APIs, the Graph API (StateGraph) and the Functional API (@entrypoint/@task), along with interrupts, Send, and continue-as-new. It requires Temporal Python SDK 1.27.0 or later, and Python 3.11+ for the Functional API.

Human-in-the-loop, without the dilemma#

The second concern is the one teams feel acutely. The moment a human enters the loop, an agent stops being a compute problem and becomes a coordination problem. A review might take thirty seconds or three days, and in LangGraph alone, interrupt() halts the run and makes that wait your problem.

From there you have two options: hold a process open and pay for compute that does nothing but wait, or build the machinery for tearing execution down and bringing it back up: persisting state, tracking what's pending, and standing up the system that notices an approval arrived and resumes the right run at the right step.

Temporal removes the dilemma. Durable waits (signals and timers) cost nothing while they wait. When a LangGraph node calls interrupt(), the workflow pauses durably: no process held open, no compute burning, no state to shuttle in and out of a database. When the human responds, in an hour or a month, a signal resumes the graph exactly where it paused and the pause is scoped to the branch that needs review; the rest of the graph keeps moving.

# abridged; full sample linked below
async def human_review(state: State) -> dict[str, str]:
    feedback = interrupt(state["value"])  # pause this branch for a human
    if feedback == "approve":
        return {"value": state["value"]}
    return {"value": f"[Revised] {state['value']} (incorporating feedback: {feedback})"}

@workflow.run
async def run(self, user_message: str) -> str:
    app = temporal_graph("chatbot").compile(checkpointer=InMemorySaver())

    # First invocation runs until the graph pauses at interrupt()
    result = await app.ainvoke({"value": user_message}, config, version="v2")

    # Feedback arrives via a Temporal signal
    await workflow.wait_condition(lambda: self._human_input is not None)

    # Resume the graph with the human's feedback
    resumed = await app.ainvoke(Command(resume=self._human_input), config, version="v2")
    return resumed.value["value"]

That wait_condition is free whether it waits an hour or a month.

Built for how long production actually runs#

The third concern, long-running agents, is where checkpoint-based approaches strain hardest and where Temporal is most at home. There are production agents on Temporal that run for months right now. Some of these will keep running for years.

Production agents stretch every dimension a prototype holds constant. State grows to include conversation history, retrieved documents, and generated artifacts. Temporal's support for large payloads keeps that state moving with the run instead of forcing you to build side-channel storage. Runs get long: with continue-as-new, a workflow can run indefinitely, so a research agent or a monitoring loop can live for weeks without accumulating unbounded history. And scale stays operational, not architectural: workers scale horizontally, and every step of every run is visible, retryable, and auditable through Temporal's tooling.

Through all of it, the code you maintain is LangGraph. The integration keeps the surface idiomatic instead of asking you to learn a second orchestration model.

Observability that survives the run: LangSmith#

Durability without visibility is half a story, which is why our LangSmith integrations enter Public Preview today too, for both Python and TypeScript:

uv add "temporalio[langsmith]"
# or
npm install @temporalio/langsmith

Tracing a durable agent is harder than tracing a request: a single run can span processes, survive worker restarts, and include retried steps. The LangSmith integration propagates trace context across Workflow and Activity boundaries, so one agent run reads as one LangSmith trace, no matter how many machines it touched on the way.

Powering the AI ecosystem: you don't need LangGraph to do this#

It's important to emphasize that Temporal is an agent orchestrator no matter how you define the agent. The same durable execution behind this integration already powers our integrations with the OpenAI Agents SDK, Google ADK, and AWS Strands, and LangGraph joins that list today. Plenty of teams skip frameworks entirely and build agents directly on the Temporal SDK (we support 8 different languages).

Pick the framework that fits how your team thinks, or pick none at all. In any case, Temporal helps you unlock agent capability.

Get started today#

Both integrations are in Public Preview and ready to try:

uv add "temporalio[langgraph]"
uv add "temporalio[langsmith]"

Public Preview means we want your feedback: tell us what you build, and what's missing, in the Temporal Community Slack or on the community forum.

What's next?#

The LangSmith integration ships for both Python and TypeScript today, and more TypeScript support is on the way. If you build agents with LangGraph, run them on Temporal. If you build without it, Temporal is still the shortest path to agents that survive production. Either way, today is a great day to start.

Temporal Cloud

Ready to see for yourself?

Sign up for Temporal Cloud today and get $1,000 in free credits.

Build invincible applications

It sounds like magic, we promise it's not.