Consolidate memory systems: 3 overlapping implementations #27

Closed
opened 2026-03-14 13:33:34 +00:00 by Rockachopa · 1 comment
Owner

What

There are at least 3 separate memory implementations that overlap:

  1. timmy/memory_system.py (519 lines) — Three-tier: MEMORY.md hot memory + vault markdown + semantic search. The "official" system.

  2. timmy/semantic_memory.py (244 lines) — Standalone vector search with SQLite + cosine similarity. Has its own chunking, embedding, search.

  3. timmy/memory/vector_store.py (153 lines) + unified.py (25 lines) — Yet another memory abstraction layer.

  4. brain/memory.py (227 lines) — Distributed brain memory for rqlite. Dead if brain module is deleted.

Plus Agno's built-in SQLite conversation history via SqliteDb(db_file=db_file).

Why

Three+ systems doing the same thing means bugs get fixed in one but not others, memory is fragmented, and the codebase is confusing.

What to do

  1. Pick ONE memory system. memory_system.py (three-tier) is the most complete.
  2. Merge any unique features from semantic_memory.py into it (vector search is useful)
  3. Delete memory/vector_store.py, memory/unified.py if they're just wrappers
  4. Delete brain/memory.py if brain module is removed
  5. Update all callers to use the single system

Files

  • src/timmy/memory_system.py — KEEP, consolidate into
  • src/timmy/semantic_memory.py — MERGE useful parts, then delete
  • src/timmy/memory/ — evaluate, likely delete
  • src/brain/memory.py — DELETE with brain module

Estimated effort: 3-4 hours

## What There are at least 3 separate memory implementations that overlap: 1. **`timmy/memory_system.py`** (519 lines) — Three-tier: MEMORY.md hot memory + vault markdown + semantic search. The "official" system. 2. **`timmy/semantic_memory.py`** (244 lines) — Standalone vector search with SQLite + cosine similarity. Has its own chunking, embedding, search. 3. **`timmy/memory/vector_store.py`** (153 lines) + `unified.py` (25 lines) — Yet another memory abstraction layer. 4. **`brain/memory.py`** (227 lines) — Distributed brain memory for rqlite. Dead if brain module is deleted. Plus Agno's built-in SQLite conversation history via `SqliteDb(db_file=db_file)`. ## Why Three+ systems doing the same thing means bugs get fixed in one but not others, memory is fragmented, and the codebase is confusing. ## What to do 1. Pick ONE memory system. `memory_system.py` (three-tier) is the most complete. 2. Merge any unique features from `semantic_memory.py` into it (vector search is useful) 3. Delete `memory/vector_store.py`, `memory/unified.py` if they're just wrappers 4. Delete `brain/memory.py` if brain module is removed 5. Update all callers to use the single system ## Files - `src/timmy/memory_system.py` — KEEP, consolidate into - `src/timmy/semantic_memory.py` — MERGE useful parts, then delete - `src/timmy/memory/` — evaluate, likely delete - `src/brain/memory.py` — DELETE with brain module ## Estimated effort: 3-4 hours
Collaborator

Closing and replacing with sharper, investigation-backed issues after full code review of the memory landscape. — Hermes

Closing and replacing with sharper, investigation-backed issues after full code review of the memory landscape. — Hermes
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#27