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.
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-memoryRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/langchain-ai/langchain-skills /tmp/langchain-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/langchain-skills/config/skills/deep-agents-memory ~/.gemini/antigravity-cli/skills/deep-agents-memoryAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
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
ANo 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 →Set up and diagnose a local agentmemory installation. It covers MCP connections, environment variables, ports, auth and feature flags, and is for users getting started or checking a connection.
Analyzes a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit links and topic clusters. Built for people who maintain LLM-generated markdown wikis.
Saves and loads timestamped reports for AI assistants, with keyword routing for fast lookup. It also runs an Actionability Gate that checks report links before delivery. Intended for morning briefings, meeting digests and research reports.
Removes a personal fact, preference, relationship detail, topic or past event from Muse's active memory. It also stops existing copies and automations from bringing it back.
Git Context Controller (GCC) is a skill that stores agent memory as a versioned file system under .GCC/. It suits multi-step projects that need milestone tracking, branching and context recovery across sessions.
Guides an evidence-first reading of a book, article, PDF or document set. Built for readers who want claims, evidence and recall rather than a short summary.
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.
