Persistent memory for coding agents that captures session activity, compresses it with AI, and injects relevant context into future sessions.
aru-labs/lossless-memory
Local, file-based long-term memory for a personal AI that keeps every raw conversation line unsummarized and indexes it by time.
- Stars
- 146
- Forks
- 13
- Open issues
- 0
- Last commit
- 29 days ago
What is it?
lossless-memory stores a personal AI's conversation history as raw, timestamped JSONL logs and never summarizes them. Records are indexed in SQLite with FTS5 for exact word search and sqlite-vec for semantic search, and the indexes can be deleted and rebuilt from the logs at any time.
Retrieval starts with time. A query such as "yesterday evening, about the budget" is parsed into a date range before ranking, and matching lines come back in chronological order with their timestamps. Semantic search is used only as a fallback when the exact index returns too few results in that range. A separate index called LLL records timestamped topic markers so the model can be told the current conversation topic on every turn.
The project runs on one machine for one user, with no server or cloud component. Time phrases are parsed in English and Japanese, and a daemon re-indexes changed log files every ten minutes by default.
Key features
- 01Stores every conversation turn verbatim in per-day JSONL files with a fixed seven-field schema.
- 02Parses relative and absolute time phrases in English and Japanese to restrict search ranges.
- 03Combines SQLite FTS5 keyword search with sqlite-vec semantic search as a fallback.
- 04Keeps an LLL index of timestamped topic markers that can be injected into model context.
- 05Rebuilds indexes from raw logs and re-indexes only changed days via a background daemon.
Use cases
- Giving a self-hosted personal AI assistant a long-term memory of past conversations.
- Looking up what was said or decided on a specific day or time range.
- Keeping an assistant's current topic across context-window compaction and session restarts.
Quick start
- 1
Clone the repository
git clone https://github.com/aru-labs/lossless-memory - 2
Enter the project directory
cd lossless-memory - 3
Install the package in editable mode
pip install -e . - 4
Copy the example config and edit names and paths if you like
cp config.example.json config.json
Things to know
- Designed for a single user on a single machine; no multi-tenant support.
- Relative time phrases are parsed only in English and Japanese.
- Semantic search requires a local sentence-transformers embedding model.
- Development is paused for a while.
Topics
FAQ
- What is lossless-memory?
- Local, file-based long-term memory for a personal AI that keeps every raw conversation line unsummarized and indexes it by time. lossless-memory stores a personal AI's conversation history as raw, timestamped JSONL logs and never summarizes them. Records are indexed in SQLite with FTS5 for exact word search and sqlite-vec for semantic search, and the indexes can be deleted and rebuilt from the logs at any time.
- Is lossless-memory free to use? What license does it have?
- lossless-memory is open source under the MIT license. Check the license terms before using it in commercial products.
- Is lossless-memory still maintained?
- Actively maintained. The last commit to lossless-memory was on Sep 23, 2026.
- What can I use lossless-memory for?
- Giving a self-hosted personal AI assistant a long-term memory of past conversations. Looking up what was said or decided on a specific day or time range. Keeping an assistant's current topic across context-window compaction and session restarts.
- How do I install lossless-memory?
- Clone the repository: git clone https://github.com/aru-labs/lossless-memory Enter the project directory: cd lossless-memory Install the package in editable mode: pip install -e . Copy the example config and edit names and paths if you like: cp config.example.json config.json
- Where can I get lossless-memory?
- The source code and installation instructions are on GitHub: https://github.com/aru-labs/lossless-memory
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Long-term memory for coding agents that stores memories in a local SQLite database and shares them across Claude Code, Codex, Cursor and other MCP clients.
Shared, auto-learning memory layer that captures coding-agent sessions, mines them into reusable skills, and shares them across Claude Code, Codex, Cursor and other agents.
Local-first AI memory system that stores conversation history verbatim and retrieves it with semantic search, exposed as an MCP server and CLI.
A local-first, Markdown-native long-term memory layer for AI agents, storing memories as editable files with SQLite and LanceDB indexes.
A local, self-hosted memory hub that gives multiple AI agents such as Claude Code, Codex and OpenClaw one shared, persistent memory of you.