deep-agents-memory
Installation
Summary
Pluggable memory and file backends for Deep Agents with ephemeral, persistent, and hybrid routing options.
- Four backend types: StateBackend (thread-scoped, ephemeral), StoreBackend (cross-session persistent), FilesystemBackend (real disk access for local dev), and CompositeBackend (route different paths to different backends)
- FilesystemMiddleware provides six file operation tools:
ls,read_file,write_file,edit_file,glob,grep - CompositeBackend uses longest-prefix matching to route paths; files in matched routes persist across threads, others remain ephemeral
- StoreBackend requires a store instance (InMemoryStore for dev, PostgresStore for production); FilesystemBackend requires
virtual_mode=Trueto prevent directory escape attacks
SKILL.md
Short-term (StateBackend): Persists within a single thread, lost when thread ends Long-term (StoreBackend): Persists across threads and sessions Hybrid (CompositeBackend): Route different paths to different backends
FilesystemMiddleware provides tools: ls, read_file, write_file, edit_file, glob, grep
| Use Case | Backend | Why |
|---|---|---|
| Temporary working files | StateBackend | Default, no setup |
| Local development CLI | FilesystemBackend | Direct disk access |
| Cross-session memory | StoreBackend | Persists across threads |
| Hybrid storage | CompositeBackend | Mix ephemeral + persistent |