langchain-ai/deepagents

AI Engineering

An opinionated Python agent harness bundling planning, files, sub-agents and context management for long multi-step tasks.

30,788
4,329
Python
MIT
1 year old

Deep Agents is an open-source agent harness: an opinionated agent layer built on LangChain's create_agent and the LangGraph runtime, aimed at long-horizon, multi-step tasks that need planning, file handling and context control. It fits teams building general AI agents in Python who would otherwise assemble those pieces themselves; it is not a coding-only assistant or a finished chat app.

What it does

A create_deep_agent call takes a model and a system prompt and returns an agent that can already plan, read and write files, and manage its own context. Bundled pieces include sub-agents (task delegation into isolated context windows), a filesystem over pluggable local, sandboxed or remote backends, context management that summarizes long threads and offloads tool outputs to disk, shell access in a chosen sandbox, persistent memory backends, human-in-the-loop approval/editing/rejection of tool calls before execution, on-demand skills, and your own tools or any MCP server deep agents overview.

How it fits the stack

The three LangChain layers compose: LangGraph is the graph runtime, create_agent is a minimal harness, and Deep Agents is a more opinionated harness on top of it. Choose Deep Agents for the full harness out of the box, create_agent for a lighter one, and LangGraph directly when the agent loop isn't the right shape. Any LangGraph compiled graph can be passed in as a sub-agent, so custom orchestration plugs in alongside the defaults ecosystem overview.

Requirements and scope

The Python library is installed via uv add deepagents, and a JavaScript/TypeScript library exists separately README. Models must support tool calling; the README states frontier APIs, open-weight models on hosted providers, and self-hosted models via Ollama, vLLM or llama.cpp all work through LangChain chat models README. Production use is documented as supported on LangGraph, with tracing, evaluation and monitoring optionally handled by LangSmith going to production.

Security model

The author is explicit: Deep Agents follows a "trust the LLM" model, and the agent can do anything its tools allow. Boundaries must be enforced at the tool or sandbox level rather than relying on the model to self-police README. That matters most for configurations with shell access or writable filesystem backends.

A separate pre-built terminal coding agent, Deep Agents Code, is distributed by its own install script and documented elsewhere Deep Agents Code docs; it is a distinct product from the harness library. The repository is MIT licensed repository.

Written by AI from the project's README, updated October 30, 2026. The project's own docs are the source of truth.

Hacker News

Deepagents
▲ 3 · 1 comment · July 3, 2026
LangChain-AI/deepagents: agent harness
▲ 1 · 0 comments · August 27, 2026