Project layout
agent.py、agent.ts 或 agent.tsx。它必须导出一个使用 define_deep_agent 或 defineDeepAgent 创建的、名为 agent 的定义。tools/ 和 middleware/ 文件夹是常规做法,并非特殊的注册表:托管的智能代理将普通项目文件组织在内,因此代理导入的任何本地模块都能正常工作。当这些文件夹存在时,命令行工具会将剩余文件视为托管的系统提示(instructions.md)、身份标识(identity.*)、连接器(connectors/**)、消息通道(channels/**)、定时任务(schedules/**)、技能(skills/**)、沙箱配置(sandbox/)以及本地 Harbor 评测任务(evals/)。
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.
How MDA treats project files
- Managed context:
instructions.mddefines the system prompt. Each directory underskills/contains task-specific instructions. MDA syncs both to Context Hub. - Application code: Files under
tools/andmiddleware/are ordinary project modules. Import them from the agent entry. Other local modules work the same way. - Managed configuration: Root
identity.tsandmemory.ts, direct children ofchannels/andschedules/, andsandbox/index.tsenable their corresponding capabilities. - Dependencies and secrets: Declare dependencies in
package.json. MDA loads.envlocally and forwards eligible values as deployment secrets, but never includes.envfiles 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 runmda evals init <name>to create an optional starter underevals/scaffold/.mda evals compilecopies scaffolds intoevals/tasks/and packages the agent for Harbor. Theevals/directory is not included in the deployed agent build.
.ts names. TypeScript managed declarations also accept the supported .tsx, .mts, or .cts variants.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

