Skip to main content
The Managed Deep Agents API is a private preview API for creating, updating, connecting, and invoking Managed Deep Agents. Use the API when you need a custom client, CLI-free automation, or direct control over request payloads. For the recommended end-to-end workflow, see the quickstart.
Managed Deep Agents is in private preview. Join the waitlist to request access.

Set request defaults

The private preview API uses /v1/deepagents:
Requests require the X-Api-Key header:
For example, list agents with the base URL and header set above:
A missing X-Api-Key header returns 401 with {"error": "Unauthorized"}. A key that is invalid or lacks workspace access returns 403 with {"error": "Forbidden"}. These auth responses use a flat {"error": "..."} body, unlike the structured error body returned by other 4xx responses.

Understand resource groups

Managed Deep Agents are not LangSmith Deployments. Creating a Managed Deep Agent creates a Managed Deep Agent resource, a separate LangSmith tracing project, and a Context Hub agent repo for the managed file tree.

Configure sandboxes

Create-agent and update-agent payloads can include a backend object. Use default when the agent does not need sandbox-specific backend behavior:
Use thread_scoped_sandbox or agent_scoped_sandbox when the agent needs a LangSmith sandbox for code execution, filesystem work, or long-running tasks. Sandbox backend settings live under backend.sandbox and are valid only when backend.type is thread_scoped_sandbox or agent_scoped_sandbox:
The sandbox object accepts: For backend guidance, see Deploy an agent. For standalone sandbox concepts, see the LangSmith sandboxes overview.

Use common REST commands

Agents

See Deploy an agent for the create and update workflow. For deletion behavior, see Limits and notes.

Threads

See Run an agent for creating threads and managing the durable state they hold across runs.

Runs

See Run an agent for starting runs on a thread and streaming their output.

MCP servers

See Connect tools for registering MCP servers and storing the credentials your agent tools use.

MCP tools

See Connect tools for listing the tools a registered server exposes and building tools.json entries.

Auth sessions

See Connect tools for running the OAuth flow that authorizes MCP servers.

Paginate the agents list

GET /v1/deepagents/agents is cursor-paginated. Pass page_size (defaults to 20, maximum 100) and the opaque cursor returned by a previous request. The response wraps results in an items array alongside a next_cursor field that is null on the last page:
The endpoint also accepts name to filter by name substring, sort_by (created_at, updated_at, or name, defaults to updated_at), and sort_order (asc or desc, defaults to desc).

Understand API stability

Routes are versioned at /v1/, but the surface is in private preview and may change in backwards-incompatible ways before general availability. See API stability for breaking-change communication. The API does not mirror every LangSmith Deployment endpoint in private preview. Endpoint groups such as integrations, triggers, skills, sandboxes, auth providers, and auth tokens are not mirrored yet.