DEV Community

sellmind
sellmind

Posted on

I Built a Cross-Session Memory System for AI Agents — No More Re-Training Every Session

If you've ever used Claude Code (or any AI coding assistant), you know this feeling:

  • New session = AI has zero memory of you
  • Yesterday's decisions? Forgotten. Last week's context? Gone.
  • Hours spent "re-aligning" the AI before it can actually help

This isn't an AI problem. It's a memory problem.


What is sellmind?

sellmind (CellMind Temporal Memory Loop) is a memory system built specifically for AI agents.

Core Features:

  • 🌊 72-hour Temporal Window: Recent conversations automatically strengthened
  • 🧠 Cell Pool Memory: Like brain neurons — every concept is a cell, frequently activated cells grow stronger
  • 💚 Emotional Coherence: Remembers the emotional tone of conversations, resumes with consistent emotional state
  • 🔁 Cross-Session Persistence: Restart Claude Code, memory survives

How It Works

Cell Pool (CellMemory)

Each concept = one Cell with strength and energy. The more a topic is discussed, the stronger its cell, the slower it decays.

cell.activate(boost=0.2)  # Discussion strengthens the cell
cell.decay_all(days=1)     # Daily decay
Enter fullscreen mode Exit fullscreen mode

Temporal Memory Layer

All conversations logged, scored by importance. Memory within 72 hours gets the highest weight. But truly important content is automatically protected as permanent memory.

temporal.add_record("User prefers minimal design", role="user", importance=0.85)
temporal.apply_decay()  # Old memories fade, important ones stay
Enter fullscreen mode Exit fullscreen mode

Emotion Lock

Conversations record emotional state. When you return, the AI resumes with the emotional context from last time.


Quick Start (5 minutes)

# Install
pip install sellmind

# Start service
python -m sellmind.api

# Write memory
from sellmind import write
write("User is TaoTao, prefers minimalist product design")

# Read memory
from sellmind import read
context = read(hours=72)  # Last 72 hours
Enter fullscreen mode Exit fullscreen mode

API: http://localhost:18766


Why Not Just Use a Vector Database?

Vector databases solve the retrieval problem, not the memory problem.

sellmind solves:

  1. Which memories should strengthen vs. fade
  2. How memories connect to each other (Hebbian learning)
  3. How emotional state persists across sessions

It's a brain-like memory mechanism, not a cold database.


Open Source

GitHub: https://github.com/tjhub1983/sellmind
MIT License. Star and PR welcome.

Top comments (0)