There is a newer version of the record available.

Published February 26, 2026 | Version v1
Presentation Open

The River Algorithm: A Sediment-Based Memory Consolidation Model for Personal AI Agents

Authors/Creators

Description

Current AI assistants suffer from a fundamental asymmetry: users invest years of conversation, yet the AI retains no lasting

  understanding of who they are. Retrieval-Augmented Generation (RAG) stores utterances but does not distill them into structured

  knowledge. We present the River Algorithm, a memory consolidation framework inspired by geological sedimentation. Incoming user

  messages flow through a real-time cognition layer that classifies intent, retrieves contextual memory, and verifies response

  fidelity. Personal observations then sediment through a multi-layered knowledge lifecycle—entering as suspected facts, accumulating

   evidence across sessions, graduating to confirmed knowledge through cross-validated promotion, and eventually reverting to a doubt

   state upon expiration or being superseded when contradicted. An offline purify phase, analogous to sleep consolidation in

  neuroscience, runs a 12-step pipeline that extracts observations, classifies them against the existing profile, resolves

  contradictions with full conversational context, manages time-based decay, and generates a trajectory summary of the user's life

  phase. We describe the architecture and implementation of JKRiver, an open-source personal AI agent. Three case studies demonstrate

   multi-session fact verification, contradiction resolution, and interest decay with re-mention recovery. Code:

  https://github.com/wangjiake/JKRiver

Files

river_algorithm.pdf

Files (334.6 kB)

Name Size Download all
md5:1f4920f370b04b456d8ea67978dc0ebc
334.6 kB Preview Download

Additional details

Related works