Project archive / 05

Long-Term Memory Engine for AI Agents

mempedia

A Rust engine for traceable, forkable, mergeable, and explainable agent memory across core knowledge, episodic memory, user preferences, and skills.

Archive
05
Category
Long-Term Memory Engine for AI Agents
Result
4-layer memory architecture

System / highlights

What I delivered.

  1. 01

    Designed a four-layer architecture covering graph-indexed core knowledge, chronological episodic memory, workspace preferences, and reusable agent skills.

  2. 02

    Implemented append-only node versions with immutable snapshots and multi-parent version DAGs for linear history, forks, merges, comparison, and rollback.

  3. 03

    Combined BM25, optional vector embeddings, and graph signals for hybrid retrieval while keeping human-readable Markdown projections of current knowledge.

  4. 04

    Added governed ingestion, synchronization, search, traversal, episodic recall, preference, and skill actions with atomic indexes and auditable agent writes.

Archive / full note

Project notes.

A Rust engine for traceable, forkable, mergeable, and explainable long-term agent memory.

Four memory layers

Mempedia separates agent memory into four layers: graph-indexed core knowledge, chronological episodic memories, workspace preferences, and reusable skills. This avoids treating every remembered item as the same kind of document and gives each layer storage and retrieval behaviour suited to its role.

Versioned knowledge

A node is a stable identity, while every change creates an immutable NodeVersion. Versions form a DAG that supports linear history, forks, multi-parent merges, comparison, and rollback. Current heads are projected into human-readable Markdown, while content-addressed objects and atomic indexes preserve history and auditability.

Retrieval and interoperability

Keyword search uses BM25-style signals. When embeddings are configured, hybrid retrieval can combine keyword, vector, and graph evidence. The engine exposes JSON actions for ingestion, traversal, search, synchronization, episodic recall, preferences, and skills, making it usable from coding agents and other local runtimes.

Open the Mempedia repository

Index / methods

Technology & methods.

  • 01Rust
  • 02Append-only Storage
  • 03Version DAG
  • 04Knowledge Graph
  • 05BM25
  • 06Hybrid Search
  • 07Markdown
  • 08BLAKE3