> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-contex-1789468204-c45d5ed.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Managed Deep Agents project structure

> Understand the project layout for Managed Deep Agents.

A Managed Deep Agents project is a normal TypeScript package with one required root agent entry. Other paths are either ordinary modules you import, or files and directories that MDA discovers to enable managed capabilities.

<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={null}
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
├── connectors/
│   └── mcp.ts
├── schedules/
│   └── <name>.ts
├── sandbox/
│   └── index.ts
├── identity.ts
├── memory.ts

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

└── evals/                          # Harbor workspace
    ├── harbor-job.json
    └── <task>/                     # Harbor task
        ├── Task.md
        ├── instruction.md
        ├── environment/
        └── tests/
```

The only required file is `agent.ts` or `agent.tsx` at the project root containing the [agent definition](/langsmith/javascript/managed-deep-agents-agent-definition) as a named `agent`. It must export a named `agent` created with `defineDeepAgent`. Use only one agent entry in a project.

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

## How MDA treats project files

* **Managed context**: [`instructions.md`](/langsmith/javascript/managed-deep-agents-instructions) defines the system prompt. Each directory under [`skills/`](/langsmith/javascript/managed-deep-agents-skills) contains task-specific instructions, such as a `SKILL.md` and any supporting files. MDA syncs both `instructions.md` and `skills/` to [Context Hub](/langsmith/javascript/managed-deep-agents-context-hub). Optional [durable memory](/langsmith/javascript/managed-deep-agents-memory) is also backed by Context Hub.

* **Application code**: Files under [`tools/`](/langsmith/javascript/managed-deep-agents-tools) and [`middleware/`](/langsmith/javascript/managed-deep-agents-middleware) are ordinary project modules. Import them from the agent entry.

* **Managed configuration**: Certain paths enable capabilities when present. For `channels/`, `connectors/`, and `schedules/`, only direct children are managed declarations; nested modules are not.

  | Path                   | Enables                                                                             |
  | ---------------------- | ----------------------------------------------------------------------------------- |
  | `identity.ts`          | [Caller authentication](/langsmith/javascript/managed-deep-agents-identity)         |
  | `memory.ts`            | [Durable memory](/langsmith/javascript/managed-deep-agents-memory)                  |
  | `channels/<name>.ts`   | [Messaging channels](/langsmith/javascript/managed-deep-agents-channels)            |
  | `connectors/<name>.ts` | [MCP connectors](/langsmith/javascript/managed-deep-agents-mcp-connectors)          |
  | `schedules/<name>.ts`  | [Cron schedules](/langsmith/javascript/managed-deep-agents-schedules)               |
  | `sandbox/index.ts`     | [Sandbox filesystem and shell](/langsmith/javascript/managed-deep-agents-sandboxes) |

  MCP connector modules export a named `connector`.

* **Dependencies and secrets**: Declare dependencies in `package.json`. MDA loads `.env` locally and forwards non-reserved values as deployment secrets. Reserved platform variables and `.env` files are not included in the build archive. For more information, see [Deploy a Managed Deep Agent](/langsmith/javascript/managed-deep-agents-deploy).

* **Evals**: Managed Deep Agents [evals](/langsmith/javascript/managed-deep-agents-evals) are Harbor evals. Run `mda evals init -i` and develop tasks with a coding agent and the `eval-engineering` skill. Generated runtime files stay under `.mda/evals/` and are not included in the deployed agent build.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/langsmith/javascript/managed-deep-agents-quickstart">
    Create and deploy your first Managed Deep Agent with the `mda` CLI.
  </Card>

  <Card title="Tutorial" icon="book" href="/langsmith/javascript/managed-deep-agents-tutorial">
    Add durable memory and a daily schedule to the quickstart research assistant.
  </Card>
</CardGroup>

***

<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>
