옵션
집 Skill MCP 도구 managed-deep-agents

LangSmith에서 관리되는 심층 에이전트(Managed Deep Agents)를 생성, 배포, 실행 또는 운영할 때 이 스킬을 호출하십시오. 여기에는 deepagents-cli, Python 및 TypeScript SDK, React useStream, REST 대체 방법, MCP 도구, 인터럽트, 백엔드 및 관리되는 에이전트 파일 트리가 포함됩니다.

...모든 것을 확장하십시오
15
업데이트 된 시간 2026년 8월 27일

관리형 딥 에이전트 소개

관리형 딥 에이전트(Managed Deep Agents)는 LangSmith에서 제공하는 호스팅 런타임으로, 딥 에이전트(Depth Agents)의 생성, 실행 및 운영을 위해 설계되었습니다. 이 서비스는 오픈소스 딥 에이전트 하네스(Harness) 주변에 운영 레이어를 패키징하여, 버전 관리된 컨텍스트 허브(Context Hub) 에이전트 저장소, 내구성 있는 스레드(thread), 스트리밍 실행(run), MCP 자격 증명 저장, 관리형 파일, 그리고 선택적인 LangSandboxes를 제공합니다. 사용자가 LangSmith에 에이전트의 호스팅과 운영을 위임하고자 할 때 이 경로를 선택합니다. 자체 호스팅 배포, 맞춤형 애플리케이션 라우팅, 또는 전체 에이전트 서버 API 표면이 필요한 경우, langgraph CLI를 통한 표준 LangSmith 배포가 대안이 됩니다.

여러 인터페이스가 제공되며, 각각 다른 작업에 적합합니다. deepagents-cli(버전 0.2.2 이상)는 일반적인 프로젝트 파일 워크플로우를 처리합니다: deepagents init을 통한 스키폴딩, 파일 편집, deepagents deploy를 통한 배포, 그리고 MCP 서버 관리를 포함합니다. Python SDK(managed-deepagents)와 TypeScript SDK(@langchain/managed-deepagents)는 서버 측 자동화, 테스트, 스크립트, 서비스 및 LangGraph 호환 스트리밍을 다룹니다. @langchain/react의 React useStream은 LangGraph가 스레드, 실행, 그리고 투영 상태(projection state)를 소유하는 채팅 UI에 사용됩니다. /v1/deepagents 아래의 REST 표면은 클라이언트가 아직 필드를 노출하지 않을 때를 위한 저수준 대체 수단입니다. 전제 조건으로는 대상 워크스페이스의 미리보기 액세스 권한과 LangSmith API 키가 필요합니다. SDK는 기본적으로 api.smith.langchain.com/v1/deepagents 엔드포인트를 사용하며, REST 요청은 X-Api-Key 헤더를 통해 인증됩니다. 장기 유효 기간을 가진 API 키는 브라우저 코드에 절대 노출되어서는 안 됩니다.

프로젝트는 에이전트.json(이름, 설명, 모델, 백엔드, 권한, 선택적 target agent_id), AGENTS.md(주요 지침), tools.json(MCP 기반 도구 및 interrupt_config), skills/ 디렉토리, 그리고 하위 에이전트(subagents) 정의를 포함하는 로컬 디렉토리입니다. CLI는 이를 관리형 컨텍스트 허브 저장소에 배포합니다. 백엔드는 샌드박스 필요 여부에 따라 상태(state) 또는 샌드박스(sandbox)로 나뉩니다. 샌드박스 백엔드는 코드 실행 및 파일 시스템 작업을 지원하며, 스레드 또는 에이전트 범위를 가집니다. 리소스 그룹에는 에이전트, 스레드, 실행, MCP 서버, MCP 도구, 인증 세션이 포함됩니다. MCP 도구는 도구 이름과 서버 URL로 구성되며, interrupt_config 키는 {mcp_server_url}::{tool_name} 형식으로 생성됩니다. 도구 실행 전에 인간의 승인을 요구하려면 해당 값을 true로 설정합니다.

자주 묻는 질문

언제 자체 호스팅 배포 대신 관리형 딥 에이전트를 사용해야 하나요?

LangSmith가 에이전트를 호스팅하고 운영하기를 원할 때 사용하십시오. 자체 호스팅 배포, 맞춤형 애플리케이션 라우팅, 또는 전체 에이전트 서버 API 표면이 필요한 경우, langgraph CLI를 통한 표준 LangSmith 배포를 대신 사용하십시오.

어떤 클라이언트를 사용할 수 있나요?

deepagents-cli(0.2.2 이상), Python SDK(managed-deepagents), TypeScript SDK(@langchain/managed-deepagents), React useStream, 그리고 /v1/deepagents 아래의 REST 표면을 지원합니다. 로컬 에이전트 프로젝트에는 CLI를, 애플리케이션 코드에는 SDK를 선호하십시오.

상태(state) 백엔드와 샌드박스(sandbox) 백엔드의 차이는 무엇인가요?

에이전트가 샌드박스 특화 동작을 필요로 하지 않을 때는 상태 백엔드를 사용하고, 코드 실행, 파일 시스템 작업, 또는 장기 실행 작업을 위해 LangSmith 샌드박스가 필요할 때는 샌드박스 백엔드를 사용하십시오. 샌드박스 범위는 스레드 또는 에이전트 중 하나여야 합니다.

MCP 도구 인터럽트는 어떻게 구성되나요?

도구는 MCP 서버 URL과 이름이 포함된 tools 배열에 나열되며, interrupt_config 키는 {mcp_server_url}::{tool_name} 형식을 사용합니다. 인터럽트 값을 true로 설정하면 해당 도구 실행 전에 인간의 승인을 요구합니다.

요청은 어떻게 인증하나요?

워크스페이스에 대한 LangSmith API 키를 설정하십시오. SDK는 LANGSMITH_API_KEY를 읽으며, REST 요청은 이를 X-Api-Key 헤더로 전송합니다. 장기 유효 기간을 가진 API 키는 브라우저 코드에 절대 노출되어서는 안 되므로, 브라우저 요청은 자체 백엔드를 통해 라우팅하십시오.

GitHub에서 보기

Overview

Managed Deep Agents (MDA) is a hosted runtime for code-first Deep Agents in LangSmith. You author an agent in Python or TypeScript, test it locally with mda dev, and ship it with mda deploy. It pairs the open-source Deep Agents harness (see [[deep-agents-core]]) with managed infrastructure: durable runs, sandboxes, Context Hub-backed instructions and skills, memory, traces, and hosted LangGraph deployment.

The core idea is that an agent is a directory. A file's location determines its role, and the CLI compiles that directory into a managed LangGraph app.

MDA is in public beta and runs on US LangSmith Cloud only.

When to use

Use this skill when the user wants to build a Deep Agent in code and run it on LangSmith without operating their own server, or to add tools, middleware, memory, identity, schedules, channels, skills, sandboxes, or evals to one.

Use a standard LangSmith Deployment instead (see [[langgraph-cli]], langgraph deploy) when the user needs custom application code, custom HTTP routes, authentication beyond a LangSmith key or Supabase, stronger isolation, maximum scalability, or a region other than US.

Guide the user through their first agent

When a user is new to MDA, or says anything like "help me build an agent", do not scaffold immediately. Run this flow. It costs two questions and prevents building something the platform cannot host.

ask what they want to build -> check it against the limits -> confirm the shape-> scaffold -> wire the smallest thing that runs -> mda dev -> deploy

1. Ask what they want to build

Ask in plain language, not in MDA vocabulary. The user does not yet know what a "channel" or a "sandbox" is.

Ask these two things first:

  • What should the agent do? ("Answer questions about our docs", "triage incoming bugs", "post a summary every morning".)
  • Who or what talks to it, and from where? (Them in a browser, their app's users, a Slack workspace, nobody — it runs on a timer.)

Then ask only the follow-ups that the answers actually raise:

  • Does it need to remember anything between separate conversations?
  • Does it need to reach a private API, database, or internal service?
  • Should anything require a human to approve before it happens?
  • Does it need to write files or run code?

Stop asking once you can name the capabilities. Two or three questions is usually enough.

2. Check the answer against the limits

Before you promise anything, check the request against What MDA cannot do below. If part of the request is out of scope, say so in one sentence, offer the nearest supported thing, and keep going with the rest. Do not quietly build a smaller agent and present it as what they asked for.

The common redirect: if they need custom HTTP routes, their own auth, or non-US hosting, tell them MDA is the wrong layer and point at langgraph deploy ([[langgraph-cli]]).

3. Map the answer onto capabilities

What the user describesWhat to reach forWhere it lives
How it should behave, its tone, its rulesInstructionsinstructions.md
Calls our API / database / internal serviceAuthored toolstools/
A procedure it should follow for certain tasksSkillsskills/<name>/SKILL.md
Remembers things across conversationsDurable memory (read the warning)memory.py
Runs on a timer, no user messageSchedulesschedules/<name>.py
Lives in SlackChannelschannels/slack.py
Writes files, runs code or shell commandsSandboxsandbox/__init__.py
Ask me before it does XHuman-in-the-loopinterrupt_on=
Users must not see each other's chatsSupabase identityidentity.py
Must return structured data, not proseStructured outputresponse_format=
Hand off specialized workSubagentssubagents=
PII redaction, call limits, retries, loggingMiddlewaremiddleware/
Prove it still works as we change itHarbor evalsevals/tasks/

4. Confirm the shape before writing files

State the plan back in one short block and get agreement. Name the model, and list only the capabilities you are actually going to create:

research-assistant, Python, on anthropic:claude-sonnet-4-6  instructions.md   how it researches and cites  tools/search.py   web search  schedules/        weekday 8am digest  no memory, no sandbox, no channel

5. Scaffold and wire the smallest thing that runs

Scaffold with the flags that match the plan, so the project starts correct instead of being edited into shape:

mda init research-assistant --model anthropic:claude-sonnet-4-6cd research-assistantuv sync

Then add one capability at a time and confirm each one works before adding the next. A first agent that answers with good instructions and one real tool is a better starting point than a scaffold with every directory filled in.

Do not create directories the plan did not call for. Empty or unused skills/, channels/, or schedules/ directories are noise, and a sandbox/ directory the user does not need turns on a sandbox they will pay attention to for no reason (mda init --no-sandbox skips it).

6. Handle keys without touching their secrets

mda init writes a .env with empty placeholders. Fill in the names the project needs and let the user paste the values:

  • Do not write live credential values into .env yourself, and do not copy a key from another project directory.
  • Do not echo key values to the terminal or into your reply.
  • Confirm .gitignore covers .env and .env.*mda init does this already.

The project needs LANGSMITH_API_KEY (to deploy) and the provider key its model requires (ANTHROPIC_API_KEY, OPENAI_API_KEY, …). Uncomment the right provider line and tell the user to paste both.

7. Run it locally, then deploy

mda dev .       # compiles, opens LangSmith Studio, hot reloadsmda deploy .    # syncs Context Hub, uploads, waits for DEPLOYED

Have the user actually send a message in Studio and confirm the agent calls the tool before deploying. mda deploy prints the deployment dashboard URL; open it to inspect builds, revisions, and traces.

What MDA cannot do

Check requests against this list before agreeing to build them. Being straight about a limit early is cheaper than discovering it at deploy time.

LimitConsequence
US LangSmith Cloud onlyNo self-hosted, no hybrid, no EU region. Needs langgraph deploy.
CLI-first, public betaNo public create/update/invoke REST surface. Calling a deployed agent from your own application is not documented during beta — tell the user to contact their LangChain team.
No MCP connectorsThe connectors/mcp.* + define_mcp_servers surface was removed. Do not write it. Give the agent authored tools instead.
Slack is the only channelNo Discord, Teams, email, or SMS channel.
Memory is deployment-sharedOne /memories/agent/ tree for all callers. There is no per-user memory.
Identity is LangSmith key or SupabaseNo OIDC, SAML, or custom JWT issuer. Per-user private threads require Supabase.
LangSmith sandboxes onlyNo other sandbox provider.
One agent entry per projectNo multiple graphs in one project. Use subagents= for delegation.
Schedules must be static literalsNo env vars, function calls, or computed values in a schedule declaration.
Build archive capped at 200 MBLarge fixtures or model weights in the project will fail the deploy.
Managed fields are not yours to setbackend, store, checkpointer, memory, skills, and the system prompt are injected by the runtime.

Prerequisites

  • A workspace with Managed Deep Agents public beta access, and a LangSmith API key for it.
  • Python and uv for Python projects; Node.js and npm for TypeScript.
  • A model provider API key.

Install the CLI. Both packages ship the same mda binary:

uv tool install --prerelease allow managed-deepagents   # Pythonnpm install -g managed-deepagents@dev                    # TypeScript

mda init generates a project with its own manifest — run uv sync (or npm install) inside that project before mda dev.

Project layout

The path passed to mda is the project root. A file's location determines its role:

my-agent/  agent.py | agent.ts              # Required: exports the named `agent`  instructions.md                  # System prompt -> Context Hub  skills/<name>/SKILL.md           # Task-specific procedures -> Context Hub  tools/                           # Authored tools the agent imports  middleware/                      # Authored middleware the agent imports  identity.py | identity.ts        # Who may call the deployment  memory.py | memory.ts            # Opt-in durable memory  channels/<name>.py               # External messaging (Slack)  schedules/<name>.py              # Managed cron schedules  sandbox/__init__.py | index.ts   # Managed sandbox  pyproject.toml | package.json    # Dependencies  .env                             # Auth + runtime secrets, never archived  evals/tasks/<task>/              # Harbor evals, not deployed

Only the agent entry is required. tools/ and middleware/ are plain conventions — MDA copies project files verbatim, so any local module the agent imports works. The other paths take on managed meaning when present. TypeScript declarations also accept .tsx, .mts, and .cts.

Define the agent

The agent entry returns a pre-runtime spec, not a compiled graph.

# agent.pyfrom managed_deepagents import define_deep_agentfrom tools.search import web_searchagent = define_deep_agent(    name="research-assistant",    model="anthropic:claude-sonnet-4-6",    tools=[web_search],)
// agent.tsimport { defineDeepAgent } from "managed-deepagents";import { webSearch } from "./tools/search";export const agent = defineDeepAgent({  name: "research-assistant",  model: "anthropic:claude-sonnet-4-6",  tools: [webSearch],});

name is required. Pass a static string starting with a letter, containing only letters, numbers, underscores, or hyphens. It becomes the LangGraph assistant ID and the default deployment name; override the latter with mda deploy --name.

Author-set fields: name, model, tools, middleware, subagents, permissions, interrupt_on / interruptOn, response_format / responseFormat, context_schema / contextSchema, cache, debug, metadata.

Managed fields — do not set: backend, store, checkpointer, memory, skills, system_prompt / systemPrompt.

Model IDs use {provider}:{model_id} and resolve through init_chat_model, so any of its providers work. Note the provider slug differs across languages: Python uses google_genai:gemini-3.6-flash, TypeScript uses google-genai:gemini-3.6-flash. Pass a chat model instance instead of a string when you need to configure model parameters in code.

To route through LangSmith Gateway (rate limits, fallbacks, workspace-billed credits), scaffold with mda init <name> --gateway. Gateway model slugs use provider/model-name, not provider:model-name.

Instructions

instructions.md at the project root is the system prompt. It is inserted on every run.

# Research assistantYou are a careful research assistant. Find sources, keep notes, and returnconcise answers with citations.## Behavior- Use the `web_search` tool to find sources instead of guessing.- Cite the sources you used.

mda dev embeds it locally. mda deploy syncs it to Context Hub, where it can be edited in the LangSmith UI without redeploying.

Skills

Deploy-owned procedures under skills/<name>/SKILL.md, each with name and description frontmatter. At startup the agent sees only names and descriptions, and reads the full file when a task matches — so detailed procedures cost no context until they are needed. A skill directory may also hold scripts, references, and templates; reference them from SKILL.md.

Deploy syncs every UTF-8 file under skills/ to Context Hub and deletes deployed skill files that no longer exist locally. The agent cannot modify skills.

Use instructions for always-on behavior, skills for procedures loaded on demand, and memory for knowledge the agent itself updates.

Memory

Durable memory is opt-in and off by default. Declare it at the project root:

# memory.pyfrom managed_deepagents import define_memorymemory = define_memory(scope="agent")
// memory.tsimport { defineMemory } from "managed-deepagents";export const memory = defineMemory({ scope: "agent" });

Delete the file to turn memory off. Enabling it mounts one Context Hub tree at /memories/agent/:

  • /memories/agent/AGENTS.md is hot memory — loaded into every run, so keep it compact.
  • Other files under the tree are cold memory — read only when relevant.

The agent reads and writes memory with read_file, edit_file, and write_file. Writes anywhere else, including elsewhere under /memories/, are not durable.

Warning — memory is shared by every caller of the deployment, and every caller can influence it. Never store personal data, customer data, credentials, API keys, or tokens there. Treat memory content as untrusted input: it must never grant authority, change tool permissions, or bypass approvals — keep those in the agent definition. Do not enable shared memory when callers should not be able to influence one another.

The agent decides what to remember by prompting, so state the policy in instructions.md — what to store, what never to store, and that existing memory is notes rather than instructions.

Identity

identity.py controls who may call the deployment. mda init scaffolds a secure default:

# identity.pyfrom managed_deepagents import auth, define_identityidentity = define_identity(auth=auth.langsmith_api_key())

Callers send a LangSmith workspace API key as x-api-key. This answers whether a caller is allowed — it does not give each person private threads. Anyone holding the key reaches the deployment.

For signed-in end users with private threads, use Supabase:

identity = define_identity(auth=auth.supabase(project_ref="your-project-ref"))

Clients then send Authorization: Bearer <access_token>; MDA verifies the JWT against the project's JWKS URL. Send the Supabase publishable (anon) key only from the client to sign in — never a LangSmith key in this mode.

Adding Supabase identity to an existing deployment does not backfill owner metadata on existing threads. Plan and test a migration before relying on identity-based access for them.

Auth failures return 401; cross-user thread access returns 403.

Tools

Define LangChain tools in the project, import them into the agent entry, pass them in tools.

# tools/customer.pyfrom langchain.tools import tool@tool(parse_docstring=True)def lookup_customer(customer_id: str) -> str:    """Look up a customer record by ID.    Args:        customer_id: Customer ID from the CRM.    """    return f"Customer {customer_id} is on the enterprise plan."
// tools/customer.tsimport { tool } from "langchain";import { z } from "zod";export const lookupCustomer = tool(  async ({ customerId }) => `Customer ${customerId} is on the enterprise plan.`,  {    name: "lookup_customer",    description: "Look up a customer record by ID.",    schema: z.object({ customerId: z.string().describe("Customer ID from the CRM.") }),  },);

Imports work exactly as in a normal local project. Use clear, unique tool names to avoid collisions. Tools read deployment secrets from environment variables; put local values in .env. For per-run values such as request metadata or feature flags, use the normal LangChain runtime context APIs.

Provider server-side tools can be passed inline where supported — for example tools=[{"type": "web_search"}] for OpenAI — which avoids a second API key.

Middleware

Middleware wraps model calls, tool calls, and lifecycle hooks. Order is explicit in the list; MDA never infers it. Use prebuilt LangChain middleware or author your own (see [[langchain-middleware]]).

from langchain.agents.middleware import ModelCallLimitMiddleware, PIIMiddlewarefrom managed_deepagents import define_deep_agentagent = define_deep_agent(    name="support-agent",    model="anthropic:claude-sonnet-4-6",    middleware=[        PIIMiddleware("email", strategy="redact", apply_to_input=True),        ModelCallLimitMiddleware(run_limit=50),    ],)

Middleware is the right place for PII handling, rate limits, retries, model fallbacks, dynamic model selection, and tool-call monitoring.

Sandboxes

A sandbox gives the agent an isolated filesystem and shell. mda init scaffolds one; delete the sandbox/ directory to opt out, which is right for an agent that only needs its prompt, tools, and memory.

# sandbox/__init__.pyfrom managed_deepagents import define_sandboxsandbox = define_sandbox(    scope="thread",    idle_ttl_seconds=600,    default_timeout=600,)
// sandbox/index.tsimport { defineSandbox } from "managed-deepagents";export const sandbox = defineSandbox({  scope: "thread",  idleTtlSeconds: 600,  defaultTimeout: 600,});

scope="thread" (the default) creates one sandbox per durable thread. scope="agent" shares a single filesystem across threads — only use it for intentionally shared state, since threads can then read and modify each other's files. Set the creation source with template_name or snapshot_id, never both.

The agent works through ls, read_file, write_file, edit_file, glob, grep, and execute. Use instructions.md to say where it should work and what it must not touch. mda delete also deletes the managed sandboxes.

During mda dev, if the provider is unavailable the runtime falls back to a local temp directory and prints the path. That fallback is for development only — verify sandbox behavior in a dev deployment.

Schedules

One schedule per file under schedules/, each exporting a named schedule. The file name becomes the schedule name.

# schedules/daily_digest.pyfrom managed_deepagents import define_scheduleschedule = define_schedule(    cron="0 8 * * 1-5",    timezone="America/Los_Angeles",    prompt="Summarize what you learned yesterday and list open questions.",)

Define exactly one of prompt (turned into a user message) or input (a structured LangGraph input). cron must be a standard five-field expression; without timezone, crons run UTC.

Schedules use ephemeral threads by default — a fresh thread per run, deleted afterward. Pass thread={"mode": "persistent", "id": "..."} only when runs should accumulate durable thread state. Set deliver_to to post results through a configured Slack channel.

Declarations are extracted at compile time without running your code: use literals and top-level literal constants only. No env vars, function calls, or **kwargs.

mda deploy reconciles schedules after the deployment is live — it deletes MDA-owned crons and recreates them from the current files, so deleting a file and redeploying removes the cron. --no-wait skips reconciliation entirely, so never use it when adding, changing, or removing schedules.

Channels

A channel connects the agent to an external messaging service: inbound events start runs, and responses go back to the same conversation. Slack is the only supported provider. One channel per file under channels/, each exporting a named channel.

# channels/slack.pyfrom managed_deepagents import channelschannel = channels.slack()

The file name sets the channel name and its inbound route — channels/slack.py receives events at POST /channels/slack/events. Names must be unique; never name a file channels/channel.py.

Channel-originated runs expose runtime.channel to tools and middleware, carrying the normalized event and conversation address plus methods to post and update messages. Ordinary HTTP runs and scheduled runs have no originating channel, so runtime.channel is absent.

Slack setup needs a project-root slack-app-manifest.json and SLACK_SIGNING_SECRET + SLACK_BOT_TOKEN in .env. Treat the manifest as the source of truth; files generated under .mda/ are build artifacts and must not be committed. runtime.channel never exposes the bot token.

A channel receives messages that start runs. It is not the same as giving the agent Slack tools for initiating operations — a project may want either or both.

Evals

MDA evals are Harbor evals. evals/tasks/ is the canonical dataset; author complete Harbor tasks there. mda evals does not introduce a separate format and does not run trials — it packages the agent for Harbor and prints a harbor run command.

mda evals init smoke      # optional starter under evals/scaffold/mda evals compile .       # copies scaffolds into evals/tasks/, writes the handoff

evals/ is not included in the deployed build. Harbor needs Docker for its default environment, and does not read .env — the generated job config writes ${VAR} placeholders, so export the variables in the shell that runs Harbor. Verifiers write a numeric reward to /logs/verifier/reward.txt or metrics to /logs/verifier/reward.json. For deeper eval design, see [[eval-engineering]].

CLI reference

CommandUse
mda init <name>Scaffold a project. Fails if the destination exists.
mda build [path]Compile into a managed LangGraph app without deploying.
mda dev [path]Compile and run the local dev server in LangSmith Studio.
mda deploy [path]Compile, sync Context Hub, upload, deploy, reconcile schedules.
mda logs [path]Tail Agent Server logs for a deployed agent.
mda delete [path]Delete a deployment and the LangSmith resources it created. Alias: destroy.
mda evals init|compileScaffold a Harbor task; package the agent for Harbor. Alias: eval.

Key flags:

  • init: --model SPEC, --instructions TEXT, --instructions-file PATH, --memory agent|none, --gateway, --no-sandbox
  • build: --out OUT (defaults to <path>/.mda/build, emptied before each build)
  • dev: --port, --hostname, --no-browser, --no-reload
  • deploy: --name, --deployment-type dev|prod, --workspace-id, --no-wait
  • logs: --name, --lines, --level, --follow / --no-follow, --workspace-id
  • delete: --name, --workspace-id, --yes

mda init detects the language from the current directory (pyproject.toml → Python, package.json → TypeScript, both or neither → interactive prompt). mda dev requires uv for Python and resolves the LangGraph dev server itself.

mda delete is destructive and removes the deployment plus its LangSmith resources. Confirm with the user before running it, and never pass --yes unprompted — that flag exists to skip the confirmation you should be getting.

Deploy and Context Hub

Authentication resolves in order: LANGGRAPH_HOST_API_KEY, LANGSMITH_API_KEY, LANGCHAIN_API_KEY — read from the project .env first, then the shell. In an interactive terminal with no key found, mda deploy prompts and saves it to .env. Use --workspace-id or LANGSMITH_WORKSPACE_ID with an organization-scoped key.

mda deploy routes local inputs to different managed surfaces:

instructions.md + skills/**   -> Context Hub deploy-owned context.env                          -> deploy auth + non-reserved hosted secrets (never archived)project source                -> .mda/build archive -> hosted deploymentschedules/**                  -> LangSmith cron jobs, after the deployment is live

Non-reserved .env entries — provider keys, tool credentials, database URLs — are forwarded as hosted deployment secrets. Reserved platform variables (LANGSMITH_API_KEY, LANGGRAPH_HOST_API_KEY, LANGCHAIN_API_KEY, LANGSMITH_WORKSPACE_ID) authenticate the deploy and route it, but are never uploaded as user-managed secrets. Deploy fails before upload if the model's provider key is not available from .env, the shell, or LangSmith workspace secrets.

Context Hub holds /instructions.md and /skills/** (deploy-owned, resynced each deploy) and /memories/agent/** (runtime-owned, preserved across deploys).

Troubleshooting: no agent entry file found → add agent.py at the root. 401/403 → the key's workspace lacks beta access. Context Hub conflict → re-run the deploy. Build over 200 MB → remove generated artifacts. BUILD_FAILED / DEPLOY_FAILED → open the printed URL and read the revision logs.

Human-in-the-loop

Pause before sensitive tool calls with interrupt_on, and gate filesystem paths with permissions:

agent = define_deep_agent(    name="support-agent",    model="anthropic:claude-sonnet-4-6",    tools=[refund_customer],    interrupt_on={"refund_customer": True},)

interrupt_on applies the same behavior as LangChain's human-in-the-loop middleware; see [[langgraph-human-in-the-loop]] for approve/edit/reject semantics. Interrupts need durable thread state, and the managed runtime owns the checkpointer, so no extra setup is required.

Respond to interrupts in Studio during mda dev. On a deployed agent, resume through the LangGraph server API with a Command(resume=...) payload — but note that programmatic invocation from your own application is not documented during public beta.

Gotchas

  • name= is required in define_deep_agent / defineDeepAgent. A definition without it fails.
  • Model IDs need the provider prefix: anthropic:claude-sonnet-4-6, not a bare model name. Python uses google_genai:, TypeScript uses google-genai:, and Gateway uses provider/model.
  • Do not set managed fields (backend, store, checkpointer, memory, skills, system prompt) in the agent definition.
  • Memory is opt-in via memory.py, not a constructor argument. disable_memory is legacy — declare or delete memory.py instead.
  • MCP connectors do not exist. connectors/mcp.* and define_mcp_servers were removed; writing them fails.
  • Restart mda dev after adding a managed file. New memory.py, identity.py, schedules/, or channels/ declarations are discovered at compile time, not by hot reload.
  • --no-wait skips schedule reconciliation and exits before DEPLOYED.
  • Schedule declarations must be static literals — the compiler extracts them without running your code.
  • .env is never archived, and .gitignore must keep it out of version control. Do not write live keys into it on a user's behalf.
  • The docs run slightly ahead of the released CLI. Verify against mda --help and the installed package before trusting a flag or import. As of mda 0.5.0: the sandbox docs show sandboxes.langsmith(...), but that import raises ImportError — use define_sandbox(...) as shown above; and the documented mda init --identity and mda deploy --configure-slack flags are not present (identity.py is scaffolded by default).

모든 파일

1개 파일

managed-deep-agents 설치

스킬 파일을 다운로드하여 .claude/skills/ 디렉토리에 추출하세요.

ZIP 다운로드

저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.

git clone https://github.com/langchain-ai/langchain-skills/blob/main/config/skills/managed-deep-agents/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

복사 복사
빠른 설정: 스킬 폴더를 .claude/skills/에 복사하세요. Claude가 자동으로 감지하고 사용합니다.

관련 스킬

office-mcp
업데이트 된 시간 2026년 7월 13일
mcpgraph
업데이트 된 시간 2026년 6월 29일
composio
업데이트 된 시간 2026년 6월 29일
connect-mcp-server
업데이트 된 시간 2026년 6월 29일
OR