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.

Metadata

Release files for hyperrecall 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hyperrecall 0.1.1
File Size Uploaded Provenance
hyperrecall-0.1.1.tar.gz 31.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hyperrecall 0.1.1
File Interpreter ABI Platform
hyperrecall-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 65.1 kB

Release files / hyperrecall-0.1.1.tar.gz

Download URL hyperrecall-0.1.1.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
30ccdeae93f5893321237516e917d80d954fa646ed6b8acf80ede1e46ae56762
BLAKE2b-256 checksum
How to use checksums
f734a42370947efcb1eb37b488a16ebc55c8d58f0fce1f673e1cc1cf19a400ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / hyperrecall-0.1.1-py3-none-any.whl

Download URL hyperrecall-0.1.1-py3-none-any.whl
Size 33.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
966731faff069f6bea088d0ecee982bbf9f42d071f18efc36d4c3d7e2cbd3c7e
BLAKE2b-256 checksum
How to use checksums
64fc37aa28f7748ea843e974fd621b3c7164c48d2a944a7a1a73bd43ccb13341
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for hyperrecall 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page