> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Managed Deep Agents

> Build your agent as a directory of files while LangSmith runs the harness and runtime.

Managed Deep Agents (MDA) is the simplest way to build and deploy production agents. You focus on what your agent does. MDA runs it. There are no servers to run and no infrastructure to wire together.

> [!NOTE]
>
> Managed Deep Agents is in **public [beta](https://docs.langchain.com/langsmith/release-stages.md)** on [LangSmith Cloud](https://docs.langchain.com/langsmith/cloud.md) and [Bring Your Own Cloud (BYOC)](https://docs.langchain.com/langsmith/byoc.md). Use Managed Deep Agents CLI and SDK v0.10 or later for BYOC.

You write the agent's intelligence: its instructions, the tools it can call, the skills it follows, and you select the model that drives it. MDA provides everything underneath:

* **The Deep Agents harness**: The agent loop that plans, calls tools, manages a filesystem, and delegates to subagents. See [Deep Agents](https://docs.langchain.com/oss/javascript/deepagents/overview.md).
* **A managed runtime**: Every deployment runs on [LangSmith Agent Server](https://docs.langchain.com/langsmith/agent-server.md). You get the Agent Server API, threads, runs, streaming, and the [MCP endpoint](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-mcp-endpoint.md) without operating the server yourself.
* **Proactive runs**: [Memory](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-memory.md), [channels](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-channels.md), and [schedules](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-schedules.md) keep an agent useful between conversations. Schedules run digests, reminders, and check-ins without a user message.
* **Evals**: Opt-in [Harbor](https://www.harborframework.com/docs/tasks) tasks that test the agent. `mda evals init` sets up the workspace; results can record to LangSmith. See [Evals](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-evals.md).

![Your agent definition runs inside the Deep Agents harness, within a managed runtime that includes Agent Server, channels, memory, sandboxes, schedules, and connections. LangSmith adds traces, evals, and Engine.](https://mintcdn.com/langchain-5e9cc07a/0ADI9Sltahk4u7Sd/images/managed-deep-agents-overview-light.png?fit=max\&auto=format\&n=0ADI9Sltahk4u7Sd\&q=85\&s=f5b87545b25599e48d3ff54026fd87ba)

## Example agent

A managed deep agent consists of a project folder that contains the business logic for its behavior:

When you upload this folder with the `mda` CLI, it will automatically run on managed LangSmith infrastructure.
You provide the business logic, and Managed Deep Agents provides the agent harness and production infrastructure.

To get started, see the [Managed Deep Agents quickstart](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-quickstart.md).

## Core capabilities

Each part of the agent maps to a file or directory. Add the ones your agent needs:

| Capability | Path | Description |
| - | - | - |
| [Model and configuration](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-agent-definition.md) | `agent.ts` | The model and core options. Required. |
| [Instructions](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-instructions.md) | `instructions.md` | The system prompt that defines how the agent behaves. |
| [Skills](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-skills.md) | `skills/` | Task-specific playbooks the agent loads when they are relevant. |
| [Tools](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-tools.md) | `tools/` | Functions the agent calls to run your application logic or reach external services. |
| [MCP connectors](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-mcp-connectors.md) | `tools/mcp.ts` | Remote MCP servers that provide tools to the agent. |
| [Middleware](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-middleware.md) | `middleware/` | Custom logic that runs around model and tool calls. |
| [Sandbox](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-sandboxes.md) | `sandbox/` | An isolated filesystem and shell for running agent-written code. |
| [Memory](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-memory.md) | `memory.ts` | Preferences and knowledge that persist across threads. |
| [Identity](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-identity.md) | `identity.ts` | Per-caller private threads, memory, and credentials for multi-user deployments. |
| [Channels](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-channels.md) | `channels/` | Connections to messaging services, such as Slack, that start runs and receive responses. |
| [Schedules](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-schedules.md) | `schedules/` | Managed cron schedules that run the agent on a recurring basis. |
| [Evals](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-evals.md) | `evals/` | Harbor tasks that test the agent. |

For the full layout, see [Project structure](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-project-structure.md). Instructions, skills, and optional durable memory are stored in [Context Hub](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-context-hub.md).

## Relationship to Deep Agents

Managed Deep Agents runs the open source [Deep Agents](https://docs.langchain.com/oss/javascript/deepagents/overview.md) harness rather than a second framework. The agent loop, filesystem tools, subagents, and skills are the same, so there is no second API to learn and an agent you already built keeps working.

Managed Deep Agents adds the layer around the agent. The sandbox, durable memory, channels, and schedules above are declarations in a project file rather than services you build and operate. [Connections](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-connections.md) run OAuth, so end users authorize their own accounts instead of you provisioning credentials for each one. LangSmith hosts the result on [Agent Server](https://docs.langchain.com/langsmith/agent-server.md). In the code, the difference is narrower: who compiles the agent.

* [createDeepAgent](https://reference.langchain.com/javascript/deepagents/agent/createDeepAgent) returns a compiled agent. You run it, and you own the backend, store, checkpointer, and server around it.
* `defineDeepAgent` returns a definition. The `mda` CLI hands it to the managed runtime, which supplies those pieces along with memory, skills, and the system prompt, then compiles the agent with [createDeepAgent](https://reference.langchain.com/javascript/deepagents/agent/createDeepAgent).

So `defineDeepAgent` takes the same options minus the managed ones, plus a required static `name`. Every `define*` function works this way: declare what the agent needs, and leave the lifecycle to the runtime.

Start with Managed Deep Agents to run production agents without having to manage infrastructure. Alternatively, for maximum flexibility while using the same Deep Agents harness, use the [Deep Agents SDK](https://docs.langchain.com/oss/javascript/deepagents/overview.md#self-host-with-the-sdk) and host agents yourself, or run a custom [Agent Server](https://docs.langchain.com/langsmith/agent-server.md). For a side-by-side comparison and steps to convert an agent you already built, see [Move from Deep Agents](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-migrate.md).

## Next steps

> [card] [Quickstart](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-quickstart.md)
>
> Create and deploy your first Managed Deep Agent with the `mda` CLI.

> [card] [Tutorial](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-tutorial.md)
>
> Add a custom search tool, durable memory, and a daily schedule.

> [card] [Design agent template](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-design-agent.md)
>
> Deploy LangChain's open-source design agent to Slack.

> [card] [Paid media agent template](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-paid-media-agent.md)
>
> Deploy LangChain's open-source paid media agent to Slack.

> [card] [Evals](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-evals.md)
>
> Develop Harbor evals with a coding agent and the eval-engineering skill.

> [card] [Agent Server](https://docs.langchain.com/langsmith/agent-server.md)
>
> Explore the runtime that hosts Managed Deep Agents deployments.

> [card] [MCP endpoint](https://docs.langchain.com/langsmith/javascript/managed-deep-agents-mcp-endpoint.md)
>
> Call a deployed agent as a tool from Claude Code or another MCP client.

***

[Connect these docs](https://docs.langchain.com/use-these-docs.md) to your agent of choice via MCP for real-time answers.

[Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/managed-deep-agents-overview.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
