Skip to main content

Hebbian memory for AI agents — memories that fire together wire together.

Project description

hebbmem

Hebbian memory for AI agents — memories that fire together wire together.

Install

pip install hebbmem

For higher-quality embeddings (recommended):

pip install hebbmem[ml]

Quick Start

from hebbmem import HebbMem

mem = HebbMem()

# Store memories
mem.store("Python is great for data science", importance=0.8)
mem.store("JavaScript runs in the browser", importance=0.5)
mem.store("Neural networks learn from data", importance=0.7)

# Time passes, memories decay
mem.step(5)

# Recall activates related memories through the graph
results = mem.recall("machine learning with Python", top_k=3)
for r in results:
    print(f"{r.content} (score={r.score:.3f})")

How It Works

hebbmem replaces flat vector storage with three neuroscience mechanisms:

Decay — Memories fade over time unless reinforced, following the Ebbinghaus forgetting curve. Recent and frequently accessed memories stay strong.

Hebbian Learning — Memories recalled together strengthen their connections. "Neurons that fire together wire together." Over time, the graph learns which memories are related through usage, not just embedding similarity.

Spreading Activation — Recalling one memory activates related ones through the graph, surfacing connections that keyword or vector search alone would miss.

Links

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

hebbmem-0.1.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

hebbmem-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file hebbmem-0.1.0.tar.gz.

File metadata

  • Download URL: hebbmem-0.1.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hebbmem-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd3c4b1051ef6d1d11835ffc7b1d115572dd1febf61979bf0c00904404e09a29
MD5 4105ac4ee31507e6bf8b521b14b94e0b
BLAKE2b-256 fe1ab6f2ad595c9e90a207bb1a5476d621544380bb5b0daea0d11e746477f342

See more details on using hashes here.

Provenance

The following attestation bundles were made for hebbmem-0.1.0.tar.gz:

Publisher: publish.yml on codepawl/hebbmem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hebbmem-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hebbmem-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hebbmem-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c021e459cc4275d76d8fb12869d2f140a760f5641a28ca95227a75c321c19d7
MD5 3385ec4569c49121c3cc6e9bfcd6257e
BLAKE2b-256 85f1d505769000aa5f324dbabf325331fd8e828a9893bd27579a4e8ccfa383e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for hebbmem-0.1.0-py3-none-any.whl:

Publisher: publish.yml on codepawl/hebbmem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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