A Managed Deep Agents project has a required agent entry and optional files that enable managed capabilities. It is a regular TypeScript project. 托管深度代理目前处于私有测试阶段,仅在LangSmith Cloud的美国区域提供。加入等待列表以申请访问权限。

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