> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-harris-1786029617-6b0a55e.mintlify.site/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 is a regular Python or TypeScript project with a required agent entry and optional files that 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 theme={null}
my-agent/
  # Core agent definition
  agent.py | agent.ts | agent.tsx
  # Managed context
  instructions.md
  skills/<name>/SKILL.md
  # Application code
  tools/
  middleware/
  # Managed configuration
  channels/<name>.py | <name>.ts
  schedules/<name>.py | <name>.ts
  sandbox/__init__.py | sandbox/index.ts
  identity.py | identity.ts
  memory.py | memory.ts
  # Dependencies and secrets
  pyproject.toml | package.json
  .env
  # Evals
  evals/<task>/

```

The only required file is `agent.py`, `agent.ts`, or `agent.tsx` at the project root. It must export a named `agent` created with `define_deep_agent` or `defineDeepAgent`. Do not mix Python and TypeScript agent entries in one project. See [Agent definition](/langsmith/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.*` and `memory.*`, direct children of `channels/` and `schedules/`, and `sandbox/__init__.py` or `sandbox/index.ts` enable their corresponding capabilities.
* **Dependencies and secrets**: Declare dependencies in `pyproject.toml` or `package.json`. MDA loads `.env` locally and forwards eligible values as deployment secrets, but never includes `.env` files in the build archive.
* **Evals**: Author optional Harbor tasks under `evals/`. `mda evals compile` writes the generated Harbor handoff under `.mda/evals/`. Eval tasks are not included in the deployed agent build.

The layout above shows the common `.py` and `.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>
