Managed Deep Agents is in private preview, available on LangSmith Cloud in the US region only. Join the waitlist to request access.
CLI: deploy from project files
The CLI scaffolds a local project, validates files, checks referenced MCP servers, and deploys the project to Managed Deep Agents.Create a project
Create a Managed Deep Agents project:| File or directory | Purpose |
|---|---|
agent.json | Configures the managed agent name, model, backend, and optional target agent_id. |
AGENTS.md | Defines the agent instructions. |
tools.json | Starts empty. Add MCP-backed tools after registering an MCP server. |
skills/example-skill/ | Contains an example skill you can edit, replace, or delete. |
subagents/researcher/ | Contains an example subagent you can edit, replace, or delete. |
.gitignore | Excludes local environment files. |
| File or directory | Purpose |
|---|---|
skills/<name>/ | Contains additional skills the agent can use. |
subagents/<name>/ | Contains additional subagent definitions for delegated work. |
agent.json uses the readable local CLI shape:
AGENTS.md to define the agent’s behavior. The full project layout that deploy syncs to the managed file tree is:
deepagents init scaffolds an empty tools.json, one example skill, and one example subagent so the first deploy succeeds without first registering an MCP server. Edit or remove the examples to fit your agent. Deploy reads every file in the project and syncs the tree to the Context Hub agent repo. For the complete field reference, see the CLI reference.
Add MCP tools
To let the agent call MCP tools, register the MCP server once for the workspace, then add tool entries to the projecttools.json. Tool entries reference a registered server by URL.
After you register a server, list its tools and print a paste-ready tools.json snippet:
deepagents mcp-servers add command also tries to list tools after registration. Pass --no-tools when you want to skip that discovery step.
tools.json
name and mcp_server_url. The mcp_server_name and display_name fields are optional. Use the optional interrupt_config object to require human approval before a tool runs. Key each entry by "{mcp_server_url}::{tool_name}" and set it to true.
Deploy validates referenced MCP server URLs before sending a request. If a server URL is not registered, deploy fails with a hint to add it. For server setup and OAuth, see Connect tools.
Add subagents
Subagents are delegated workers the main agent can call for focused tasks. Add asubagents/ directory to the project root, then create one directory per subagent. Each subagent directory requires an agent.json and an AGENTS.md, and can include its own tools.json and skills/. The subagent name comes from its directory name.
agent.json supports an optional description and model:
subagents/researcher/agent.json
model_id key still works in local subagent files, but use model for new projects. The REST API subagent schema still uses model_id.
Write the subagent instructions in subagents/researcher/AGENTS.md:
subagents/researcher/AGENTS.md
subagents/researcher/tools.json with the same shape as the project-level tools.json. Subagent names are checked case-insensitively for duplicates.
Review the complete project
Tools and subagents are not configured insideagent.json. agent.json holds only agent metadata, model, and backend. Tools live in tools.json, and subagents live in the subagents/ directory. A project that uses all three looks like this:
agent.json stays focused on agent metadata, model, and backend:
agent.json
AGENTS.md defines the main agent instructions:
AGENTS.md
tools.json references the workspace MCP server the main agent calls:
tools.json
subagents/researcher/agent.json sets the subagent metadata and model:
subagents/researcher/agent.json
subagents/researcher/AGENTS.md defines the subagent instructions:
subagents/researcher/AGENTS.md
subagents/researcher/tools.json gives the subagent its own MCP tools:
subagents/researcher/tools.json
deepagents deploy --dry-run to inspect the assembled agent payload and managed file tree before you deploy.
Choose a backend
Managed Deep Agents projects generated by the CLI use thedefault backend:
| Backend type | Use for |
|---|---|
default | Use no sandbox-specific backend behavior. |
thread_scoped_sandbox | Scope LangSmith sandbox resources to each thread. |
agent_scoped_sandbox | Scope LangSmith sandbox resources to the agent. |
backend.sandbox is valid only when backend.type is thread_scoped_sandbox or agent_scoped_sandbox. For standalone sandbox features such as snapshots, service URLs, permissions, CLI commands, and SDK usage, see the LangSmith sandboxes overview.
Deploy the project
Deploy the local project:/v1/deepagents/agents. Later deploys update the same remote agent by using user-local deploy state, not hidden state committed to the repository.
On success, the CLI prints the agent name, ID, short revision, the agent URL, and a post-deploy MCP health check:
mcp_check.ok value of True confirms the agent can reach the MCP servers its tools reference. Each deploy creates a new agent revision, even when no managed files changed, because deploy always sends a metadata update. The managed file tree itself only changes when its contents do.
Creating a Managed Deep Agent creates:
- A Managed Deep Agent resource.
- A separate LangSmith tracing project for the agent.
- A Context Hub agent repo that stores the managed file tree.
Update a shared agent
For shared repositories or intentional updates to an existing Managed Deep Agent, declare the target visibly inagent.json:
--yes:
--dry-run to inspect the agent payload and managed file tree before deploy:
API: create or update an agent
Create and update payloads can use the same top-levelmodel field that deepagents init writes to agent.json. Use the same backend object for sandbox configuration.
Set request defaults:
X-Api-Key header:
POST /v1/deepagents/agents:
- Python (httpx)
- JavaScript (fetch)
- cURL
| Task | Route |
|---|---|
| List agents | GET /v1/deepagents/agents |
| Get an agent | GET /v1/deepagents/agents/{agent_id} |
| Update an agent | PATCH /v1/deepagents/agents/{agent_id} |
| Delete an agent | DELETE /v1/deepagents/agents/{agent_id} |
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

