Skip to main content

Cognitive memory architecture for LLM agents with principled forgetting

Project description

Mnemo

Cognitive memory architecture for LLM agents with principled forgetting.

Mnemo provides a biologically-inspired memory system for AI agents, implementing tiered storage (sensory → working → long-term) with automatic decay and consolidation. Built on Ebbinghaus forgetting curves and modern memory consolidation theory, it lets agents maintain relevant context while gracefully forgetting stale information — just like humans do.

Installation

pip install mnemo

For real embedding support (sentence-transformers):

pip install mnemo[embeddings]

Quick Start

import mnemo

# Create a three-tier memory system
system = mnemo.create_memory_system()

# Store a memory
mem = mnemo.MemoryUnit(content="User prefers concise answers", importance=0.8)
system["working"].append(mem)

# Simulate retrieval (strengthens the memory)
mem.access()

# Check if it should be promoted to long-term storage
model = system["model"]
if model.should_consolidate(mem):
    system["long_term"].append(mem)

How It Works

Mnemo models agent memory as three tiers:

Tier Purpose Capacity Decay
Sensory Raw input buffer High Very fast
Working Active context Limited Moderate
Long-term Consolidated knowledge Large Slow

Memories decay exponentially based on time since last access, modulated by importance and retrieval frequency. Frequently accessed working memories consolidate into long-term storage.

Paper

Principled Forgetting in LLM Agent Memory Systems [Link to paper forthcoming]

License

Apache 2.0 — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cogmemory-0.1.0a1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cogmemory-0.1.0a1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file cogmemory-0.1.0a1.tar.gz.

File metadata

  • Download URL: cogmemory-0.1.0a1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cogmemory-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 45c424028f3e0c638cc75cded8099a318761209274b5ea2b609d2330629a9ed3
MD5 e49a8635f5953bc011218ccc116848a1
BLAKE2b-256 51ae91a9907e7b230cf19344d80261598109f6cd6d8335807e6cfe704432d1fc

See more details on using hashes here.

File details

Details for the file cogmemory-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: cogmemory-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cogmemory-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 3cca97384d346b7377a952eecc3f74f230a8540af9b228755339773875ac8434
MD5 aa9e2e6045d09122736ca92b2263254f
BLAKE2b-256 7ee2b7d4785a37ea2920ce7b2af366152aba45bfa54abce4a980d4ffdb0e7da2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page