Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/release-oc-memwal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Release OC-MemWal Plugin

on:
push:
branches:
- main
- staging
- dev
paths:
- 'packages/openclaw-memory-memwal/**'
- '.github/workflows/release-oc-memwal.yml'
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Version & Publish
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- name: Upgrade npm for OIDC Trusted Publishing
run: npm install -g npm@latest

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Build SDK (dependency)
run: pnpm build:sdk

- name: Typecheck
run: cd packages/openclaw-memory-memwal && npm run typecheck

- name: Build plugin
run: cd packages/openclaw-memory-memwal && npm run build

# ── main branch → stable release (latest) ──
- name: Publish stable release
if: github.ref == 'refs/heads/main'
run: |
BASE_VERSION=$(node -p "require('./packages/openclaw-memory-memwal/package.json').version")
npm view @mysten-incubation/oc-memwal@$BASE_VERSION version 2>/dev/null \
&& echo "Version $BASE_VERSION already published, skipping" && exit 0
cd packages/openclaw-memory-memwal && npm publish --provenance --access public

# ── staging branch → release candidate (rc tag, auto-increment) ──
- name: Publish staging release candidate
if: github.ref == 'refs/heads/staging'
run: |
BASE_VERSION=$(node -p "require('./packages/openclaw-memory-memwal/package.json').version")
LATEST=$(npm view @mysten-incubation/oc-memwal versions --json 2>/dev/null \
| node -p "
const versions = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
const nums = (Array.isArray(versions) ? versions : [versions])
.filter(v => v.startsWith('${BASE_VERSION}-rc.'))
.map(v => +v.split('-rc.')[1])
.sort((a,b) => b - a);
nums.length ? nums[0] : -1;
" || echo "-1")
NEXT=$((LATEST + 1))
NEW_VERSION="${BASE_VERSION}-rc.${NEXT}"
echo "Publishing @mysten-incubation/oc-memwal@${NEW_VERSION}"
cd packages/openclaw-memory-memwal
node -e "const p=require('./package.json');p.version='${NEW_VERSION}';require('fs').writeFileSync('./package.json',JSON.stringify(p,null,4)+'\n')"
npm publish --tag rc --provenance --access public

# ── dev branch → prerelease (dev tag, auto-increment) ──
- name: Publish dev prerelease
if: github.ref == 'refs/heads/dev'
run: |
BASE_VERSION=$(node -p "require('./packages/openclaw-memory-memwal/package.json').version")
LATEST=$(npm view @mysten-incubation/oc-memwal versions --json 2>/dev/null \
| node -p "
const versions = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
const nums = (Array.isArray(versions) ? versions : [versions])
.filter(v => v.startsWith('${BASE_VERSION}-dev.'))
.map(v => +v.split('-dev.')[1])
.sort((a,b) => b - a);
nums.length ? nums[0] : -1;
" || echo "-1")
NEXT=$((LATEST + 1))
NEW_VERSION="${BASE_VERSION}-dev.${NEXT}"
echo "Publishing @mysten-incubation/oc-memwal@${NEW_VERSION}"
cd packages/openclaw-memory-memwal
node -e "const p=require('./package.json');p.version='${NEW_VERSION}';require('fs').writeFileSync('./package.json',JSON.stringify(p,null,4)+'\n')"
npm publish --tag dev --provenance --access public
4 changes: 2 additions & 2 deletions docs/openclaw/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ graph TB
LLM_PROC["Language Model\n(Gemini, GPT, Claude)"]
end

subgraph "MemWal Server (TEE)"
subgraph "MemWal Relayer"
SEARCH["Vector Search"]
ANALYZE["Fact Extraction (LLM)"]
STORE["Encrypted Storage"]
Expand Down Expand Up @@ -56,7 +56,7 @@ graph TB
| **Auto-recall hook** | Gateway (Node.js) | Searches MemWal before each turn, injects memories into prompt |
| **Auto-capture hook** | Gateway (Node.js) | Extracts facts after each turn, stores via MemWal |
| **Tool execution** | Gateway (Node.js) | Runs `memory_search` / `memory_store` when the LLM calls them |
| **MemWal Server** | Remote (TEE) | Handles vector search, LLM fact extraction, encrypted storage |
| **MemWal Relayer** | Remote | Handles vector search, LLM fact extraction, encrypted storage |
| **Walrus** | Decentralized | Stores encrypted memory blobs |

## Message Flow
Expand Down
47 changes: 9 additions & 38 deletions docs/openclaw/quick-start.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,24 @@
---
title: "Quick Start"
description: "Install the MemWal memory plugin for OpenClaw and verify it works."
description: "Install the MemWal memory plugin for NemoClaw/OpenClaw and verify it works."
---

Get the plugin running and test the memory loop in a few minutes.

## Prerequisites

- [OpenClaw](https://openclaw.ai) `>=2026.3.11` installed and running
- A package manager — [bun](https://bun.sh), [pnpm](https://pnpm.io), or [npm](https://www.npmjs.com)

You'll also need a **delegate key**, **account ID**, and **relayer URL** from MemWal — the steps below will guide you through getting these.

## Installation

<Steps>
<Step>
### Install dependencies

<Tabs>
<Tab title="bun">
```bash
cd packages/openclaw-memory-memwal
bun install
```
</Tab>
<Tab title="pnpm">
```bash
cd packages/openclaw-memory-memwal
pnpm install
```
</Tab>
<Tab title="npm">
```bash
cd packages/openclaw-memory-memwal
npm install
```
</Tab>
</Tabs>
</Step>

<Step>
### Link into OpenClaw

OpenClaw discovers plugins from `~/.openclaw/extensions/`. Create a symlink:
### Install the plugin

```bash
mkdir -p ~/.openclaw/extensions
ln -s "$(pwd)" ~/.openclaw/extensions/memory-memwal
openclaw plugins install @mysten-incubation/oc-memwal
```
</Step>

Expand Down Expand Up @@ -95,9 +66,9 @@ You'll also need a **delegate key**, **account ID**, and **relayer URL** from Me
```jsonc
{
"plugins": {
"slots": { "memory": "memory-memwal" },
"slots": { "memory": "oc-memwal" },
"entries": {
"memory-memwal": {
"oc-memwal": {
"enabled": true,
"config": {
"privateKey": "${MEMWAL_PRIVATE_KEY}", // References the env var
Expand Down Expand Up @@ -134,8 +105,8 @@ You'll also need a **delegate key**, **account ID**, and **relayer URL** from Me
You should see in the logs:

```
memory-memwal: registered (server: https://..., key: e21d...ed9b, namespace: default)
memory-memwal: connected (status: ok, version: ...)
oc-memwal: registered (server: https://..., key: e21d...ed9b, namespace: default)
oc-memwal: connected (status: ok, version: ...)
```

<Tip>
Expand Down Expand Up @@ -169,7 +140,7 @@ Bot: (responds normally)

Check logs — you should see:
```
memory-memwal: auto-captured 1 facts (agent: main, namespace: default)
oc-memwal: auto-captured 1 facts (agent: main, namespace: default)
```

**2. Recall it** — in a **new conversation**, ask about it:
Expand All @@ -180,7 +151,7 @@ You: What programming languages do I like?

Check logs — you should see:
```
memory-memwal: auto-recall injected 1 memories (agent: main, namespace: default)
oc-memwal: auto-recall injected 1 memories (agent: main, namespace: default)
```

**3. Search from terminal** — confirm the memory exists via CLI:
Expand Down
4 changes: 2 additions & 2 deletions docs/openclaw/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ Full list of config options for `openclaw.json`:

### Plugin not loading

- Check the symlink exists: `ls -la ~/.openclaw/extensions/memory-memwal`
- Check that `openclaw.plugin.json` is in the package root
- Reinstall the plugin: `openclaw plugins install @mysten-incubation/oc-memwal`
- Check that `openclaw.plugin.json` exists in the installed extension
- Restart the gateway after any config changes

### Health check failed
Expand Down
1 change: 1 addition & 0 deletions packages/openclaw-memory-memwal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
19 changes: 7 additions & 12 deletions packages/openclaw-memory-memwal/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 align="center">@mysten-incubation/memory-memwal</h1>
<h1 align="center">@mysten-incubation/oc-memwal</h1>

<p align="center">
Cloud-based long-term memory plugin for NemoClaw/OpenClaw — gives your AI agents persistent, encrypted, cross-session memory powered by <strong>MemWal</strong>.
Expand Down Expand Up @@ -44,9 +44,9 @@ The plugin needs three values:
| **Account ID** | Your MemWalAccount object ID on Sui (`0x...`) |
| **Relayer URL** | The MemWal relayer endpoint that handles search, storage, and encryption |

Get your delegate key and account ID from the [MemWal dashboard](https://memwal.ai), or see the [Quick Start guide](/getting-started/quick-start) for detailed setup.
Get your delegate key and account ID from the [MemWal dashboard](https://memwal.ai), or see the [Quick Start guide](https://docs.memwal.ai/getting-started/quick-start) for detailed setup.

For the relayer, use a managed endpoint or [self-host your own](/relayer/self-hosting):
For the relayer, use a managed endpoint or [self-host your own](https://docs.memwal.ai/relayer/self-hosting):

| Environment | Relayer URL |
|-------------|-------------|
Expand All @@ -55,15 +55,10 @@ For the relayer, use a managed endpoint or [self-host your own](/relayer/self-ho

## Quick Start

### 1. Install and link
### 1. Install

```bash
cd packages/openclaw-memory-memwal
bun install # or: pnpm install / npm install

# Link into OpenClaw's extensions directory
mkdir -p ~/.openclaw/extensions
ln -s "$(pwd)" ~/.openclaw/extensions/memory-memwal
openclaw plugins install @mysten-incubation/oc-memwal
```

### 2. Set your delegate key
Expand All @@ -82,9 +77,9 @@ Add the plugin config to `~/.openclaw/openclaw.json`:
```jsonc
{
"plugins": {
"slots": { "memory": "memory-memwal" },
"slots": { "memory": "oc-memwal" },
"entries": {
"memory-memwal": {
"oc-memwal": {
"enabled": true,
"config": {
"privateKey": "${MEMWAL_PRIVATE_KEY}", // References the env var
Expand Down
4 changes: 2 additions & 2 deletions packages/openclaw-memory-memwal/openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
"label": "Ed25519 Private Key",
"sensitive": true,
"placeholder": "64-character hex string or ${ENV_VAR}",
"help": "Get from app.memwal.com. Supports ${ENV_VAR} syntax."
"help": "Get from memwal.ai. Supports ${ENV_VAR} syntax."
},
"accountId": {
"label": "MemWalAccount ID",
"placeholder": "0x3247e3da...",
"help": "MemWalAccount object ID on Sui. Get from app.memwal.com."
"help": "MemWalAccount object ID on Sui. Get from memwal.ai."
},
"serverUrl": {
"label": "MemWal Server URL",
Expand Down
48 changes: 35 additions & 13 deletions packages/openclaw-memory-memwal/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
{
"name": "@mysten-incubation/memory-memwal",
"version": "0.2.0",
"private": true,
"name": "@mysten-incubation/oc-memwal",
"version": "0.0.1",
"type": "module",
"description": "OpenClaw memory plugin — encrypted, decentralized long-term memory via MemWal + Walrus",
"description": "NemoClaw/OpenClaw memory plugin — encrypted, decentralized long-term memory via MemWal + Walrus",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/MystenLabs/MemWal",
"directory": "packages/openclaw-memory-memwal"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"files": [
"dist",
"openclaw.plugin.json",
"README.md"
],
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
"prepublishOnly": "npm run clean && npm run build"
},
"engines": {
"node": ">=20.0.0"
},
"dependencies": {
"@mysten-incubation/memwal": "^0.0.1",
"@sinclair/typebox": "0.34.48",
"zod": "^4.3.6"
},
"peerDependencies": {
"openclaw": ">=2026.3.11"
"zod": "^3.23.0"
},
"peerDependenciesMeta": {
"openclaw": {
"optional": true
}
"devDependencies": {
"@types/node": "^22.0.0",
"typescript": "^5.7.0"
},
"openclaw": {
"extensions": [
"./src/index.ts"
"./dist/index.js"
]
}
}
22 changes: 22 additions & 0 deletions packages/openclaw-memory-memwal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": ["ES2022"],
"outDir": "dist",
"rootDir": "src",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
Loading