npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hyperspace-memory

v4.2.0

Published

Drop-in Mem0, Zep, and MemGPT replacement in TypeScript powered by HyperspaceDB native memory engine with 1-bit ADC, CSR KAG Graph, and Lorentz hyperbolic spaces

Readme

hyperspace-memory (TypeScript) 🚀

Drop-in replacement for Mem0, Zep, and MemGPT in TypeScript/JavaScript powered by the HyperspaceDB native memory engine with 1-bit ADC quantization, MRL in-RAM cascades, and Lorentz hyperbolic spaces.

NPM Version License: MIT


⚡ Key Advantages over Mem0 & Zep

  • 100x Lower Search Latency: Sub-millisecond (< 0.5 ms) retrieval via MRL in-RAM cascade indexing (vs 1200+ ms in LLM-based memory agents).
  • Zero-Knowledge Client-Side Encryption: Vectors and chunk payloads are encrypted client-side using deterministic isometric projections + AES-256-GCM. Vec2Text inversion cosine collapses to $0.038$.
  • Autonomous Cognitive Decay & Superseding: Native Ebbinghaus forgetting curve ($S(t) = S_0 \cdot e^{-\lambda \Delta t}$) and directed SUPERSEDES graph relations eliminate outdated facts without requiring slow, expensive LLM reflection calls.
  • 98% RAM & Storage Reduction: Native extreme 1-bit ADC and turbo 4-bit Lloyd-Max quantization.
  • 100% Mem0 API Compatibility: Replace import { Memory } from "mem0ai" with import { Memory } from "hyperspace-memory" without altering application logic.

📦 Installation

npm install hyperspace-memory

🛠 Quick Start (Mem0 Drop-In Migration)

import { Memory } from "hyperspace-memory";

// 1. Initialize Memory with optional Zero-Knowledge Encryption & Ebbinghaus Decay
const memory = new Memory({
  host: "the.yar.ink",
  apiKey: "YOUR_YARINK_API_KEY",
  quantization: "medium_plus", // "none" | "medium_plus" | "turbo" | "extreme"
  encryptionKey: "user_confidential_master_key", // Zero-Knowledge client-side encryption
  decayLambda: 0.01,            // Ebbinghaus exponential forgetting rate
  autoSupersede: true           // Automatically links older contradicting concepts via SUPERSEDES edge
});


// 2. Add Memory
const res = await memory.add(
  "User prefers TypeScript and React over Angular.",
  { userId: "user_123", metadata: { category: "preferences" } }
);
console.log("Added Memory:", res);

// 3. Search Memory
const results = await memory.search("What UI framework does the user prefer?", {
  userId: "user_123",
  limit: 3
});
for (const item of results) {
  console.log(`Memory: ${item.memory} (Score: ${item.score})`);
}

// 4. Cognitive Consolidation (Fréchet Mean on Hyperboloid)
const consolidation = await memory.consolidate("UI frameworks", {
  summaryText: "User consistently prefers modern React/TypeScript stack across all projects."
});
console.log("Consolidated concept:", consolidation.summary);

// 5. Anti-Hallucination Claim Verification (Lorentz Geodesic Trust)
const verification = await memory.verifyClaim(
  "User prefers TypeScript and React over Angular.",
  "User would be enthusiastic about migrating the codebase to Angular."
);
console.log("Trust status:", verification.status, "Score:", verification.trustScore);

// 6. Delete & Reset
await memory.delete(results[0].id);

🧠 Cognitive Operations

  • memory.consolidate(topicQuery, options): Synthesizes a cluster of related episodic memories into a single abstract semantic concept using the Fréchet Mean in Lorentz hyperbolic space.
  • memory.verifyClaim(premise, conclusion, threshold?): Computes Geodesic Trust Score (Lorentz $\mathbb{H}^{32}$ + Cosine 96D) to verify that an LLM conclusion does not violate established facts or hallucinate.
  • memory.link(sourceId, targetId, relation?, weight?): Explicitly connects memory nodes with directed edges in the CSR graph.
  • memory.linkBatch(edges): Bulk-inserts directed topology edges.
  • memory.unlink(sourceId, targetId, relation?): Zero-lag deletion of explicit edges.
  • memory.induceEdges(rules): Declaratively constructs knowledge graph edges from existing metadata fields.
  • memory.listSessions(limit?): Discovers and enumerates active conversational sessions.
  • memory.exploreHierarchy(conceptId, direction?): Navigates conceptual subsumption and taxomomy trees.
  • memory.stats(): Returns vector counts, cascade configuration, and collection status.

📄 License

MIT © YARlabs.