deep-agents-memory

Configure pluggable backends for ephemeral and persistent agent storage.

36|27|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/caio-moliveira/ai-engineer-roadmap --skill deep-agents-memory-caio-moliveira
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deep-agents-memory
Source: https://github.com/caio-moliveira/ai-engineer-roadmap/tree/main/.agents/skills/deep-agents-memory
Command: npx skills add https://github.com/caio-moliveira/ai-engineer-roadmap --skill deep-agents-memory-caio-moliveira

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deep agents need both short-term thread-scoped state and long-term persistent memory plus controlled filesystem access; this Skill documents how to configure and use pluggable backends to provide those capabilities safely. It clarifies when files are ephemeral, when they persist across sessions, and how to route different paths to different storage systems to avoid accidental data loss or leakage.

Core Features & Use Cases

  • StateBackend (short-term): ephemeral, thread-scoped storage for temporary working files and drafts.
  • StoreBackend (long-term): persistent storage that survives threads and sessions and requires a store instance (e.g., InMemoryStore for testing, PostgresStore for production).
  • CompositeBackend (hybrid routing): route path prefixes to different backends with longest-prefix matching to mix ephemeral and persistent storage.
  • FilesystemBackend & Middleware: controlled disk access for local development with tools like ls, read_file, write_file, edit_file, glob, and grep, and a virtual_mode option to restrict path escapes.
  • Use Cases: save user preferences across sessions, keep transient editor drafts per thread, enable human-in-the-loop file edits during local testing, and migrate production storage to a durable Postgres store.

Quick Start

Configure an agent with a CompositeBackend that routes /memories/ to a persistent store and uses a StateBackend for transient files so that drafts remain ephemeral while user preferences persist.

Frequently Asked Questions about deep-agents-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add persistent memory to agents so state survives across sessions?

Persistent memory for agents is achieved by configuring a StoreBackend with a store instance such as PostgresStore or InMemoryStore. This durable storage survives across threads and sessions, ensuring long-term state retention.

What is the difference between ephemeral and persistent agent storage?

Ephemeral agent storage uses StateBackend for temporary, thread-scoped working files that are discarded when the thread ends. Persistent storage uses StoreBackend to save data permanently across sessions, requiring a dedicated store instance.

How to route agent file paths to different storage backends?

Route agent file paths to different storage backends by configuring a CompositeBackend with path-prefix routing. It uses longest-prefix matching to direct specific paths like /memories/ to persistent stores while keeping transient files ephemeral.

Can I restrict agent filesystem access to prevent path escapes during local development?

Yes, you can restrict agent filesystem access using the FilesystemBackend virtual_mode option. This secures disk access for local development and human-in-the-loop file edits by preventing unauthorized path escapes.

Does agent memory persistence work with an in-memory store for testing?

Agent memory persistence works with InMemoryStore for testing scenarios. StoreBackend supports InMemoryStore for temporary validation and PostgresStore for production, allowing seamless migration of durable agent storage.

When should I use a CompositeBackend instead of a single storage backend for agents?

Use a CompositeBackend for agents when you need hybrid routing to mix ephemeral and persistent storage. It prevents accidental data loss or leakage by directing working drafts to StateBackend and user preferences to persistent StoreBackend.