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

mengram-ai

v2.7.3

Published

Human-like memory for AI — semantic, episodic & procedural memory. Experience-driven procedures, Cognitive Profile, unified search, memory agents. Free Mem0 alternative.

Readme

mengram-ai

JavaScript / TypeScript SDK for Mengram — Human-like memory for AI with 3 memory types: semantic, episodic, and procedural.

Install

npm install mengram-ai

Quick Start

const { MengramClient } = require('mengram-ai');

const m = new MengramClient('om-your-api-key');

// Add memories — auto-extracts facts, events, workflows
await m.add([
  { role: 'user', content: 'Fixed the auth bug. My process: check logs, reproduce locally, fix and deploy.' },
], { userId: 'ali' });

// Semantic search (classic)
const results = await m.search('auth issues', { userId: 'ali' });

// Episodic — what happened?
const events = await m.episodes({ query: 'auth bug' });
// → [{summary: "Fixed auth bug", outcome: "Resolved", participants: [...]}]

// Procedural — how to do it?
const procs = await m.procedures({ query: 'debug' });
// → [{name: "Debug process", steps: [...], success_count: 3}]

// Unified search — all 3 types at once
const all = await m.searchAll('deployment issues');
// → { semantic: [...], episodic: [...], procedural: [...] }

// Procedure feedback — AI learns what works
await m.procedureFeedback(procId, { success: true });

// Experience-driven evolution — procedure improves on failure
await m.procedureFeedback(procId, {
  success: false, context: 'OOM on step 3', failedAtStep: 3
});

// View procedure version history
const history = await m.procedureHistory(procId);
// → { versions: [v1, v2, v3], evolution_log: [...] }

// Cognitive Profile — instant personalization
const profile = await m.getProfile('ali');
// → { system_prompt: "You are talking to Ali, a developer..." }

TypeScript

import { MengramClient, SearchResult, Episode, Procedure, UnifiedSearchResult, ProcedureHistoryResult } from 'mengram-ai';

const m = new MengramClient('om-...');

const results: SearchResult[] = await m.search('preferences');
const events: Episode[] = await m.episodes({ query: 'deployment' });
const procs: Procedure[] = await m.procedures({ query: 'release' });
const all: UnifiedSearchResult = await m.searchAll('issues');

API

| Method | Description | |--------|-------------| | add(messages, options?) | Add memories (extracts all 3 types) | | addText(text, options?) | Add memories from plain text | | search(query, options?) | Semantic search | | searchAll(query, options?) | Unified search (all 3 types) | | episodes(options?) | Search/list episodic memories | | procedures(options?) | Search/list procedural memories | | procedureFeedback(id, options?) | Record success/failure (triggers evolution on failure) | | procedureHistory(id) | Version history + evolution log | | procedureEvolution(id) | Evolution log (what changed and why) | | getProfile(userId?, options?) | Cognitive Profile | | getAll(options?) | List all memories | | get(name) | Get specific entity | | delete(name) | Delete entity | | runAgents(options?) | Run memory agents | | insights() | AI reflections | | createTeam(name) | Create shared team | | joinTeam(code) | Join team | | shareMemory(entity, teamId) | Share with team |

Links