An independently maintained development fork of LangChain Deep Agents. This repository contains the Deep Agents Python SDK, terminal coding agent, CLI, protocol support, integrations, evaluation tools, and examples in one monorepo.
- Long-running agents with planning and context management
- Sub-agent delegation with isolated context
- Filesystem and shell tools
- Interactive terminal coding agent
- Multiple LLM provider integrations
- Persistent conversations and memory
- MCP and Agent Client Protocol support
- Local, sandboxed, and remote execution backends
libs/
|-- deepagents/ Core Python SDK
|-- code/ Interactive terminal coding agent (`dcode`)
|-- cli/ Deployment CLI
|-- acp/ Agent Client Protocol support
|-- evals/ Evaluation suite
`-- partners/ Partner integrations
examples/ Example agents and deployment patterns
- uv
- Git
- Python 3.11 or newer (managed automatically by
uv) - An API key for the model provider you plan to use
Do not commit API keys. For file-based local configuration, copy the root
.env.example file to libs/code/.env; .env is ignored by Git.
git clone <your-repository-url>
cd <repository-directory>\libs\code
uv sync --group test
$env:OPENAI_API_KEY = Read-Host "OpenAI API key"
uv run dcodegit clone <your-repository-url>
cd <repository-directory>/libs/code
uv sync --group test
read -s OPENAI_API_KEY
export OPENAI_API_KEY
uv run dcodeThe local libs/deepagents package is installed in editable mode, so SDK
changes are immediately available to the terminal agent.
cd libs/deepagents
uv sync --group test
uv run --group test pytest tests/unit_testsRun quality checks from the package you changed:
uv run --all-groups ruff check .
uv run --all-groups ruff format . --check
uv run --all-groups ty check deepagentsThe package Makefiles provide equivalent test, lint, format, and
benchmark targets on systems with GNU Make installed.
The terminal agent supports OpenAI, Anthropic, Google, and other model providers. Set only the keys required by your selected provider:
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_API_KEY=
TAVILY_API_KEY=Provider keys can be entered for the current shell session or stored in a
local .env file. Never place real credentials in .env.example, source
files, commits, issues, or chat messages.
Unit tests do not require network access:
cd libs/code
uv run --group test pytest -n auto --benchmark-disable --disable-socket \
--allow-unix-socket tests/unit_testsIntegration tests can use external services and may require provider credentials:
cd libs/code
uv run --group test pytest tests/integration_testsDeep Agents follows a tool-boundary security model: an agent can perform any action allowed by its configured tools. Use restricted credentials, review tool permissions, and prefer isolated sandboxes for untrusted workloads.
If a credential is accidentally exposed, revoke it at the provider immediately and replace it. Removing it from a later commit is not enough.
This repository is based on langchain-ai/deepagents and is distributed under the MIT License. Original copyright and license notices are preserved.
To pull future upstream changes after cloning this fork:
git remote add upstream https://github.com/langchain-ai/deepagents.git
git fetch upstream