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

@memorilabs/openclaw-memori

v0.0.4

Published

Official MemoriLabs.ai long-term memory plugin for OpenClaw

Readme

Memori Labs


Why Memori for OpenClaw?

OpenClaw ships with a simple file-first memory system designed for lightweight experimentation. As deployments scale into production environments, teams often run into memory problems that need more structured, deterministic infrastructure.

Memori provides a drop-in memory layer purpose-built for agentic systems running OpenClaw in production. It works through OpenClaw's plugin lifecycle, so you get persistent, structured memory without changing your agent logic.

Common Challenges with Default OpenClaw Memory

1. Fact conflicts in long-running agents

OpenClaw stores memory as plain markdown files. When facts change or contradict over time, there is no deterministic conflict resolution or lifecycle management.

Memori introduces structured memory with update logic, decay policies, and deterministic fact handling.

2. Context loss from token limits

As sessions grow, context must be compacted to fit within model token limits. Important details can be dropped during compression.

Memori stores memory outside the prompt and retrieves the right facts at query time, eliminating compaction loss.

3. No relationship reasoning

OpenClaw retrieves semantically similar text but does not model relationships between entities.

Memori builds structured memory graphs that let agents reason across linked facts, not just retrieve similar chunks.

4. Cross-project noise

When multiple projects share memory storage, irrelevant context can bleed across workflows.

Memori supports scoped memory namespaces to isolate projects and workflows.

5. No user-level isolation

Default memory systems do not provide deterministic isolation across users.

Memori enforces user-scoped memory boundaries for secure multi-user deployments.

What Changes When You Add Memori?

The Memori plugin replaces OpenClaw's flat-file memory workflow with managed, structured memory that is scoped by entity_id, process_id, and session_id and enriched automatically through OpenClaw's existing hooks.

| Capability | What changes | | --- | --- | | Structured memory storage | Instead of raw markdown blobs, Memori stores conversations, facts, preferences, and knowledge-graph triples as structured records tied to an entity, process, and session. Facts are extracted as subject-predicate-object relationships, deduplicated over time, and connected into a graph so related memories stay queryable instead of being buried in text files. | | Advanced Augmentation | After each conversation, Memori processes the user and assistant exchange asynchronously in the background, identifies facts, preferences, skills, and attributes, generates embeddings for semantic search, and updates the knowledge graph without blocking the agent's response path. | | Intelligent Recall | Before the agent responds, Memori searches the current entity's stored facts and knowledge graph, ranks memories by semantic relevance and importance, and injects the most useful context into the prompt so durable knowledge survives context-window compression. | | Production-ready observability | Memori Cloud gives you dashboard visibility into memory creation, recalls, cache hit rate, sessions, quota usage, top subjects, per-memory retrieval metrics, and knowledge-graph relationships, so you can inspect what was stored and how recall is behaving in production. |

The plugin still remains drop-in: OpenClaw handles the agent loop, while Memori adds recall, augmentation, sanitization, and observability around it.

Quickstart

Get persistent memory running in your OpenClaw gateway in three steps.

Prerequisites

  • OpenClaw v2026.3.2 or later
  • A Memori API key from app.memorilabs.ai
  • An Entity ID to attribute memories to, such as a user ID, tenant ID, or agent name

1. Install and Enable

Run the following commands in your terminal to install and enable the plugin:

# 1. Install the plugin from npm
openclaw plugins install @memorilabs/openclaw-memori

# 2. Enable it in your workspace
openclaw plugins enable openclaw-memori

# 3. Restart the OpenClaw gateway
openclaw gateway restart

2. Configure

The plugin needs your Memori API key and an Entity ID to function. You can configure this via the OpenClaw CLI or your openclaw.json file.

Option A: Via OpenClaw CLI (Recommended)

openclaw config set plugins.entries.openclaw-memori.config.apiKey "YOUR_MEMORI_API_KEY"
openclaw config set plugins.entries.openclaw-memori.config.entityId "your-app-user-id"

Option B: Via openclaw.json

Add the following to your ~/.openclaw/openclaw.json file:

{
  "plugins": {
    "entries": {
      "openclaw-memori": {
        "enabled": true,
        "config": {
          "apiKey": "your-memori-api-key",
          "entityId": "your-app-user-id"
        }
      }
    }
  }
}

Configuration Options

| Option | Type | Required | Description | | ---------- | -------- | -------- | --------------------------------------------------------------------------------------------------- | | apiKey | string | Yes | Your Memori API key. | | entityId | string | Yes | The unique identifier for the entity (e.g., user, agent, or tenant) to attribute these memories to. |

3. Verify

Restart the gateway and inspect the logs:

openclaw gateway restart
openclaw gateway logs --filter "[Memori]"

You should see:

[Memori] === INITIALIZING PLUGIN ===
[Memori] Tracking Entity ID: your-app-user-id

To test the full memory loop:

  1. Send a message with a durable preference: I always use TypeScript and prefer functional patterns.
  2. Confirm augmentation ran: Augmentation successful!
  3. Start a new session and ask: Write a hello world script.
  4. Confirm recall ran: Successfully injected memory context.

How It Works

This plugin integrates with OpenClaw's event lifecycle to provide persistent memory without interfering with the agent's core logic:

  1. before_prompt_build (Intelligent Recall): When a user sends a message, the plugin intercepts the event, queries the Memori API, and safely prepends relevant memories to the agent's system context.
  2. agent_end (Advanced Augmentation): Once the agent finishes generating its response, the plugin captures the final user and assistant messages, sanitizes them, and sends them to the Memori integration endpoint for long-term storage and entity mapping.

Contributing

We welcome contributions from the community! Please see our Contributing Guidelines for details on code style, standards, and submitting pull requests.

To build from source:

# Clone the repository
git clone https://github.com/memorilabs/openclaw-memori.git
cd openclaw-memori

# Install dependencies and build
npm install
npm run build

# Run formatting, linting, and type checking
npm run check

Support


License

Apache 2.0 - see LICENSE