Managed Deep Agents is in private preview, available on LangSmith Cloud in the US region only. If you do not have access yet, join the waitlist to request it before you start.
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.
deepagents-cli>=0.2.0.
Deploy your agent with the CLI
Install the CLI
Install To upgrade an existing
deepagents-cli with uv (preferred) or pip:uv install, run uv tool upgrade deepagents-cli.Create a project
Generate the project files:The command creates
agent.json, AGENTS.md, .gitignore, an empty tools.json, an example skill, and an example subagent.Edit the agent
Edit The generated project uses the
AGENTS.md to define the agent’s behavior.The generated agent.json uses the readable local CLI format:default backend so it can deploy without sandbox-specific configuration. Switch to thread_scoped_sandbox or agent_scoped_sandbox when the agent needs a LangSmith sandbox for code execution, filesystem work, or long-running tasks. For options, see Choose a backend.If the agent calls MCP tools, connect tools, run deepagents mcp-servers tools <id|name|url>, then paste the generated tool entries into tools.json.Deploy the agent
Deploy the project:On success, the CLI prints the agent name, agent ID, short revision, agent URL, and a post-deploy health check:Save the
agent_id for the run step. To confirm the agent deployed, list the agents in your workspace:If
deepagents init, deploy, agents, or mcp-servers are missing or behave unexpectedly, confirm the installed version is 0.2.0 or later with deepagents --version. An older deepagents can shadow the current release on your PATH.Run the agent with the API
Run a Managed Deep Agent with the REST API. The steps below use cURL. For Python and JavaScript examples, see Run an agent.Set request defaults
Reuse the
LANGSMITH_API_KEY from earlier, or set it again if you opened a new shell, then set the remaining request defaults:If a request returns 401 or 403, confirm your API key belongs to a workspace with private preview access.
Create a thread
options object is optional and shown here with its defaults. test_run marks the thread as a test run that is filtered out of usage and analytics. skip_memory_write_protection controls whether the runtime pauses for human approval before the agent writes to long-term memory. For the full field reference, see the API reference.Set the returned thread ID:Stream a run
text/event-stream). With the stream_mode shown, you receive incremental updates and messages-tuple events as the agent works, then a final values event that contains the run’s full state, including the agent’s response. user_timezone is optional: set it to the caller’s IANA timezone so the agent reasons about dates in local time. It defaults to the timezone configured on the agent, or UTC.Next steps
Connect tools
Add MCP-backed tools before deploying an agent that needs external capabilities.
Deploy an agent
Learn the full CLI and REST API deploy workflow.
CLI reference
Review all commands, flags, project files, and validation rules.
API reference
Review generated endpoint reference pages and common REST commands.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

