Deploying a Managed Deep Agent creates or updates the hosted agent resource and syncs the managed file tree that contains instructions, skills, subagents, and tool configuration. Use the CLI for normal project-based workflows. Use the REST API when you need a custom client, automation that cannot shell out to the CLI, or direct control over request payloads.Documentation Index
Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
Use this file to discover all available pages before exploring further.
Managed Deep Agents is in private preview. 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. |
skills/ | Contains optional skills the agent can use. |
.gitignore | Excludes local environment files. |
| File or directory | Purpose |
|---|---|
subagents/ | Contains subagent definitions for delegated work. |
tools.json | Configures the MCP-backed tools the agent can call. Required if the agent uses MCP tools. |
agent.json uses the readable local CLI shape:
AGENTS.md to define the agent’s behavior. Add skills or subagents if your agent needs extra procedures or delegated workers.
If your agent calls MCP tools, register the MCP server once for the workspace, then add a tools.json that references it by URL before you deploy.
Choose a backend
Managed Deep Agents projects generated by the CLI use a LangSmith sandbox backend by default:| Backend type | Use for |
|---|---|
thread_scoped_sandbox | Default. Scope LangSmith sandbox resources to each thread. |
agent_scoped_sandbox | Scope LangSmith sandbox resources to the agent. |
default | Use no sandbox-specific backend behavior. |
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.

