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

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

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-02-26
DOI
https://doi.org/10.5281/zenodo.18779778
Primary Topic
Multimodal Machine Learning Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Wang Jiake
Zenodo (CERN European Organization for Nuclear Research)
Multimodal Machine Learning Applications
article

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

Wang Jiake
article en

Abstract

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

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 44%
Multimodal Machine Learning Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.