Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

deep-agents-memory

Skill by langchain-ai

Explains how Deep Agents store files and memory using pluggable backends. It is for developers building Deep Agents who need short-term, cross-session, or hybrid storage.

  • Score 86
  • 1.4k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install deep-agents-memory

Built from the published package, never by AI.

git clone --depth 1 https://github.com/langchain-ai/langchain-skills /tmp/langchain-skills && mkdir -p ~/.claude/skills && cp -r /tmp/langchain-skills/config/skills/deep-agents-memory ~/.claude/skills/deep-agents-memory

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install deep-agents-memory in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill explains how a Deep Agent stores files and memory. It covers StateBackend, which keeps files only within a single thread, and StoreBackend, which keeps them across threads and sessions. It also covers FilesystemBackend for local disk access and CompositeBackend for routing different paths to different backends.

FilesystemMiddleware provides the tools ls, read_file, write_file, edit_file, glob and grep. Path prefixes in a CompositeBackend decide which storage is used, and the longest matching prefix wins. The skill also lists common fixes, such as passing a store to StoreBackend and using PostgresStore in production. It is aimed at developers building Deep Agents with the deepagents library.

Written from the project's SKILL.md and checked against it.

What it can do

  • StateBackendStores files ephemerally within a single thread. This is the default backend.
  • StoreBackendStores files persistently across threads and sessions. It requires a store instance.
  • FilesystemBackendGives the agent direct disk access, intended for local development.
  • CompositeBackendRoutes path prefixes to different backends, such as ephemeral and persistent storage.
  • FilesystemMiddleware toolsProvides ls, read_file, write_file, edit_file, glob and grep for file operations.
  • Human-in-the-loop approvalCan require interrupts on write_file and edit_file when using FilesystemBackend.

What you need

  • deepagents library (Python or TypeScript)
  • LangGraph store such as InMemoryStore or PostgresStore

Try asking

  • Save my writing style notes to /memories/style.txt for later threads
  • Read /memories/style.txt and apply those preferences to this draft
  • Write a temporary draft to /draft.txt for this session only

Good to know

  • StateBackend files are lost when the thread ends and are not shared across threads
  • Paths must match a CompositeBackend route prefix to persist
  • InMemoryStore is lost on restart, so PostgresStore is suggested for production
  • Do not use FilesystemBackend in web servers

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: config/skills/deep-agents-memory/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md10 KB

Alternatives to deep-agents-memory

All alternatives →

Compare with agentmemory-config, understand-knowledge or reports

deep-agents-memory: common questions

Do files persist between chat threads?

Files in StateBackend are scoped to one thread. Files under a route served by StoreBackend, such as /memories/, persist across threads.

Which backend should I use for production?

The source suggests PostgresStore for production because InMemoryStore is lost on restart. It also warns against FilesystemBackend in web servers.

How does CompositeBackend choose a backend for a path?

It matches the longest route prefix first. For example, /mem/temp/ wins over /mem/ when both are defined.

How do I install deep-agents-memory?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is deep-agents-memory free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is deep-agents-memory safe to use?

It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to deep-agents-memory?

Similar skills: agentmemory-config, understand-knowledge, reports, forget.

deep-agents-memory Install

Add to stack

Loading.