Diagrid

Deep Agents: what happens when your agent crashes at step 15 of 20?

LangChain Deep Agents + Diagrid

LangChain Deep Agents bring long-running, multi-step reasoning to AI. But the longer a chain runs, the more expensive a failure becomes. There is no checkpointing, no failure detection, and no recovery. When it crashes, you re-run everything from scratch and pay for every LLM call again. Diagrid adds true durable execution so deep agent workflows survive failures, built on the open-source Dapr project.

Durable long-running agents

5 lines of code

Built on open-source Dapr

What they are

What are LangChain Deep Agents?

Deep Agents is an agent harness built on LangChain and LangGraph for work that runs many steps and produces a lot of intermediate context. A basic agent loop calls a tool and returns. A deep agent plans its own work, writes to a virtual filesystem, delegates to subagents, and manages its context as the task grows.

Four capabilities define it.

Planning tools. The agent lays out a sequence of work and revises it as it learns, instead of deciding one step at a time.

A virtual filesystem. Information moves out of the conversation and into files, with backends in memory, on disk, in a durable store or inside a sandbox. The agent reads what it needs rather than carrying everything.

Subagents. Specialist work runs in an isolated context, so a research detour or a long tool output never fills the parent's conversation.

Context management. The harness summarises and offloads as the run grows. This is what keeps hour-long research and coding sessions from hitting the context window.

Deep Agents ships in Python and TypeScript, with the TypeScript port published as deepagents on npm.

The design suits research agents, coding agents and planning systems: work measured in minutes or hours rather than seconds. Which is exactly why a crash at step 15 of 20 is expensive.

Production Gap Analysis

Why LangChain Deep Agents Alone Aren't Production-Ready

LangChain Deep Agents enable complex, multi-step agent workflows. But the longer and deeper the agent chain, the more critical production infrastructure becomes. A failure at step 15 of 20 shouldn't mean starting over.

No crash recovery for deep chains

Deep agent chains execute many sequential steps. A failure at step 15 of a 20-step chain means re-running all 15 completed steps from scratch. There is no checkpoint or recovery mechanism built into the framework.

Long execution times amplify failure cost

Deep agents make many LLM calls and tool invocations. Each one takes time and costs money. Without durability, a single failure wastes all prior compute and API spend. The deeper the chain, the bigger the waste.

No failure detection

There is no mechanism to detect that a deep agent has crashed. A process running a multi-hour chain can fail silently, and nobody knows until someone checks. Production workflows sit broken without alerting.

No multi-instance coordination

Running multiple deep agent instances risks duplicate long-running executions. There is no built-in distributed locking or deduplication across instances.

Complex chains are hard to debug

With many steps and branching logic, production debugging requires per-step tracing with inputs, outputs, and timing. LangChain's logging is not sufficient for debugging deep production chains.

No workload isolation

No mTLS between chain components, no cryptographic identity, and no access control between the deep agent and the tools it invokes.

Integration

Make Deep Agents Crash-Proof

Wrap your LangChain Deep Agent with DaprWorkflowDeepAgentRunner. Each tool call in the deep chain becomes a durable Dapr workflow activity with automatic failure detection and recovery, powered by the same Dapr runtime trusted in production by companies like NASA, Grafana Labs, and HSBC.

LangChain Deep Agents alone
from langchain_deepagents import create_deep_agent
agent = create_deep_agent(
model="openai:gpt-4o-mini",
tools=[get_weather, search_web],
system_prompt="""You are an expert research
assistant. Use the available tools when
needed to answer user questions
accurately.""",
name="research-assistant",
)
# Long-running with no crash recovery
# A failure at step 15 restarts from step 1
result = agent.invoke("Deep research on Q4 trends")
LangChain Deep Agents + DiagridDurable
from langchain_deepagents import create_deep_agent
from diagrid.agent.langchain import DaprWorkflowDeepAgentRunner
agent = create_deep_agent(
model="openai:gpt-4o-mini",
tools=[get_weather, search_web],
system_prompt="""You are an expert research
assistant. Use the available tools when
needed to answer user questions
accurately.""",
name="research-assistant",
)
# True durable execution with Dapr Workflows
# Automatic failure detection + recovery
runner = DaprWorkflowDeepAgentRunner(
agent=agent,
name="deep-agent",
max_steps=50,
)

Comparison

From Prototype to Production

What changes when you add Diagrid to your LangChain Deep Agents agents.

Crash recovery
LangChain Deep Agents aloneEntire deep chain restarts
+ DiagridResumes from last completed step
Failure detection
LangChain Deep Agents aloneNone. Failed chains go unnoticed
+ DiagridBuilt-in supervisor with heartbeats
Cost on failure
LangChain Deep Agents aloneAll prior LLM calls re-billed
+ DiagridOnly failed step retried
Multi-instance safety
LangChain Deep Agents aloneDuplicate long runs possible
+ DiagridDistributed locking and deduplication
Observability
LangChain Deep Agents aloneBasic logging
+ DiagridPer-step distributed tracing
Security
LangChain Deep Agents aloneNo identity or access control
+ DiagridmTLS with SPIFFE workload identity
Open-source foundation
LangChain Deep Agents aloneNo runtime infrastructure
+ DiagridBuilt on CNCF Dapr project

Framework choice

Deep Agents vs LangGraph

Deep Agents is built on LangGraph, so the real question is how much harness you want.

Use LangGraph directly when you are designing the control flow yourself and the run has a defined shape: nodes you drew, edges you routed, a path you can follow in the code. Use Deep Agents when the agent works out the shape itself over many steps and needs files, subagents and context management to do it.

If your agent has four tools and a clear sequence, Deep Agents adds concepts you will not use. If it researches, writes code, or works through a task that takes an hour, the harness is the point.

Either way, the durability gap is the same. LangGraph checkpoints are not durable execution, and neither framework detects that a run has died.

Enterprise-Grade

Enterprise Infrastructure for LangChain Deep Agents

Everything your team needs to run LangChain Deep Agents agents in production. Built on Dapr, the CNCF project trusted by thousands of enterprises.

Security & Compliance

Zero-Trust Security

Every agent gets a SPIFFE-based cryptographic identity through Dapr's built-in security model. All communication is encrypted with automatic mTLS. Fine-grained policies control which agents can access which tools.

Platform Engineering

End-to-End Observability

Distributed tracing for every workflow execution with per-step input and output inspection. Built on OpenTelemetry, so traces integrate with the tools your team already uses.

Infrastructure

Multi-Region Failover

Deploy across regions with active-passive failover. If a region goes down, Dapr Workflows automatically resume in the standby region from their last checkpoint.

Developers

Durable State Store

Dapr Workflows persist state to a remote store after every activity. Survives process crashes, OOM kills, deployments, and infrastructure failures. Use any supported database as the backend.

Platform Engineering

Multi-Instance Coordination

Dapr's actor placement service ensures each workflow is processed by exactly one instance. Scale horizontally without duplicate executions or race conditions.

Compliance & Ops

Full Execution History

Complete audit trail for every workflow with deterministic replay. Re-run any past execution for debugging, compliance, or analysis. All built on the open-source Dapr project.

How It Works

Three Steps to Production

Keep your existing LangChain Deep Agents code. Add production reliability in minutes.

01

Build with LangChain Deep Agents

Define your agent, tools, and logic using LangChain Deep Agents exactly as you normally would. No special patterns or abstractions required.

02

Wrap with Diagrid

Add one import and wrap your agent with DaprWorkflowAgentRunner (or DaprWorkflowGraphRunner for LangGraph). Each tool call becomes a durable Dapr workflow activity.

03

Deploy to production

Run with Dapr Workflows handling crash recovery, state persistence, distributed coordination, security, and observability. Your agent code runs locally or in the cloud.

FAQ

Frequently Asked Questions

Deploy Deep Agents to Production Today

Make your LangChain Deep Agents crash-proof. Add durable execution and enterprise security built on open-source Dapr. Start free, no credit card required.