Skip to main content

HyperRecall

Portable memory for AI agents. 87.5% on Mem0's LoCoMo benchmark, $0 ingest cost.

Drop-in memory that thinks the way brains do — a hypergraph of experiences with spreading activation, decay, and contradiction handling. Not a bag of vector chunks.

Install

pip install hyperrecall

3-line quickstart

from hyperrecall import Mesh

mesh = Mesh("./mesh.db")
mesh.remember("Eli is building HyperRecall", participants=["Eli"])
print(mesh.recall("what is eli building").to_context_string())

Why HyperRecall

  • 87.5% on LoCoMo (Mem0's harness, gpt-5 judge, 1540 questions) — 4pt behind Mem0's committed number using their own harness, with $0 ingest cost
  • $0 ingest — no LLM extraction pass required; ingest scales linearly with input size, not model tokens
  • Portable file format — export any mesh to Markdown, re-import, or move between agents. Your memory is not locked into a vector DB
  • Contradictions & supersession as first-class — memories can conflict, be marked obsolete, or supersede older versions. Time is real
  • Spreading activation retrieval — recall doesn't just find the nearest vectors; it finds the connected web

Why not just use Mem0 / Zep?

An honest comparison. These are good tools; HyperRecall makes different bets.

Vector memory (naive RAG) Mem0 / Zep (KG memory) HyperRecall
Structure none — flat chunks knowledge graph: (head, relation, tail) triples hypergraph: N-ary edges with roles
One "Eli asked David about TEDx on Jul 13" fact 1 opaque chunk ~4–6 lossy triples that lose the co-occurrence 1 Experience edge binding all 5 participants
Retrieval top-k cosine graph walk / triple lookup spreading activation → connected subgraph
Forgetting none (or crude TTL) usually none pluggable decay curve (Ebbinghaus, power-law)
Reinforcement on access none none Hebbian boost
Contradictions invisible often silently overwritten explicit Contradicts edge, both surfaced with a flag
Supersession invisible overwrite (history lost) Supersedes edge; newest preferred, history kept
Portability proprietary store proprietary store directory of Markdown+YAML, lossless round-trip
Core deps vector DB vector DB + graph DB + LLM stdlib sqlite3 + numpy

The core disagreement is triples vs. hyperedges. A knowledge graph shreds "Eli asked David about TEDx applications on July 13 at 8pm" into a handful of binary edges (Eli —asked→ David, conversation —about→ TEDx, …). The fact that these all happened in one episode — the thing a human actually remembers — is exactly what gets lost. HyperRecall keeps the episode whole as a single hyperedge. See DESIGN.md for the full argument.


Design principles

  1. Genuine hypergraph. Hyperedges are first-class objects with a type, weight, decay rate, provenance, and members that each carry a role. Arity is arbitrary (N ≥ 2). This is not a triple store wearing a costume.
  2. Neuroscience-inspired. Spreading activation, forgetting curves, Hebbian reinforcement, contradiction and supersession — memory as a dynamic system, not a static index.
  3. Portable. Any mesh exports to human-readable Markdown+YAML and imports back losslessly. Your memory is yours; move it between Claude, Cursor, OpenClaw, or your own scripts. "USB-C for AI memory."
  4. Open-source forever. Apache 2.0. Python-first, TS SDK later. No cloud lock-in, no proprietary format.

How it works (30 seconds)

  • Nodes are memory units (facts, entities, decisions, outcomes), each with a confidence, an activation (its live salience), and a decay_rate.
  • Hyperedges connect N ≥ 2 nodes; each member has a role and a weight. Types include Experience, Contradicts, Supersedes, Refines, CausedBy, MentionedTogether.
  • Recall embeds your query, finds seed nodes (semantic + lexical), then spreads activation through hyperedges for k hops. Energy entering one member of a hyperedge lights up all the others. You get back a connected subgraph, ranked, with conflicts flagged — rendered to Markdown or a compact context string.
  • Storage is a single SQLite file (FTS5 for lexical search, float32 BLOB embeddings searched in numpy — no native extensions required).

Roadmap

  • Hypergraph substrate (nodes, N-ary hyperedges, roles)
  • Spreading-activation retrieval → subgraph
  • Decay + Hebbian reinforcement
  • Contradiction + supersession semantics
  • Portable Markdown+YAML export/import (lossless)
  • SQLite + FTS5 storage, numpy embedding search
  • CLI (hyperrecall remember | recall | export | import | demo)
  • LLM-based ingestion — extract atomic nodes + typed edges from raw turns
  • Pluggable real embedding models (OpenAI, local sentence-transformers)
  • Automatic contradiction/supersession detection at ingest
  • TypeScript SDK reading the same portable format
  • Entity resolution / node dedup
  • Optional encryption + federated sync

Development

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

License

Apache 2.0. See LICENSE. Built by Eli Azer.

Download files

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

Source Distribution

hyperrecall-0.1.1.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

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

hyperrecall-0.1.1-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

Details for the file hyperrecall-0.1.1.tar.gz.

File metadata

  • Download URL: hyperrecall-0.1.1.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for hyperrecall-0.1.1.tar.gz
Algorithm Hash digest
SHA256 30ccdeae93f5893321237516e917d80d954fa646ed6b8acf80ede1e46ae56762
MD5 a8191f70f7a25b363bc3461e588dbc4a
BLAKE2b-256 f734a42370947efcb1eb37b488a16ebc55c8d58f0fce1f673e1cc1cf19a400ea

See more details on using hashes here.

File details

Details for the file hyperrecall-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hyperrecall-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 33.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for hyperrecall-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 966731faff069f6bea088d0ecee982bbf9f42d071f18efc36d4c3d7e2cbd3c7e
MD5 7aba59f651bbde742292f28511a5e62a
BLAKE2b-256 64fc37aa28f7748ea843e974fd621b3c7164c48d2a944a7a1a73bd43ccb13341

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 Sentry Error logging StatusPage Status page