deepagents CLI, installed from the deepagents-cli package, provides deployment tooling for Managed Deep Agents. Use it to scaffold local agent projects, deploy them to LangSmith, manage Managed Deep Agent resources, and register MCP servers.
Managed Deep Agents is in private beta, available on LangSmith Cloud in the US region only. Join the waitlist to request access.
Requirements
Managed Deep Agents requires
deepagents-cli>=0.2.2.deepagents-cli with uv (preferred) or pip:
uv install, run uv tool upgrade deepagents-cli.
The CLI reads LANGSMITH_API_KEY. To create a key, see Create an API key. To override the default endpoint, set LANGSMITH_ENDPOINT.
.env files can set API keys. Project .env files cannot set endpoint, proxy, or TLS environment variables for managed API requests. Set those overrides in your shell or in ~/.deepagents/.env.
Command overview
Bare
deepagents invocations do not start an interactive REPL. Install and run Deep Agents Code for interactive coding sessions.
Initialize projects
Usedeepagents init to create a project directory:
The
init command creates the following files in the project directory:
Deploy projects
Rundeepagents deploy from a project directory:
--detach to skip polling and exit immediately after create or update.
deepagents deploy --dry-run prints JSON with:
Target existing agents
For shared repositories or intentional updates to an existing Managed Deep Agent, declare the target inagent.json:
--yes to skip the prompt.
Validate the project before deploy
Deploy fails before sending a request when the project is malformed. Common validation rules include:agent.jsonandAGENTS.mdare required.agent.jsonmust contain a non-emptyname.backend.sandbox_configrequiresbackend.typeto besandbox.backend.sandbox_config.scopemust bethreadoragent.backend.sandbox_config.policy_idsmust be an array of strings.backend.sandbox_config.idle_ttl_secondsandbackend.sandbox_config.delete_after_stop_secondsmust be integers.- Symlinks are not allowed in deploy project inputs.
tools.jsonmust contain atoolsarray.- Each tool in
tools.jsonmust includenameandmcp_server_url. - Skill files require YAML frontmatter with
nameanddescription. - Subagent directories require
agent.jsonandAGENTS.md. - Legacy
deepagents.tomlandmcp.jsonfiles produce migration hints instead of being deployed.
deepagents mcp-servers connect <id|name|url>.
Manage agents
List agents:
Delete an agent:
--yes:
Manage MCP servers
For a practical setup guide, see Connect tools.
Commands that take
<server> accept an MCP server ID, exact name, or URL. Non-ID values are resolved against deepagents mcp-servers list; URL matching ignores case and trailing slashes. If a name or URL matches more than one server, re-run the command with the server ID.
Add MCP servers
Register a static-header server:
Register an OAuth MCP server:
add supports the same OAuth flags as connect: --scope, --force-new, --timeout, and --no-browser.
List MCP server tools
List a registered server’s tools:tools.json snippet. For OAuth servers, connect first so the MCP server record includes the caller’s oauth_provider_id.
Update MCP servers
Update a server URL or headers:
The command requires at least one change flag.
Delete an MCP server:
--yes:
Connect OAuth MCP servers
Start or reuse OAuth authorization:
If authorization is pending, the CLI prints the verification URL. When
--timeout 0 is set, the CLI starts authorization and exits. Re-run deepagents mcp-servers connect <id|name|url> later to complete or reuse the connection.
Project file reference
Managed Deep Agents projects use this layout:agent.json
agent.json configures the Managed Deep Agent resource:
Configure the backend
Managed Deep Agents projects generated bydeepagents-cli>=0.2.2 use the state backend. Use a LangSmith sandbox backend when the agent needs an isolated environment for code execution, filesystem work, or long-running tasks.
Sandbox backends can include optional sandbox settings:
backend.sandbox_config is valid only when backend.type is sandbox. For standalone sandbox features such as snapshots, service URLs, permissions, CLI commands, and SDK usage, see the LangSmith sandboxes overview.
Configure permissions
The optionalpermissions field in agent.json sets identity, visibility, and tenant access. Supported values are:
AGENTS.md
AGENTS.md contains the main agent instructions. The CLI sends this content as the agent system prompt and stores it in the managed file tree.
tools.json
tools.json configures MCP-backed tools. deepagents init creates this file with an empty tools array. Add tool entries after registering an MCP server:
name and mcp_server_url. mcp_server_name and display_name are optional. interrupt_config is optional and must be an object when present. Key each interrupt entry by "{mcp_server_url}::{tool_name}". Additional ::{mcp_server_name} components are accepted for compatibility.
skills
Each skill lives underskills/<name>/SKILL.md and requires YAML frontmatter:
subagents
Each subagent lives undersubagents/<name>/ and requires:
Example subagent
agent.json:
model_id key is still accepted in local subagent files, but new projects should use model. The REST API SubagentSpec uses model_id.
Subagent names come from directory names. Names are checked case insensitively for duplicates.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

