memory-systems

Implement persistent, queryable agent memory with hybrid retrieval and temporal knowledge graphs.

Updated Apr 15, 2025
One-click install
npx skills add https://github.com/khrore/nix-config --skill memory-systems-khrore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-systems
Source: https://github.com/khrore/nix-config/tree/main/dotfiles/common/.config/opencode/skills/memory-systems
Command: npx skills add https://github.com/khrore/nix-config --skill memory-systems-khrore

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Memory-systems provides a structured approach to persist and retrieve agent knowledge across sessions so agents can maintain continuity, resolve entity identity, and reason over temporal facts without relying solely on ephemeral context windows.

Core Features & Use Cases

  • Hybrid Retrieval: Combines vector-store semantic search with graph-based entity traversal and temporal filtering to improve multi-hop and time-sensitive queries.
  • Temporal Knowledge Graphs & Entity Registries: Supports validity intervals, entity identity resolution, and time-travel queries for facts that change over time.
  • Consolidation & Resilience: Provides strategies for periodic consolidation, conflict resolution, and write-retry behavior so production systems remain performant and robust.
  • Use Case: Build an assistant that remembers user preferences, tracks address/history changes, and answers "Where did user X live on March 1, 2024?" using temporal KG queries and semantic retrieval.

Quick Start

Use the memory-systems skill to prototype a file-system memory and then evolve it to a hybrid vector+temporal-graph memory with consolidation and just-in-time context injection.

Frequently Asked Questions about memory-systems

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

FAQPage Schema
How do I build persistent agent memory for cross-session continuity?

Build persistent agent memory by implementing structured stores that retain knowledge across sessions, combining vector-store semantic search, entity-graph traversal, and temporal filtering for continuity without relying on ephemeral context windows.

What is hybrid retrieval for AI agents and when do I need it?

Hybrid retrieval combines vector-store semantic search with graph-based entity traversal and temporal filtering. You need it to improve multi-hop and time-sensitive queries when agents must reason over complex relationships and changing facts.

How do I track entity identity and temporal facts in a knowledge graph?

Track entity identity and temporal facts by implementing a temporal knowledge graph with entity registries. This supports validity intervals, entity identity resolution, and time-travel queries for facts that change over time.

Does this agent memory approach work with numpy for prototyping?

Yes, this agent memory approach works with numpy as its core dependency. You can prototype a file-system memory and evolve it to a hybrid vector and temporal-graph memory with consolidation and just-in-time context injection.

What's the best way to handle memory consolidation and conflict resolution in production agents?

Handle memory consolidation and conflict resolution using strategies for periodic consolidation, conflict resolution, and write-retry behavior. This ensures production agent memory systems remain performant and robust during operation.

Why does my agent forget user preferences across different sessions?

Agents forget preferences across sessions when relying solely on ephemeral context windows. Implementing long-term entity stores with just-in-time context injection allows assistants to retain user preferences and track history changes persistently.