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

@nebutra/memos-cloud-openclaw-plugin

v0.1.0

Published

OpenClaw lifecycle plugin for MemOS Cloud (add + recall memory)

Readme

MemOS Cloud OpenClaw Plugin (Lifecycle)

Official plugin maintained by MemTensor.

A minimal OpenClaw lifecycle plugin that recalls memories from MemOS Cloud before each run and adds new messages to MemOS Cloud after each run.

Features

  • Recall: before_agent_start/search/memory
  • Add: agent_end/add/message
  • Uses Token auth (Authorization: Token <MEMOS_API_KEY>)

Install

Option A — GitHub

openclaw plugins install github:MemTensor/MemOS-Cloud-OpenClaw-Plugin
openclaw gateway restart

Make sure it’s enabled in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "memos-cloud-openclaw-plugin": { "enabled": true }
    }
  }
}

Option B — Local path

Copy this folder into an OpenClaw plugin path (e.g. ~/.openclaw/extensions/) or use plugins.load.paths to point at it.

Example ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "memos-cloud-openclaw-plugin": { "enabled": true }
    },
    "load": { "paths": ["/path/to/memos-cloud-openclaw-plugin"] }
  }
}

Restart the gateway after config changes.

Environment Variables

The plugin tries env files in order (openclaw → moltbot → clawdbot). For each key, the first file with a value wins. If none of these files exist (or the key is missing), it falls back to the process environment.

Where to configure

  • Files (priority order):
    • ~/.openclaw/.env
    • ~/.moltbot/.env
    • ~/.clawdbot/.env
  • Each line is KEY=value

Quick setup (shell)

echo 'export MEMOS_API_KEY="mpg-..."' >> ~/.zshrc
source ~/.zshrc
# or

echo 'export MEMOS_API_KEY="mpg-..."' >> ~/.bashrc
source ~/.bashrc

Quick setup (Windows PowerShell)

[System.Environment]::SetEnvironmentVariable("MEMOS_API_KEY", "mpg-...", "User")

If MEMOS_API_KEY is missing, the plugin will warn with setup instructions and the API key URL.

Minimal config

MEMOS_API_KEY=YOUR_TOKEN

Optional config

  • MEMOS_BASE_URL (default: https://memos.memtensor.cn/api/openmem/v1)
  • MEMOS_API_KEY (required; Token auth) — get it at https://memos-dashboard.openmem.net/cn/apikeys/
  • MEMOS_USER_ID (optional; default: openclaw-user)
  • MEMOS_CONVERSATION_ID (optional override)
  • MEMOS_RECALL_GLOBAL (default: true; when true, search does not pass conversation_id)
  • MEMOS_CONVERSATION_PREFIX / MEMOS_CONVERSATION_SUFFIX (optional)
  • MEMOS_CONVERSATION_SUFFIX_MODE (none | counter, default: none)
  • MEMOS_CONVERSATION_RESET_ON_NEW (default: true, requires hooks.internal.enabled)

Optional Plugin Config

In plugins.entries.memos-cloud-openclaw-plugin.config:

{
  "baseUrl": "https://memos.memtensor.cn/api/openmem/v1",
  "apiKey": "YOUR_API_KEY",
  "userId": "memos_user_123",
  "conversationId": "openclaw-main",
  "queryPrefix": "important user context preferences decisions ",
  "recallEnabled": true,
  "recallGlobal": true,
  "addEnabled": true,
  "captureStrategy": "last_turn",
  "includeAssistant": true,
  "conversationIdPrefix": "",
  "conversationIdSuffix": "",
  "conversationSuffixMode": "none",
  "resetOnNew": true,
  "memoryLimitNumber": 6,
  "preferenceLimitNumber": 6,
  "includePreference": true,
  "includeToolMemory": false,
  "toolMemoryLimitNumber": 6,
  "tags": ["openclaw"],
  "asyncMode": true
}

How it Works

  • Recall (before_agent_start)

    • Builds a /search/memory request using user_id, query (= prompt + optional prefix), and optional filters.
    • Default global recall: when recallGlobal=true, it does not pass conversation_id.
    • Formats a MemOS prompt (Role/System/Memory/Skill/Protocols) from /search/memory results, then injects via prependContext.
  • Add (agent_end)

    • Builds a /add/message request with the last turn by default (user + assistant).
    • Sends messages with user_id, conversation_id, and optional tags/info/agent_id/app_id.

Notes

  • conversation_id defaults to OpenClaw sessionKey (unless conversationId is provided). TODO: consider binding to OpenClaw sessionId directly.
  • Optional prefix/suffix via env or config; conversationSuffixMode=counter increments on /new (requires hooks.internal.enabled).

Acknowledgements

  • Thanks to @anatolykoptev (Contributor) — LinkedIn: https://www.linkedin.com/in/koptev?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=ios_app