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

@weaveintel/memory

v0.1.2

Published

Memory implementations — conversation, semantic, entity

Downloads

734

Readme

@weaveintel/memory

Gives an AI agent a memory — the running conversation, durable facts, the people and things it has met, and how they connect.

Why it exists

A fresh AI call is an amnesiac: it knows only what you paste into this one prompt. Real assistants need to remember — that you already introduced yourself, that "the Munich office" is the same place you mentioned last week, that a correction you made should stick. Think of it as the difference between a stranger and a colleague: the colleague carries context forward. This package is that carried-forward context — short-term chat history, long-term facts, the entities involved, and a small knowledge graph of how they relate (it absorbed the old standalone graph package, so entities and relationships live here too).

When to reach for it

Reach for it whenever an agent should recall anything across turns or sessions: conversation history, learned facts, or a graph of people/orgs/topics. Pick a backend to match your scale — in-memory for tests, SQLite/Postgres/pgvector/Redis/Mongo/DynamoDB for production. If all you need is to look up passages from a document corpus at query time (RAG over files), use @weaveintel/retrieval instead; memory is about what the agent remembers, not what it can fetch on demand.

How to use it

import { weaveConversationMemory } from '@weaveintel/memory';
import { weaveContext } from '@weaveintel/core';

const memory = weaveConversationMemory({ maxHistory: 50 });
const ctx = weaveContext();

await memory.addMessage(ctx, { role: 'user', content: 'I work in Munich.' });
await memory.addMessage(ctx, { role: 'assistant', content: 'Noted!' });

const recent = await memory.getMessages(ctx, 10); // last 10 turns, ready to re-prompt

What's in the box

  • ConversationweaveConversationMemory, createConfiguredConversationMemory.
  • Stores (pick a backend)weaveMemoryStore, weaveRuntimeMemoryStore, weaveSqliteMemoryStore, weavePostgresMemoryStore, weavePgVectorMemoryStore, weaveRedisMemoryStore, weaveMongoDbMemoryStore, weaveCloudNoSqlMemoryStore, plus createConfiguredMemoryStore / …Async.
    • Sharing one Postgres pool: the Postgres stores take either a connection string or an existing pool — weavePostgresMemoryStore({ url }) or weavePostgresMemoryStore({ pool }) (same for weavePgVectorMemoryStore). Pass a shared pool (e.g. from weaveSharedPostgres in @weaveintel/persistence) so your whole app runs on one connection instead of each store opening its own. When you inject a pool, the store leaves it open on close() — you own its lifecycle.
    • One implementation for SQLite + Postgres: the plain weaveSqliteMemoryStore and weavePostgresMemoryStore now share a single query implementation (built with Drizzle), so the two databases can't drift apart. memoryStoreContract runs the same battery against both to prove it. (The pgvector store is separate — it's Postgres-only by nature.)
  • Semantic & entityweaveSemanticMemory, weaveEntityMemory, fusedMemorySearch (recency × importance × relevance fusion).
  • Working memory & contextweaveWorkingMemory, createContextAssembler, compressor registry.
  • LifecyclededuplicateExact/deduplicateByKey, recordCorrection/supersede, enforceRetention/forgetUser/forgetSession, weaveMemoryConsolidator.
  • Extraction & proceduralrunHybridMemoryExtraction, extractEntitiesByRegexRules, createProceduralEntry/runProceduralCurator.
  • Knowledge graphcreateGraphMemoryStore, createEntityNode, createRelationshipEdge, createEntityLinker, createTimelineGraph, createGraphRetriever.
  • Governance & provenanceweaveGovernancePolicy, setProvenance/filterByConfidence.

License

MIT.