All Tools
DeepAgents logo

DeepAgents

DeepAgents is LangChain's open-source agent harness for building AI agents with planning, sub-agents, and context management out of the box.

What is DeepAgents?

DeepAgents is an open-source agent harness from LangChain that gives you a production-ready AI agent out of the box. Where LangGraph provides the graph runtime and LangChain’s create_agent provides a minimal scaffold, DeepAgents bundles the full stack on top: built-in planning, filesystem access, sub-agent delegation, automatic context compression, and persistent cross-session memory. The whole thing ships from a single pip install and a one-function call to create_deep_agent(), and it works with any LLM that supports tool calling. For AI developers building long-horizon tasks, research pipelines, coding agents, and multi-step automation workflows, DeepAgents removes weeks of infrastructure wiring and lets you focus on what your agent actually needs to do.

How DeepAgents works

DeepAgents is built on LangGraph, a graph-based runtime for stateful AI applications. When you call create_deep_agent(), you get back a compiled LangGraph state machine that is ready to invoke, stream, or deploy. A configurable middleware pipeline intercepts every model call and tool execution, routing operations through a pluggable backend protocol. That protocol is what lets the same agent code run locally, in a remote cloud sandbox, or in any environment you choose.

Here is how a typical agent run plays out:

  • Planning: Before executing anything, the agent calls a built-in write_todos tool to break the task into subtasks. It tracks progress against this plan and revises it as new information arrives.
  • Execution: For each subtask, the agent picks tools from its toolset: read/write files, run shell commands, call APIs, or invoke any custom Python function you have attached.
  • Sub-agent delegation: When a subtask needs a fresh context window (to avoid polluting the main conversation thread), the agent spawns a sub-agent using the task tool. Sub-agents are themselves full LangGraph graphs and can be fully customised.
  • Context management: Large tool outputs are automatically offloaded to disk. Long conversation threads are summarised in place. This keeps the context window from overflowing on long-running jobs.
  • Human-in-the-loop: If configured, any tool call pauses for your approval before it runs. You can approve, edit the call, or reject it outright.
  • Memory: An AGENTS.md file in the virtual filesystem stores persistent instructions and learned preferences that carry across sessions.

The framework ships with partner sandbox integrations for Modal, Daytona, and Runloop, plus a JavaScript port at deepagentsjs for TypeScript environments.

What you can build with DeepAgents

  • Autonomous research pipeline: An agent that receives a question, plans a search strategy, spawns sub-agents to fetch and read multiple sources in parallel, then synthesises a cited report. DeepAgents handles the planning, sub-agent coordination, and context offloading automatically.
  • AI coding agent: A full-featured coding agent, similar to Claude Code, that reads your codebase, tracks its own progress with todos, writes and edits files, runs tests, and iterates until the task is done. The deepagents-code CLI (dcode) ships a pre-built version of this that works with any LLM.
  • Multi-step data pipeline: An agent that ingests raw data files, applies transformations, calls external APIs for enrichment, and writes structured results to a database. Each stage runs as a sub-agent with its own isolated context.
  • Customer support automation: A support agent that searches a knowledge base, creates tickets, sends emails, and hands off to a human when it is not confident, all within a single loop with human-in-the-loop checkpoints built in.
  • Enterprise search assistant: An agent that queries multiple internal data sources, compares results across them, and returns cited answers, using DeepAgents’ persistent filesystem backend to index documents and remember previous searches across sessions.
  • DevOps automation agent: An agent that monitors CI/CD output, diagnoses failing tests, opens pull requests with fixes, and notifies the team when it needs input, running as a GitHub Action via the included action.yml.

Key Features

  • create_deep_agent() gives you a working agent in a single function call
  • Built-in planning tool breaks complex tasks into tracked subtasks before execution
  • Sub-agent delegation with isolated context windows via the task tool
  • Automatic context management: thread summarisation and tool output offloading
  • Human-in-the-loop approval before any tool call executes
  • Model-agnostic: works with OpenAI, Anthropic, Google, Ollama, vLLM, and more

FAQ

How is DeepAgents different from LangChain or LangGraph? +

LangGraph is the graph runtime and LangChain's create_agent is a minimal harness on top of it. DeepAgents is a more opinionated layer above that, bundling filesystem access, sub-agent delegation, context management, and skills so you do not have to wire them up yourself. All three layers compose and interoperate freely.

Does DeepAgents work with open-weight or local models? +

Yes. Any model that supports tool calling works with DeepAgents, including frontier APIs from OpenAI, Anthropic, and Google, open-weight models hosted on providers like Fireworks or Baseten, and locally run models via Ollama, vLLM, or llama.cpp. Pass any LangChain chat model into create_deep_agent to swap providers.

Is DeepAgents ready for production use? +

Yes. DeepAgents runs on LangGraph, which handles streaming, persistence, and checkpointing for production deployments. Pair it with LangSmith for tracing, evaluation, and monitoring. The framework also supports remote execution sandboxes via Modal, Daytona, and Runloop so code runs in a fully isolated environment.

Explore Similar AI Tools

Newsletter

The Twice-Monthly AI Briefing

Updates from the AI world — what shipped, what we’re using in production, and what’s worth your attention. Two emails a month, no spam.