dcode) is an open source coding agent built on the Deep Agents SDK.
It works with any large language model and supports switching between providers or models mid-session.
Persistent memory carries context across conversations, customizable skills shape its behavior, and approval controls gate code execution.
Quickstart
Install and launch
Add provider credentials
Deep Agents Code works with any tool-calling LLM. OpenAI, Anthropic, and Google are available out of the box.Use the
/auth command to connect with a provider. See Providers for the full list and credential details.Web search uses Tavily. Add a key from
/auth or set TAVILY_API_KEY. See Enable web search.Choose a model (optional)
Run See Model providers for the full provider list, open weights options, and credential details.
/model inside a session to open the interactive switcher, or launch with --model:Give the agent a task
Enable tracing (optional)
To log agent operations, tool calls, and decisions in LangSmith, add the following to For more details and usage, see Trace with LangSmith.
~/.deepagents/.env or export the variables in your shell:~/.deepagents/.env
Deep Agents Code is not officially supported on Windows. Windows users can try running it under Windows Subsystem for Linux (WSL).
Capabilities
Deep Agents Code has the following built-in capabilities:- File operations - read, write, and edit files on disk.
- Shell execution - execute commands to run tests, build projects, manage dependencies, and interact with version control.
- Remote sandboxes - run agent tools remotely instead of on your local machine.
- Web search - search the web for up-to-date information and documentation. Requires a Tavily API key.
- Task planning and tracking - break down complex tasks into discrete steps and track progress.
- Goals and rubrics - define measurable objectives or grading criteria so the agent can check whether work is done.
- Subagents - delegate work to task-specific subagents.
- Memory storage and retrieval - store and retrieve information across sessions, enabling agents to remember project conventions and learned patterns.
- Context compaction & offloading - summarize older conversation messages and offload originals to storage.
- Human-in-the-loop - require human approval for sensitive tool operations.
- Skills - extend agent capabilities with custom expertise and instructions.
- MCP tools - load external tools from Model Context Protocol servers.
- Tracing - trace agent operations in LangSmith for observability and debugging.
Full list of built-in tools
Full list of built-in tools
Built-in tools
The agent comes with the following built-in tools which are available without configuration:1: Potentially destructive operations require user approval before execution. To bypass human approval, you can toggle auto-approve (shift+tab) or start with the option:
Non-interactive mode disables shell by default. Allowlist commands with
-S/--shell-allow-list (or DEEPAGENTS_CODE_SHELL_ALLOW_LIST). Use recommended for read-only safe defaults, or all to permit anything. See Non-interactive mode and piping./conversation_history/{thread_id}.md), replacing them in context with the summary. The agent can still retrieve the full history from the offloaded file if needed. The compact_conversation tool lets the agent (or you) trigger offloading on demand. When called as a tool, it requires user approval by default.3: When async subagents are configured via the [async_subagents] section in config.toml (see Async subagents), additional tools become available: start_async_task, update_async_task, and cancel_async_task (all approval-gated), plus check_async_task and list_async_tasks.Command reference
Command-line options
Command-line options
CLI commands
CLI commands
All management subcommands support
--json for machine-readable output. See command-line options for details.Destructive commands (agents reset, skills delete, threads delete) support --dry-run to preview what would happen without making changes. In JSON mode, --dry-run returns the same envelope with a dry_run: true field.Configuration
For the full reference—includingconfig.toml schema, provider parameters, profile overrides, and hook configuration—see Configuration.
Deep Agents Code stores all configuration under ~/.deepagents/. Within that directory, each agent gets its own subdirectory (default: agent):
Interactive mode
Type naturally as you would in a chat interface. The agent uses its built-in tools, skills, and memory to help you with tasks.Slash commands
Slash commands
Use these commands within a Deep Agents Code session:
/model: Switch models or open the interactive model selector./effort: Set reasoning effort for the current model./agents: Hot-swap between pre-configured agents without relaunching. See Command reference for details./auth: Manage stored API keys for model providers and services (such as Tavily web search). See Provider credentials for details./goal <objective>: Draft acceptance criteria from a measurable objective. See Goals and rubrics./rubric: Set explicit acceptance criteria for grading. See Goals and rubrics./remember [context]: Review conversation and update memory and skills. Optionally pass additional context./skill:<name> [args]: Directly invoke a skill by name. The skill’sSKILL.mdinstructions are injected into the prompt along with any arguments you provide./skill-creator [task]: Guide for creating effective agent skills./offload(alias/compact) - Free up context window space by offloading messages to storage with a summary placeholder. The agent can retrieve the full history from the offloaded file if needed./tokens: Display current context window token usage breakdown./clear: Clear conversation history and start a new thread./force-clear: Stop active work, clear the chat, and start a new thread./copy: Copy the latest assistant message to the clipboard./threads: Browse and resume previous conversation threads./mcp [login <server> | reconnect]: Show active MCP servers and tools.login <server>runs the OAuth flow for a server;reconnectloads deferred logins./notifications: Configure startup warning preferences./reload: Re-read.envfiles, refresh configuration, and re-discover skills without restarting. Conversation state is preserved. SeeDEEPAGENTS_CODE_prefix for override behavior./theme: Open the interactive theme selector to switch color themes. Built-in themes are available plus any user-defined themes./scrollbar: Show or hide the chat scrollbar./update: Check for and install Deep Agents Code updates inline. Detects your install method (uv, Homebrew, pip) and runs the appropriate upgrade command./auto-update: Toggle automatic updates on or off./install: Install an optional integration./trace: Open the current thread in LangSmith./editor: Open the current prompt in your external editor ($VISUAL/$EDITOR). See External editor./restart: Restart the agent server./timestamps: Toggle message timestamp footers./changelog: Open Deep Agents Code changelog in your browser./docs: Open the documentation in your browser./feedback: Send feedback or report an issue./version(alias/about) - Show installeddeepagents-codeand SDK versions./help: Show help and available commands./quit: Exit application.
Shell commands
Shell commands
Type
! to enter shell mode, then type your command.Keyboard shortcuts
Keyboard shortcuts
General
Text editing in the promptThe chat input uses standard readline-style bindings:
macOS
Cmd+Left / Cmd+Right / Cmd+DeleteTerminal emulators intercept Cmd-modified keys before they reach the running application, so Deep Agents Code never receives them directly. Instead, the terminal translates them into the readline shortcuts above.- Ghostty: Works out of the box.
Cmd+Left,Cmd+Right, andCmd+Deleteare translated toCtrl+A,Ctrl+E, andCtrl+Uby default. - iTerm2: Not bound by default. Add the following under Settings → Profiles → Keys → Key Mappings as
Send Text with vim special chars:Cmd+Left→\x01(Ctrl+A)Cmd+Right→\x05(Ctrl+E)Cmd+Delete→\x15(Ctrl+U)
- Terminal.app: No native UI for this remap. Use the
Ctrl-based shortcuts directly.
Option+Left / Option+Right) is handled the same way: terminals send Esc+b / Esc+f, which Deep Agents Code interprets as word-left/right.Non-interactive mode and piping
Use-n to run a single task without launching the interactive UI:
-n or -m, the piped content appears first, followed by the text you pass to the flag.
The maximum piped input size is 10 MiB.
-S/--shell-allow-list to enable specific commands (e.g., -S "pytest,git,make"), recommended for safe defaults, or all to permit any command.
Cap turn count
Cap turn count
Long-running or misbehaving agents in CI/CD pipelines can loop indefinitely.
--max-turns N gives operators a hard upper bound without having to touch SDK internals:N must be a positive integer, and overrides the internal safety default that otherwise caps runaway loops. Exits with code 124 (matching GNU timeout) when the budget is exceeded, so CI can distinguish a budget hit from a generic failure. Requires -n or piped stdin; otherwise exits with code 2.For a time-based limit instead of (or in addition to) a turn-count limit, see Cap wall-clock time with --timeout.Cap wall-clock time
Cap wall-clock time
--timeout SECONDS enforces a hard wall-clock limit on a non-interactive run. It complements --max-turns (turn count) with a time-based budget—whichever limit is hit first cancels the agent.--max-turns, so CI can treat both budget hits uniformly. Requires -n or piped stdin; otherwise exits with code 2.Clean output and buffering
Clean output and buffering
Use In non-interactive mode, the agent is instructed to make reasonable assumptions and proceed autonomously rather than ask clarifying questions. It also favors non-interactive command variants (e.g.,
-q for clean output suitable for piping into other commands, and --no-stream to buffer the full response (instead of streaming) before writing to stdout:npm init -y, apt-get install -y).Shell execution examples
Shell execution examples
Trace with LangSmith
Enable LangSmith tracing to see agent operations, tool calls, and decisions in a LangSmith project. Add your tracing keys to~/.deepagents/.env so tracing is enabled in every session without per-shell exports:
~/.deepagents/.env
.env in the project directory. See environment variables for the full loading order.
You can also set these as shell environment variables if you prefer. Shell exports always take precedence over .env values, so this is a good option for temporary overrides or testing:
Separate agent traces from app traces
Separate agent traces from app traces
Deep Agents Code can produce two kinds of LangSmith traces:Then configure For example, suppose you ask Deep Agents Code to debug a failing LangGraph test:If that test runs your app with LangSmith tracing enabled, those app traces are created by the shell process and go to
Agent tracesare Deep Agents Code’s own model calls, tool calls, orchestration, and middleware.Shell-command tracesare traces emitted by code that Deep Agents Code runs for you in a shell, such as tests, scripts, or a local LangGraph app.
DEEPAGENTS_CODE_LANGSMITH_PROJECT:~/.deepagents/.env
LANGSMITH_PROJECT for your application traces:.env
customer-support-agent. Deep Agents Code’s own reasoning and tool-use traces go to deepagents-code.You can also scope LangSmith credentials to Deep Agents Code using the DEEPAGENTS_CODE_ prefix (e.g., DEEPAGENTS_CODE_LANGSMITH_API_KEY).Dual-write traces to a second project
Dual-write traces to a second project
To mirror agent traces to a second LangSmith project, set When set and tracing is active, each agent run is written to both the primary project (
DEEPAGENTS_CODE_LANGSMITH_REPLICA_PROJECTS. This is useful for sending the same traces to both a personal project and a shared team project.~/.deepagents/.env
DEEPAGENTS_CODE_LANGSMITH_PROJECT, or deepagents-code by default) and the project you name here. Leave the variable unset to write to a single project as usual./trace to print the URL and open it in your browser.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

