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

@mem7ai/openclaw-mem7

v0.1.3

Published

OpenClaw memory plugin powered by mem7 — LLM fact extraction, graph relations, dedup, and Ebbinghaus forgetting curve.

Readme

@mem7ai/openclaw-mem7

OpenClaw memory plugin powered by mem7.

Replaces the built-in memory-core with LLM-powered fact extraction, vector + graph dual-path recall, automatic deduplication, and an Ebbinghaus forgetting curve — all running on mem7's Rust core via napi-rs.

Install

openclaw plugins install @mem7ai/openclaw-mem7

Configure

Add the plugin to ~/.openclaw/openclaw.json:

{
  "plugins": {
    "slots": { "memory": "openclaw-mem7" },
    "entries": {
      "openclaw-mem7": {
        "enabled": true,
        "config": {
          "llm": {
            "base_url": "http://localhost:11434/v1",
            "api_key": "ollama",
            "model": "qwen2.5:7b"
          },
          "embedding": {
            "base_url": "http://localhost:11434/v1",
            "api_key": "ollama",
            "model": "mxbai-embed-large",
            "dims": 1024
          },
          "graph": { "provider": "flat" },
          "decay": { "enabled": true }
        }
      }
    }
  }
}

If your OpenClaw config already has an OpenAI provider key (config.models.providers.openai.apiKey), you can omit api_key from the llm and embedding sections — the plugin will resolve them automatically.

Config Reference

| Key | Type | Default | Description | | ----------------- | ------- | -------------------- | --------------------------------------------------------------- | | llm | object | required | LLM for fact extraction and dedup (OpenAI-compatible) | | embedding | object | required | Embedding provider config | | vector | object | { provider: "flat" } | Vector store backend (flat or upstash) | | graph | object | disabled | Graph store backend (flat, neo4j, or kuzu) | | decay | object | { enabled: true } | Forgetting curve parameters | | autoRecall | boolean | true | Inject relevant memories before each agent turn | | autoRecallLimit | integer | 5 | Max memories to inject via auto-recall | | topK | integer | 5 | Default result limit for tool-driven search/list | | searchThreshold | number | unset | Optional minimum score for plugin search/recall | | autoCapture | boolean | true | Extract and store facts after each agent turn | | userId | string | "default" | Base user namespace for long-term memory | | dbPath | string | ~/.openclaw/mem7 | Base directory for SQLite history DB and graph data |

How It Works

Auto-Recall (before_prompt_build / before_agent_start)

Before each agent turn, the plugin:

  1. Extracts the latest user message
  2. Searches both the current session scope and the broader long-term scope
  3. Deduplicates the merged recall set
  4. Formats the top memories and graph relations into a context block
  5. Injects it as a system prompt prepend

The injected context looks like:

<mem7_context>
## Relevant memories about this user:
- [2026-03-15] Alice loves playing tennis (score: 0.92)
- [2026-03-10] Alice's coach is Sarah (score: 0.87)

## Known relations:
- Alice -[loves_playing]-> tennis
- Alice -[coached_by]-> Sarah
</mem7_context>

Auto-Capture (agent_end)

After each successful turn, the plugin:

  1. Extracts the user + assistant messages from the turn
  2. Stores them into the current session scope (runId = sessionKey when available)
  3. Tags stored memories with metadata.source = "OPENCLAW"
  4. New facts are stored; duplicates are merged; stale facts are updated or replaced

This runs as fire-and-forget — errors are logged but never block the response.

Tools

| Tool | Description | | ---------------- | ----------------------------------------------------------------- | | memory_search | Search memories by semantic query, with scope / longTerm | | memory_list | List stored memories for the selected scope | | memory_store | Explicitly store a fact into session or long-term scope | | memory_get | Retrieve a specific memory by ID; path="all" still lists all | | memory_forget | Delete a specific memory by ID, or find delete candidates by query |

Scope Model

The plugin supports three routing modes on search/list/forget tools:

  • scope: "session" routes reads/writes to the current session when sessionKey is available.
  • scope: "long-term" routes reads/writes to the broader user namespace without a session runId.
  • scope: "all" searches or lists both scopes and merges the results.
  • longTerm: true is a convenience alias for scope: "long-term".

For memory_store, the default is long-term storage unless you pass longTerm: false or scope: "session".

If the runtime sessionKey matches agent:<agentId>:..., the plugin automatically derives agentId for per-agent isolation. Session-scoped operations use the configured base userId plus the current runId; long-term operations omit runId but preserve the same agentId.

Forgetting Curve

Unlike standalone mem7 where decay is opt-in, the plugin enables decay by default because OpenClaw's long-running sessions accumulate stale facts quickly.

Memories that are frequently recalled decay slower (spaced-repetition effect). Memories that haven't been accessed in weeks are deprioritized but never fully removed.

See the mem7 README for the full mathematical model.

Development

# From the repository root
just openclaw-build
just lint
just typecheck

License

Apache-2.0