PHANTOM
🇮🇳 IN
Skip to content

Add openclaw plugin#1096

Open
malatewang wants to merge 1 commit intomainfrom
openclaw
Open

Add openclaw plugin#1096
malatewang wants to merge 1 commit intomainfrom
openclaw

Conversation

@malatewang
Copy link
Contributor

Purpose of the change

Add a plugin for openclaw so that openclaw can use MemMachine as longterm memory

Description

Add a plugin for openclaw for MemMachine. The openclaw can access MemMachine through the MemMachine Typescript rest client to store and search memory.

Fixes/Closes

Fixes #(issue number)

Type of change

[Please delete options that are not relevant.]

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g., code style improvements, linting)
  • Documentation update
  • Project Maintenance (updates to build scripts, CI, etc., that do not affect the main project)
  • Security (improves security without changing functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

[Please delete options that are not relevant.]

  • Unit Test
  • Integration Test
  • End-to-end Test
  • Test Script (please provide)
  • Manual verification (list step-by-step instructions)

Test Results: [Attach logs, screenshots, or relevant output]

image

Checklist

[Please delete options that are not relevant.]

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project (See STYLE_GUIDE.md)
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

Screenshots/Gifs

[If applicable, add screenshots or GIFs that show the changes in action. This is especially helpful for API responses. Otherwise, delete this section or type "N/A".]

Further comments

[Add any other relevant information here, such as potential side effects, future considerations, or any specific questions for the reviewer. Otherwise, type "None".]

Copy link
Contributor

@sscargal sscargal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions and requests:

  • Please write a User Guide, which would be very helpful for describing the steps needed to install, configure, and use this.
    • Does a user need a MemMachine Platform account and an API key for this to work, or do we expect them to have MemMachine Server running locally? Or both?
  • How should this be distributed? (aka, how does a user install this in their environment?)
    • Do we need to build and publish a separate/dedicated NPM package?
  • Is /src the best place for this, or should it live in /integrations?

Thanks.

@honggyukim
Copy link
Contributor

Hi @malatewang, thanks for working on this.

In addition to @sscargal's comment. It would be helpful if the commit message contains more useful description rather than a single line message.

@malatewang malatewang force-pushed the openclaw branch 3 times, most recently from ce80999 to db44996 Compare February 12, 2026 01:36
Copy link
Contributor

@sscargal sscargal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly clarifications.

Should we consider adding some tests?

@@ -0,0 +1,28 @@
## Setup
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an Introduction that explains what this plugin is, what it does, and how it works? It'll help users better understand what we're offering. We should include a prerequisite that users need an API Token and a free account on our MemMachine platform (See below for instructions)

Assume the reader knows nothing about MemMachine and write accordingly.

This README.md becomes the package README when published, so it needs to contain more information for the users to follow. See https://www.npmjs.com/package/@openclaw/voice-call?activeTab=readme for an example.

## Setup

```bash
openclaw plugins install @memmachine/openclaw-memmachine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This installation method assumes there is a published NPM package on npmjs.com, but I don't see anywhere that we publish this package to npmjs.com using the openclaw-memmachine package name within the memmachine organization. I expect to see a GitHub Actions Workflow file that publishes the package.

Once this PR is approved and merged, and the package is published, we should have a publicly available package at https://www.npmjs.com/package/@memmachine/openclaw-memmachine.

We have other packages published to the @memmachine org, such as https://www.npmjs.com/package/@memmachine/n8n-nodes-memmachine.

https://docs.openclaw.ai/tools/plugin#cli lists many options for installing plugins. I agree that the NPM approach is the best and easiest for users.

We should recommend that the user verify the plugin is installed successfully using openclaw plugins list.

"baseUrl": "https://api.memmachine.ai",
"autoCapture": true,
"autoRecall": true,
"orgId": "openclaw",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the user to provide this value during initial setup/config, or is openclaw the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is configured on UI

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. Suggest we update the documentation to provide guidance and the necessary steps and fields that are mandatory vs optional to help the user.

"autoCapture": true,
"autoRecall": true,
"orgId": "openclaw",
"projectId": "openclaw",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the user to provide this value during initial setup/config, or is openclaw the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need user configuration

"projectId": "openclaw",
"searchThreshold": 0.5,
"topK": 5,
"userId": "openclaw"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the user to provide this value during initial setup/config, or is openclaw the default?

return jsonResult({ action: "candidates", candidates });
},
}),
{ name: "memory_forget" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be memory_delete? The other tools use the same names for both. Here, we register the tool with memory_delete, then use memory_forget.

"@sinclair/typebox": "^0.34.48",
"jiti": "^2.6.1",
"openclaw": "^2026.2.6",
"pnpm": "^10.29.2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need pnmp? This package is so small that we're unlikely to benefit from it. It would reduce the dependency count by 1, likely reducing the package's disk space. pnpm has a large dependency that inflates the storage required for this package. This is more of a curiosity than a hard requirement, so removing it is not a hard requirement. If we do need it, then there's no problem.

Recommendation - pick npm or pnpm; We don’t ship both package-lock.json and pnpm dependency


### Platform (MemMachine Cloud)

Get an API key from [MemMachine Cloud](https://console.memmachine.ai), then add to your `openclaw.json`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the only requirement is to have the user enter their apikey, perhaps clarifying that they can copy/paste this snippet into their existing openclaw.json would be helpful. I assume/understand that all the required orgId, projectId, and owner fields would then default to openclaw. Is the user free to change this in the JSON or plugin config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is easier to configure on UI?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely, yes. Supporting the UI and 'manual' methods is okay with me

  • If the user needs to copy/paste the JSON snippet anyway, including this 'manual' method is fine.
  • If the user doesn't need to copy/paste into their master openclaw.json, then documenting the UI approach is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary. I think once the npm is installed, the entry is added automatically to the openclaw.json and it is disabled. The user just need to fill the value.

}
},

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention that this information could also be entered in the OpenClaw Plugins UI (as shown in your screenshot).

@sscargal sscargal added the Integration An integration into a 3rd party framework or solution using MemMachine label Feb 12, 2026
Copy link
Contributor

@sscargal sscargal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could consider whether it's worth moving this to a dedicated repository. It may be easier to maintain and version control independently. Just an idea, not a request.


```bash
openclaw plugins install ./memmachine/openclaw
cd ./memmachine/openclaw && pnpm install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the memmachine/openclaw directory not be integrations/openclaw?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use https://www.npmjs.com/package/@supermemory/openclaw-supermemory as a guiding flow for this README.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider if a slash command or CLI is necessary, similar to SuperMemory?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do support CLI commands. I updated the README

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider if a slash command or CLI is necessary, similar to SuperMemory?

@malatewang malatewang force-pushed the openclaw branch 2 times, most recently from 9f454b0 to 111e528 Compare February 20, 2026 01:14
Copy link

@Tianyang-Zhang Tianyang-Zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the memmachine API Key have some usage limits. Can't I use my own OpenAI API keys and AWS reranker key?

@malatewang
Copy link
Contributor Author

I see the memmachine API Key have some usage limits. Can't I use my own OpenAI API keys and AWS reranker key?

The API key is for MemMachine platform. It is required only if you use the platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration An integration into a 3rd party framework or solution using MemMachine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants