deep-agents-memory

Configures Deep Agents memory backends and routing for ephemeral/persistent hybrid use.

Updated Jul 13, 2025
One-click install
npx skills add https://github.com/Reofdev07/osai --skill deep-agents-memory-reofdev07
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deep-agents-memory
Source: https://github.com/Reofdev07/osai/tree/main/.windsurf/skills/deep-agents-memory
Command: npx skills add https://github.com/Reofdev07/osai --skill deep-agents-memory-reofdev07

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deep Agents rely on pluggable backends to provide memory and filesystem access. This skill defines how to choose between StateBackend (ephemeral), StoreBackend (persistent), and CompositeBackend for routing, plus tooling like FilesystemMiddleware to access the filesystem safely.

Core Features & Use Cases

  • Ephemeral memory with StateBackend for fast, in-process tasks.
  • Persistent memory with StoreBackend for cross-session data.
  • Hybrid routing with CompositeBackend to mix ephemeral and persistent backends as needed.
  • Safe filesystem access using FilesystemMiddleware to perform common operations within sandboxed contexts.

Quick Start

Instantiate a CompositeBackend that routes '/memories/' to a StoreBackend while defaulting to StateBackend, then invoke the agent to write and read memory across threads.

Frequently Asked Questions about deep-agents-memory

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

FAQPage Schema
How do I persist memory across sessions for deep agents?

Persistent memory for deep agents is achieved by routing data to a StoreBackend, which retains information across sessions. This allows cross-session data retrieval without relying on ephemeral thread-scoped storage.

What is the difference between ephemeral and persistent memory backends?

Ephemeral memory uses StateBackend for fast, in-process, thread-scoped tasks, while persistent memory uses StoreBackend for cross-session data. CompositeBackend enables hybrid routing to mix both as needed.

How do I configure hybrid routing for agent memory backends?

Configure hybrid routing by instantiating a CompositeBackend that routes specific paths, like '/memories/', to a StoreBackend while defaulting other tasks to a StateBackend for mixed ephemeral and persistent memory.

Can I safely access the filesystem from a deep agent thread?

Safe filesystem access is provided through FilesystemMiddleware, allowing agents to perform common operations within sandboxed contexts to prevent unrestricted access and ensure safe usage constraints.

What are the limitations of ephemeral memory in multi-thread agents?

Ephemeral memory using StateBackend is limited to thread-scoped data and does not persist across sessions. Multi-thread memory requires safe usage constraints to avoid data conflicts between concurrent threads.