deepagents README

The project's README from github.com/langchain-ai/deepagents. As one markdown file: README.md.

Deep Agents Logo

The batteries-included agent harness.

PyPI - License PyPI - Downloads Version Twitter / X

Deep Agents is an open source agent harness — an opinionated agent that runs out of the box. Extend, override, or replace any piece.

Principles:

Features include:

Deep Agents is available as a JavaScript/TypeScript library — see deepagents.js.

[!NOTE] Deep Agents Code — a pre-built coding agent in your terminal, similar to Claude Code or Cursor, powered by any LLM. Install with curl -LsSf https://langch.in/dcode | bash. See the documentation for the full feature set.

Quickstart

uv add deepagents
from deepagents import create_deep_agent

agent = create_deep_agent(
    model="openai:gpt-6-astra",
    system_prompt="You are a research assistant.",
)
result = agent.invoke({"messages": "Research LangGraph and write a summary"})

The agent can plan, read/write files, and manage its own context. Add your own tools, swap models, customize prompts, configure sub-agents, and more. See the documentation for full details.

[!TIP] For developing, debugging, and deploying AI agents and LLM applications, see LangSmith.

FAQ

How is this different from LangGraph or LangChain?

LangGraph is the graph runtime. LangChain's create_agent is a minimal agent harness on top of it. Deep Agents is a more opinionated harness on top of create_agent — same building blocks, but with filesystem, sub-agents, context management, and skills bundled in. For how the three relate, see the LangChain ecosystem overview.

Does this work with open-weight or local models?

Yes. Any model that supports tool calling works — frontier APIs (OpenAI, Anthropic, Google), open-weight models hosted on providers like Baseten or Fireworks, and self-hosted models via Ollama, vLLM, or llama.cpp. Use any LangChain chat model.

Can I use this in production?

Yes! Deep Agents is built on LangGraph, designed for production agent deployments. Pair it with LangSmith for tracing, evaluation, and monitoring. See Going to production for the full guide.

When should I use Deep Agents vs. LangChain or LangGraph directly?

All three are layers in the same stack — see the LangChain ecosystem overview for how they relate. Use Deep Agents when you want the full harness — planning, context management, delegation — out of the box. Use LangChain's create_agent when you want a lighter harness without the bundled middleware. Drop to LangGraph when the agent loop itself isn't the right shape and you need a custom graph.

The layers compose: any LangGraph CompiledStateGraph can be passed in as a sub-agent to a Deep Agent, so custom orchestration plugs in alongside the harness's defaults.


Resources


Acknowledgements

Inspired by Claude Code: an attempt to identify what makes it general-purpose, and push that further.

Security

Deep Agents follows a "trust the LLM" model. The agent can do anything its tools allow. Enforce boundaries at the tool/sandbox level, not by expecting the model to self-police. See the security policy for more information.

deepagents (langchain-ai/deepagents)

Searching Database…

Что это такое?Deep Agents — это open source каркас для агентов от LangChain со всем необходимым «из коробки»: это готовый к работе агент с продуманной архитектурой, в который уже встроены саб-агенты, файловая система, управление контекстом и скиллы — и любую из этих частей можно расширить, переопределить или заменить, не делая форк.
Это библиотека, которую я встраиваю в свой код, или готовое приложение?Библиотека: здесь на Python, а deepagents.js — версия на JavaScript/TypeScript. Внутри она работает на рантайме LangGraph, который даёт стриминг, персистентность и чекпоинты для продакшена.
Как запустить своего первого агента?Следуйте quickstart из README: только что созданный Deep Agent уже умеет планировать, читать и записывать файлы и управлять собственным контекстом. Дальше по документации вы добавляете инструменты, меняете модели, настраиваете промпты и конфигурируете саб-агентов.
Нужен ли ключ OpenAI или Anthropic, или подойдёт любая модель?Подойдёт любая модель с поддержкой tool calling — API уровня frontier вроде OpenAI, Anthropic и Google, хостинговые open-weight модели у провайдеров вроде Baseten или Fireworks или самостоятельно развёрнутые через Ollama, vLLM и llama.cpp. Можно использовать любую чат-модель LangChain.
Он может выполнять команды в шелле и править файлы — что мешает ему натворить бед?По умолчанию — ничего: Deep Agents придерживается модели «доверяй LLM», поэтому агент может делать всё, что позволяют его инструменты. Ограничения задавайте на уровне инструментов или песочницы, а встроенный режим human-in-the-loop используйте, чтобы одобрять вызовы инструментов до их выполнения.
То есть чтобы этим пользоваться, нужно уметь программировать?Да — проект рассчитан на разработчиков, которые собирают агентов на Python или TypeScript со своими инструментами и моделями. Если вы только начинаете, в репозитории есть рабочие примеры, а команда LangChain проводит бесплатные курсы LangChain Academy.
Что уже входит в комплект?Саб-агенты с изолированными контекстными окнами, подключаемая файловая система (локальная, песочница или удалённые бэкенды), управление контекстом, которое суммаризирует длинные диалоги и выгружает вывод инструментов на диск, доступ к шеллу, память, сохраняющаяся между сессиями, одобрения в режиме human-in-the-loop, загружаемые скиллы и любой MCP-сервер в качестве инструмента.
Чем это отличается от LangChain или LangGraph?Это слои одного стека: LangGraph — графовый рантайм, create_agent из LangChain — минимальный каркас, а Deep Agents — полноценный каркас с продуманной архитектурой поверх них, куда уже включены планирование, управление контекстом и делегирование. Слои сочетаются: любой граф LangGraph можно передать как саб-агента в Deep Agent.
Что такое Deep Agents Code?Готовый агент для программирования в терминале, похожий на Claude Code или Cursor, но работающий с любой LLM, на которую вы его нацелите. Устанавливается командой: curl -LsSf | bash.
Зачем это делать, если уже есть Claude Code?Именно он и послужил заявленным источником вдохновения: Deep Agents — попытка понять, что делает Claude Code универсальным, и развить это дальше — в виде open source каркаса, который работает с любой LLM и позволяет переопределить любую часть.
Size
348.2 MB
Stars
30.4K
Age
1y
Commits · 90 Days