> ## 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 project structure

> Understand the files and directories in a Managed Deep Agents project.

A Managed Deep Agents project has a required agent entry and optional files that enable managed capabilities.

It is a regular TypeScript project.

<Note>
  Managed Deep Agents is in **public [beta](/langsmith/release-stages)** and available on [LangSmith Cloud](/langsmith/cloud) in the US region only.
</Note>

## Project layout

```text Project layout theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
my-agent/
├── agent.ts | agent.tsx            # Core agent definition

├── instructions.md                 # Managed context
├── skills/
│   └── <name>/
│       └── SKILL.md

├── tools/                          # Application code
├── middleware/

├── channels/                       # Managed configuration
│   └── <name>.ts
├── schedules/
│   └── <name>.ts
├── sandbox/
│   └── index.ts
├── identity.ts
├── memory.ts

├── package.json                    # Dependencies and secrets
├── .env

└── evals/                          # Harbor workspace
    ├── tasks/                      # Canonical Harbor tasks
    │   └── <task>/
    └── scaffold/                   # Optional task scaffolds
        └── <task>/
```

The only required file is `agent.ts` or `agent.tsx` at the project root. It must export a named `agent` created with `defineDeepAgent`.

Use only one agent entry in a project. See [Agent definition](/langsmith/javascript/managed-deep-agents-agent-definition).

## How MDA treats project files

* **Managed context**: `instructions.md` defines the system prompt. Each directory under `skills/` contains task-specific instructions. MDA syncs both to Context Hub.
* **Application code**: Files under `tools/` and `middleware/` are ordinary project modules. Import them from the agent entry. Other local modules work the same way.
* **Managed configuration**: Root `identity.ts` and `memory.ts`, direct children of `channels/` and `schedules/`, and `sandbox/index.ts` enable their corresponding capabilities.
* **Dependencies and secrets**: Declare dependencies in `package.json`. MDA loads `.env` locally and forwards eligible values as deployment secrets, but never includes `.env` files in the build archive.
* **Evals**: Managed Deep Agents evals are Harbor evals. `evals/tasks/` is the canonical Harbor task dataset. Author tasks there directly, or run `mda evals init <name>` to create an optional starter under `evals/scaffold/`. `mda evals compile` copies scaffolds into `evals/tasks/` and packages the agent for Harbor. The `evals/` directory is not included in the deployed agent build.

The layout above shows the common `.ts` names. TypeScript managed declarations also accept the supported `.tsx`, `.mts`, or `.cts` variants.

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/managed-deep-agents-project-structure.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
