/memories/agent/, shared by every caller.
Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.
Enable memory
Use durable memory for knowledge the agent should learn while it runs and reuse across threads. For always-on behavior, use instructions instead. For task-specific procedures, use skills instead.1
Add the memory declaration
Export a named
memory declaration with the "agent" scope:memory.ts
2
Guide what to remember (Optional)
The agent decides what to remember based on prompting. To make the policy explicit, add guidance like the following to
instructions.md and adapt it to your application:instructions.md is always read-only. The agent never updates it. Deploys sync project-owned instructions and skills, but do not overwrite durable content already stored under memories/agent in Context Hub.To understand memory paths, see How the agent uses memory.How the agent uses memory
Enabling memory mounts one Context Hub tree,memories/agent, at /memories/agent/ in the agent filesystem:
Keep hot memory compact because it consumes context on every run. Put detailed material, such as procedures, decision logs, and research notes, in cold files, and link to them from hot memory when useful.
The agent reads and updates memory with the built-in
read_file, edit_file, and write_file tools.
Writes to other locations, including elsewhere under /memories/, are not durable.
Disable memory
Remove the memory declaration to turn durable memory off. You can also usescope: "none".
Deployment
When you runmda deploy, MDA enables durable memory from the project declaration and backs it with Context Hub. Deploys do not overwrite durable content already stored under memories/agent.
For how memory relates to deploy-owned instructions and skills in Context Hub, see Context Hub.
When to use memory
For more information, see Project structure.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

