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

@shiyuhang0/smem-openclaw

v1.0.0

Published

OpenClaw memory plugin for `smem`.

Downloads

188

Readme

smem-openclaw

OpenClaw memory plugin for smem.

Features

  • toolMode=true is the default, using memory_search and memory_store as the primary memory path.
  • toolMode=false switches to hook-based recall in before_prompt_build and automatic store on agent_end.
  • memory_search and memory_store are always registered in both modes.

OpenClaw Integration

  • Declares kind: "memory" and occupies plugins.slots.memory.
  • Uses registerMemoryCapability({ promptBuilder }) to inject static memory guidance.
  • Uses registerTool(...) to register memory_search and memory_store.
  • Uses api.on("before_prompt_build", ...) for automatic hook-based recall when toolMode is false.
  • Uses api.on("agent_end", ...) for automatic hook-based store when toolMode is false.

Tools

memory_search

  • Manual recall path.
  • Calls POST /api/v1/memories/recall.
  • Intended for prior preferences, decisions, facts, and running context.

memory_store

  • Manual store path.
  • Calls POST /api/v1/memories.
  • Intended for cases where the user explicitly asks to save something or the model decides a stable preference/fact should be persisted.

Config

  • serverURL: SMEM server base URL. Default: http://localhost:8080
  • toolMode: when true, use tools as the default recall/store path. When false, use hook-based automatic recall/store. Default: true
  • topK: recall result count. Default: 5
  • storeMode: normal or smart. Default: smart
  • timeoutMs: request timeout in milliseconds. Default: 8000

OpenClaw Config Example

{
  "plugins": {
    "enabled": true,
    "slots": {
      "memory": "smem-openclaw"
    },
    "entries": {
      "smem-openclaw": {
        "enabled": true,
        "config": {
          "serverURL": "http://localhost:8080",
          "toolMode": true,
          "topK": 5,
          "storeMode": "smart",
          "timeoutMs": 8000
        }
      }
    }
  }
}

Publish And Install

Option 1: Install from npm

openclaw plugins install @shiyuhang0/smem-openclaw

Then enable it in OpenClaw config and assign the memory slot to smem-openclaw.

Option 2: Local install into OpenClaw

Use OpenClaw's local plugin install flow:

openclaw plugins install /absolute/path/to/smem/plugin/openclaw

For development symlink mode:

openclaw plugins install -l /absolute/path/to/smem/plugin/openclaw

Then set:

{
  "plugins": {
    "slots": {
      "memory": "smem-openclaw"
    },
    "entries": {
      "smem-openclaw": {
        "enabled": true
      }
    }
  }
}

Option 3: Publish to npm

  1. Update package.json before publishing:
    • choose the final package name
    • remove or set "private": false
    • keep openclaw.extensions = ["./index.ts"]
  2. Make sure the published package includes:
    • index.ts
    • openclaw.plugin.json
    • src/**
    • package.json
  3. Publish:
cd plugin/openclaw
npm publish
  1. Install from npm on an OpenClaw host:
openclaw plugins install <your-package-name>
  1. Enable it in OpenClaw config and assign the memory slot.

Runtime Requirements

  • SMEM server must be running and reachable at serverURL.
  • OpenClaw must load this plugin as the active memory slot.
  • Gateway restart is required after plugin/config changes.