Managed Deep Agents is a hosted runtime for creating, running, and operating deep agents in LangSmith. The recommended workflow is to scaffold a local agent project withDocumentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-vicmda-1780088974-0fb0763.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
deepagents-cli, edit files locally, register or connect MCP servers when needed, and deploy the project to Managed Deep Agents.
Managed Deep Agents is in private preview. Join the waitlist to request access.
The Managed Deep Agents deploy flow requires the beta release of
deepagents-cli. The stable Deep Agents deploy experience remains available and unchanged while Managed Deep Agents is in private preview.When to use Managed Deep Agents
Use Managed Deep Agents when you want to:- Create and manage deep agents from local project files.
- Run long-running agents without standing up a custom agent server.
- Stream runs and preserve durable thread state.
- Use a managed file tree for instructions, skills, subagents, tools, and runtime files.
- Register workspace-level MCP servers, including OAuth MCP servers.
- Inspect traces and agent behavior in LangSmith.
Prerequisites
Before you start, make sure you have:- Managed Deep Agents private preview access.
- A LangSmith API key for a workspace with private preview access.
- The beta release of
deepagents-cli.
uv:
pip:
If
deepagents init, deploy, agents, or mcp-servers are missing or behave unexpectedly, confirm the beta is active with deepagents --version. A previously installed stable deepagents can shadow the beta release on your PATH.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.
Model configuration
The preferred local config uses top-levelmodel:
model or runtime, not both. The CLI rejects configs that contain both fields.
Deploy the agent
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 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.
| Flag | Use |
|---|---|
--dry-run | Print the deploy payload and managed file tree without sending a request. |
--detach | Exit after the create or update request without polling health. |
--reset | Discard local deploy state and create a fresh agent. Cannot be used when agent.json declares agent_id. |
--yes | Confirm target-agent updates without prompting. Useful in automation. |
Update a shared agent
For shared repositories or intentional updates to an existing Managed Deep Agent, declare the target visibly inagent.json:
--yes:
Configure MCP servers
MCP servers are workspace-level resources. Register or connect MCP servers before deploying an agent that references them.Add a static-header MCP server
Register a server:Add an OAuth MCP server
Register and connect an OAuth MCP server:- Creates the MCP server with
auth_type=oauthandoauth_mode=per_user_dynamic_client. - Registers or discovers the caller’s per-user OAuth provider with
/v1/deepagents/mcp-servers/{mcp_server_id}/oauth-provider. - Starts an OAuth session with
/v1/deepagents/auth-sessions. - Prints and opens the verification URL.
- Polls
/v1/deepagents/auth-sessions/{session_id}until OAuth completes.
Reference MCP servers
Reference MCP tools from atools.json file in your project root. Each entry names a tool exposed by a registered MCP server and points at that server by URL:
name (the tool name as exposed by the MCP server) and mcp_server_url. The mcp_server_name and display_name fields are optional. Use interrupt_config to require human approval before a tool runs; key each entry by "{mcp_server_url}::{tool_name}::{mcp_server_name}" and set it to true.
deepagents init does not create tools.json. Add it yourself when your agent calls MCP tools, then run deepagents deploy. An agent with no tools.json deploys with no MCP tools.deepagents mcp-servers connect <mcp_server_id>.
Manage agents and MCP servers
List agents:Use the REST API directly
Use the CLI for normal deploy workflows. Use the REST API when you need a custom client, a workflow that cannot shell out to the CLI, or direct control over request payloads. Set request defaults:X-Api-Key header:
Create an agent
Create the agent withPOST /v1/deepagents/agents. REST payloads use the API shape, including runtime.model.model_id:
- Python (httpx)
- JavaScript (fetch)
- cURL
Register MCP servers
Register a static-header MCP server withPOST /v1/deepagents/mcp-servers:
POST /v1/deepagents/mcp-serverswithauth_type=oauthandoauth_mode=per_user_dynamic_client.POST /v1/deepagents/mcp-servers/{mcp_server_id}/oauth-provider.POST /v1/deepagents/auth-sessions.GET /v1/deepagents/auth-sessions/{session_id}until the session status isCOMPLETED.
Create a thread
Create a thread before running the agent. Threads preserve conversation and execution state for long-running work:Stream a run
Start work on the thread withPOST /v1/deepagents/threads/{thread_id}/runs/stream. Include the agent_id in the request body and set Accept: text/event-stream:
| Stream mode | Use for |
|---|---|
values | Full state snapshots after steps. |
updates | Incremental state updates as the agent works. |
messages-tuple | Token-level message output for chat UIs. |
messages-tuple mode emits a messages event. The payload is a [chunk, metadata] tuple.
Inspect the result in LangSmith
Managed Deep Agents runs are traced in the separate tracing project created for the agent. Open traces in LangSmith to inspect:- User inputs and final responses.
- Model calls and tool calls.
- Subagent activity.
- Files and runtime state created during the run.
Limits and notes
Operational notes that apply during private preview. Behavior may change before general availability.Stable deploy experience
Managed Deep Agents deploy is available through the beta CLI release during private preview. The stable Deep Agents deploy experience continues to work until Managed Deep Agents reaches public beta and the deploy command switches to the new behavior.Supported models
Pass model identifiers in the form{provider}:{model_id}. For example, anthropic:claude-sonnet-4-6. The runtime resolves models with init_chat_model, so any provider that init_chat_model supports is usable from Managed Deep Agents. See Supported providers and models for the current list.
Values without a colon are interpreted as references to a saved Playground configuration rather than as model identifiers, so always supply the full {provider}:{model_id} form when configuring a model directly.
Thread retention
Threads have no retention window or per-workspace cap during private preview. Create as many as you need. Existing threads remain accessible for the duration of the preview.Rate limits and quotas
The Managed Deep Agents endpoints do not enforce per-key, per-workspace, or per-agent request rate limits during private preview.Agent limits
Free LangSmith workspaces are limited to one Managed Deep Agent. Paid LangSmith plans can create unlimited agents. When a free workspace is already at its limit,deepagents deploy (and POST /v1/deepagents/agents) fails with HTTP 409 and a message to delete the existing agent or upgrade your plan.
Deleting agents
DELETE /agents/{agent_id} does not cascade to threads. Threads created against a deleted agent remain queryable but cannot start new runs. Track and delete threads explicitly when you want to clean them up.
API stability
Routes live under/v1/deepagents, but the surface is in private preview and may change before general availability. Breaking changes are communicated to preview customers directly through the contact provided when access was granted.
Support and feedback
Preview access includes direct support. The contact for bug reports and feature requests is included in the email you receive when access is granted.Private preview scope
Managed Deep Agents is available on LangSmith Cloud in the US region only during private preview. Self-hosted and Hybrid deployments are not supported, and EU and other regions will follow general availability. The API also does not mirror every LangSmith Deployment endpoint in private preview. A Managed Deep Agent is not a LangSmith Deployment.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

