Back to Skills

managed-deep-agents

INVOKE THIS SKILL when creating, deploying, running, or operating Managed Deep Agents in LangSmith. Covers deepagents-cli, the Python and TypeScript SDKs, React useStream, REST fallbacks, MCP tools, interrupts, backends, and the managed agent file tree.

818stars70forksUpdated 6/25/2026

Security Assessment

Medium Risk(65/100)

Detected risks:

Secret Exposure([SKILL.md] API_KEY=)
Sensitive File Access([SKILL.md] .env)
Security Score65/100

About managed-deep-agents

Managed Deep Agents is a hosted runtime in LangSmith for creating, running, and operating Deep Agents. It packages the operational layer around the open-source Deep Agents harness, providing a versioned Context Hub agent repository, durable threads, streamed runs, MCP credential storage, managed files, and optional LangSmith sandboxes. Choose this path when the user wants LangSmith to host and operate the agent; for self-hosted deployments, custom application routes, or the full Agent Server API surface, a standard LangSmith Deployment via the langgraph CLI is the alternative.

Several interfaces are available, each suited to different work. The deepagents-cli (version 0.2.2 or higher) handles the normal project-file workflow: scaffolding with `deepagents init`, editing files, deploying with `deepagents deploy`, and managing MCP servers. The Python SDK (managed-deepagents) and TypeScript SDK (@langchain/managed-deepagents) cover server-side automation, tests, scripts, services, and LangGraph-compatible streaming. React useStream from @langchain/react is for chat UIs that let LangGraph own thread, run, and projection state, and a REST surface under /v1/deepagents is the low-level fallback when a client does not yet expose a field. Prerequisites include preview access in the target workspace and a LangSmith API key; SDKs default to the api.smith.langchain.com/v1/deepagents endpoint, and REST requests authenticate with an X-Api-Key header. Long-lived API keys must never be exposed in browser code.

A project is a local directory containing agent.json (name, description, model, backend, permissions, optional target agent_id), AGENTS.md (main instructions), tools.json (MCP-backed tools plus interrupt_config), a skills/ directory, and subagents/ definitions, which the CLI deploys into the managed Context Hub repo. Backends are either state (no sandbox needed) or sandbox (for code execution and filesystem work, with a thread or agent scope). Resource groups cover agents, threads, runs, MCP servers, MCP tools, and auth sessions. MCP tools are configured by tool name and server URL, with interrupt_config keys formed as {mcp_server_url}::{tool_name} and set to true to require human approval before a tool runs.

FAQ

When should I use Managed Deep Agents instead of a self-hosted deployment?

Use it when you want LangSmith to host and operate the agent. For self-hosted deployments, custom application routes, or the full Agent Server API surface, use a standard LangSmith Deployment via the langgraph CLI instead.

What clients can I use?

It supports the deepagents-cli (0.2.2+), a Python SDK (managed-deepagents), a TypeScript SDK (@langchain/managed-deepagents), React useStream, and a REST surface under /v1/deepagents. Prefer the CLI for local agent projects and the SDKs for application code.

What is the difference between the state and sandbox backends?

Use the state backend when the agent does not need sandbox-specific behavior, and the sandbox backend when it needs a LangSmith sandbox for code execution, filesystem work, or long-running tasks. The sandbox scope must be either thread or agent.

How are MCP tool interrupts configured?

Tools are listed in a tools array with their MCP server URL and name, and interrupt_config keys use the form {mcp_server_url}::{tool_name}. Setting the interrupt value to true requires human approval before that tool runs.

How do I authenticate requests?

Set a LangSmith API key for the workspace; SDKs read LANGSMITH_API_KEY and REST requests send it as an X-Api-Key header. A long-lived API key must never be exposed in browser code, so route browser requests through your own backend.

Install managed-deep-agents

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill