Skip to main content

🧠🤖 Deep Agents

PyPI - Version PyPI - License PyPI - Downloads Twitter

Looking for the JS/TS version? Check out Deep Agents.js.

To help you ship LangChain apps to production faster, check out LangSmith. LangSmith is a unified developer platform for building, testing, and monitoring LLM applications.

Quick Install

uv add deepagents

🤔 What is this?

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

Principles:

  • Opinionated — defaults tuned for long-horizon, multi-step work
  • Extensible — override or replace any piece without forking
  • Model-agnostic — works with any LLM that supports tool calling: frontier, open-weight, or local
  • Production-ready — built on LangGraph (streaming, persistence, checkpointing) with first-class tracing, evaluation, and deployment via LangSmith

Features include:

  • Sub-agents — delegate tasks to agents with isolated context windows
  • Filesystem — read, write, edit, or search over pluggable local, sandboxed, or remote backends
  • Context management — summarize long threads and offload tool outputs to disk
  • Shell access — run commands in your sandbox of choice
  • Persistent memory — pluggable state and store backends for cross-session recall
  • Human-in-the-loop — approve, edit, or reject tool calls before they run
  • Skills — reusable behaviors the agent can load on demand
  • Tools — bring your own functions or any MCP server
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. For a full overview and quickstart of Deep Agents, the best resource is our docs.

Acknowledgements: This project was primarily inspired by Claude Code, and initially was largely an attempt to see what made Claude Code general purpose, and make it even more so.

❓ 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

📕 Releases & Versioning

See our Releases and Versioning policies.

🔒 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.

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For local setup and package-specific checks, see the Development Guide. For contribution policy, see the Contributing Guide.

Metadata

Release files for deepagents 0.7.27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepagents 0.7.27
File Size Uploaded Provenance
deepagents-0.7.27.tar.gz 338.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for deepagents 0.7.27
File Interpreter ABI Platform
deepagents-0.7.27-py3-none-any.whl Python 3 none any Details

Total release size: 705.9 kB

Release files / deepagents-0.7.27.tar.gz

Download URL deepagents-0.7.27.tar.gz
Size 338.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fc23884c0188d3b970341a5780d416b61492caaf49b665de62d2cafb830425db
BLAKE2b-256 checksum
How to use checksums
3f6ee5232c8499e84fda52155fb0a54d42afbf3944046eda17139a7e3d9eb02e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / deepagents-0.7.27-py3-none-any.whl

Download URL deepagents-0.7.27-py3-none-any.whl
Size 367.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aed61bce6b15401923b476de6f94560678a16a02ca0f3a6fa22330595b841845
BLAKE2b-256 checksum
How to use checksums
654e46f3ce7489f09bca5423537cdc4fc114b469e59d344812b5e4bdca7cc334
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Security for deepagents 0.7.27

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.7.27 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page