New local memory tool 'Brain-AI Memory' tackles AI agents forgetting across sessions

A new tool addresses a problem long-running AI agents face across coding and research sessions: even when an agent successfully finds the right stored note, it often uses that information the wrong way. Project details can leak into an unrelated project, an outdated fact can look current, a value that was already stored gets guessed again from scratch, or a new session starts without picking up the last decision made. The tool runs entirely locally, needing no API key, no model calls, and no hosted server.

It reads from an exact and writes a checkpoint after each session so the next one can pick up where it left off. In a demo, two versions of the same release fact are stored — the newer one (Thursday) is correctly returned as current, while the older one (Friday) stays available in history rather than being confused with the current value. All data is saved as plain files under a `.brain-ai` folder, so it can be inspected directly.

It also includes an optional small guard-and-fallback demo. The package itself only manages memory; running the actual is still left to the host application.

Key points

  • Targets the problem of AI agents misusing retrieved memory across sessions — leaking data between projects, treating stale facts as current, or losing prior decisions
  • Runs fully locally with no API key, model call, or required
  • Reads the current value from an exact while keeping older values in history rather than overwriting them
  • All memory data is stored as plain files under a `.brain-ai` folder for direct inspection
  • The package only manages memory; actual task execution stays with the agent host
Read original