memory-patterns

Configure SQLite-backed agent memory with WAL mode and scoped lifecycle.

21|4|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/tylerjrbuell/reactive-agents-ts --skill memory-patterns-tylerjrbuell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-patterns
Source: https://github.com/tylerjrbuell/reactive-agents-ts/tree/main/.agents/skills/memory-patterns
Command: npx skills add https://github.com/tylerjrbuell/reactive-agents-ts --skill memory-patterns-tylerjrbuell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides clear, production-oriented patterns and safety rules for building and operating agent memory layers backed by SQLite, preventing data loss, inconsistent indexes, and unsafe embedding usage.

Core Features & Use Cases

  • SQLite source-of-truth with WAL mode and scoped lifecycle management to ensure durable, consistent persistence.
  • Four memory types (semantic, episodic, procedural, working) with guidance on storage, eviction, and capacity limits for each usage pattern.
  • Two-tier search strategy: FTS5-based BM25 ranking for Tier 1 and optional sqlite-vec KNN with embeddings from LLMService.embed for Tier 2.
  • Working memory pattern implemented as an in-process Ref with controlled capacity and FIFO/LRU eviction.
  • Zettelkasten link graph stored in SQLite for inter-note relations and cross-references, plus guidelines for snapshot, flush, and consolidation operations.

Quick Start

Initialize a memory layer using bun:sqlite with WAL mode, scaffold Layer.scoped and Effect.acquireRelease for DB lifecycle, bootstrap the agent to load memory.md, and run a flush to persist and regenerate the projection file.

Frequently Asked Questions about memory-patterns

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

FAQPage Schema
How do I build an agent memory system using SQLite?

Implement an agent working memory pattern using an in-process Ref with controlled capacity limits and FIFO or LRU eviction, ensuring temporary data is managed before snapshot and flush operations to SQLite.

How does FTS5 search work for agent memory retrieval?

Use sqlite-vec KNN embeddings for agent memory by generating vectors through LLMService.embed and applying Tier 2 search to find semantically similar notes beyond standard FTS5 text matching.

What is the Zettelkasten link graph approach for AI agents?

The Zettelkasten link graph approach for AI agents stores inter-note relations and cross-references directly in SQLite, enabling structured navigation between memory entries and supporting consolidation operations.

How do I prevent data loss in SQLite agent memory layers?

Prevent data loss in SQLite agent memory layers by enabling WAL mode, using scoped database lifecycle management with acquireRelease, and following controlled working memory eviction, snapshot, and flush semantics.