logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·30.10.26
← Back to news

Show HN: Lossless-memory – a personal AI memory that never summarizes

Original article
github.com|43 points|13 comments|by aru-labs|Sep 21, 2026

Lossless-memory: A Verbatim Long-Term AI Memory System

GitHub Repository: aru-labs/lossless-memory

Core Philosophy: Never summarize. Retain every single line. Timestamp everything.

Most existing long-term memory frameworks for AI rely on two primary methods: condensing conversations into brief summaries or utilizing embeddings to retrieve "semantically similar" fragments.

Both approaches fail the user who interacts with the same AI daily because they discard the most critical elements: exactly what was said and precisely when it happened.


📌 Overview: What is Lossless-memory?

This system treats every single piece of data—whether it is a user utterance, an AI action, or a chunk of a document—as a record tied to a timestamp. The entire index is constructed around this temporal axis, ensuring that results are returned in chronological order and completely unsummarized.

Project Status & Lineage

The conceptual roots of this project date back to December 2025.

  • Dec 2025: First ancestor (memory-inheritance tool) launched.
  • Jan 2026: Predecessor system entered daily use.
  • July 2026: Current implementation began daily operation for a single user.
  • June 2026: Raw logs date back to this point.

Summarization is not a feature here. The project also maintains a transparent record of its mistakes in docs/lessons.md.

🛠️ Functional Definition

  • Local Storage: A file-based layer using JSONL logs and SQLite.
  • Hybrid Search: Uses FTS5 for exact keyword matches and sqlite-vec for semantic retrieval.
  • Temporal Intelligence: A query entry point that parses time-based expressions to filter search ranges.
  • Context Persistence: An "LLL" index to maintain the "current position" of a conversation.
  • Zero Summarization: No part of the pipeline compresses the original text.

💾 The Technical Foundation

1. The Lossless Raw Log

The "Source of Truth" consists of per-day JSONL files. Every single turn is converted into a standardized 7-field record:

FieldDescriptionDetails
tsTimestampISO-8601 format (UTC)
actorSpeakerConfigurable identity names
roleRoleuser | assistant | system
typeContent Typetext | action | meta
textContentThe verbatim text
modelIdentifierThe specific AI model used
sessionSession IDUnique identifier for the conversation

2. The Temporal Backbone

In this system, time is the primary axis, not just metadata.

The exact-match index (SQLite FTS5) uses bigram tokenization to support both English and Japanese. The query parser converts natural language time phrases into a mathematical range: Query Range=[Tstart,Tend]\text{Query Range} = [T_{start}, T_{end}]Query Range=[Tstart​,Tend​]

  • Relative Phrases: "Yesterday," "last week," or "3 days ago" (currently Japanese only).
  • Absolute Dates: "2026-07-19" (supported in all languages).

The Logic Flow:

  1. Parse time phrase →\rightarrow→ 2. Restrict search range →\rightarrow→ 3. Rank results →\rightarrow→ 4. Return verbatim lines.

Note: Semantic search is only triggered as a fallback if the exact index yields insufficient results within the time range, and this fallback is explicitly noted in the output.

3. LLL: The "Where Are We Now" Index

LLL is a lightweight index of "topic markers"—short, timestamped entries that signal a shift in conversation subject.

The Golden Rules of LLL:

  1. The Human writes it; the AI reads it.
  2. The Human defines priority colors and completion marks.

Because the model cannot edit its own sense of importance, the LLL is injected into the context window every turn. This prevents the AI from "forgetting" the current thread after a context-window compaction.


🏗️ System Architecture

The system uses a small daemon for incremental re-indexing. It detects modified source files and only updates the affected days, meaning a full rebuild is never necessary.


🚀 Quickstart Guide

To get the system running locally:

# Clone the repository
git clone https://github.com/aru-labs/lossless-memory
cd lossless-memory

# Install dependencies
pip install -e .

# Setup configuration
cp config.example.json config.json # Customize names and paths

For a full walkthrough, refer to examples/quickstart.md. You can ingest sample data and run time-scoped queries in roughly five minutes.


📊 Real-World Performance Metrics

The following data is derived from actual operation, not theoretical projections:

MetricValue / Result
Operational HistoryDaily since 2026-07 (Logs from 2026-06); Lineage since 2025-12
Exact-Search Rebuild40s→1.24s\text{40s} \rightarrow \text{1.24s}40s→1.24s (after redesign)
Vector Index Size447,013 rows→865,588 rows (peak)→124,174 rows (cleaned)447,013 \text{ rows} \rightarrow 865,588 \text{ rows (peak)} \rightarrow 124,174 \text{ rows (cleaned)}447,013 rows→865,588 rows (peak)→124,174 rows (cleaned)