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

@kevinzhow/openclaw-memory-openviking

v0.1.1

Published

OpenViking context database as memory backend for OpenClaw

Readme

OpenClaw Memory Plugin for OpenViking

Use OpenViking as the OpenClaw memory backend, exposing memory_search and memory_get tools.

Current Status

  • Plugin ID: openclaw-memory-openviking
  • npm package: @kevinzhow/openclaw-memory-openviking
  • OpenClaw compatibility: >=2026.2.15
  • Default OpenViking endpoint used in development: http://127.0.0.1:1933

Features

  • Search via OpenViking: POST /api/v1/search/find or POST /api/v1/search/search
  • Read content via OpenViking: GET /api/v1/content/read, GET /api/v1/content/overview
  • Sync local memory files to OpenViking using GET /api/v1/fs/stat + POST /api/v1/resources (with POST /api/v1/fs/mkdir / DELETE /api/v1/fs only when needed)
  • Automatically falls back to local file reads when OpenViking reads fail

Installation

Option 1: npm

npm install @kevinzhow/openclaw-memory-openviking

Option 2: local development

git clone https://github.com/clawd20130/openclaw-memory-openviking.git
cd openclaw-memory-openviking
npm install
npm run build

OpenClaw Configuration

{
  plugins: {
    enabled: true,
    slots: {
      memory: "openclaw-memory-openviking"
    },
    load: {
      // Useful for local development
      paths: ["/path/to/openviking-memory-plugin"]
    },
    entries: {
      "openclaw-memory-openviking": {
        enabled: true,
        config: {
          baseUrl: "http://127.0.0.1:1933",
          apiKey: "optional-api-key",

          // Optional: defaults to viking://resources/openclaw/{agentId}
          uriBase: "viking://resources/openclaw/{agentId}",

          tieredLoading: true,

          sync: {
            interval: "5m",
            onBoot: true,
            extraPaths: ["notes", "docs/memory"],
            waitForProcessing: false,
            waitTimeoutSec: 60
          },

          search: {
            mode: "find", // "find" | "search"
            defaultLimit: 6,
            scoreThreshold: 0,
            targetUri: "viking://resources/openclaw/main/memory-sync"
          }
        }
      }
    }
  }
}

Configuration Reference

Top-level fields

  • baseUrl (required): OpenViking HTTP endpoint.
  • apiKey (optional): API key used for X-API-Key/Authorization when auth is enabled.
  • uriBase (optional): root URI for synced content. Default is viking://resources/openclaw/{agentId}.
  • tieredLoading (default: true): for memory_get without line range, try overview first and fall back to full read.
  • mappings (optional): custom local-path -> OpenViking URI mapping overrides for specific files.

search fields

  • search.mode (default: find):
    • find: stateless retrieval via /api/v1/search/find; best default for stable and low-latency memory lookup.
    • search: session-aware retrieval via /api/v1/search/search; best when you want conversational continuity and session context is available.
  • search.defaultLimit (default: 6): default result count when memory_search.maxResults is not passed.
  • search.scoreThreshold (default: 0, range: 0..1): minimum score to keep a result.
  • search.targetUri (optional): restrict search scope to one URI subtree.

sync fields

  • sync.interval (default: disabled): periodic sync interval, supported format is ^\\d+[smhd]$ (examples: 30s, 5m, 1h, 1d).
  • sync.onBoot (default: true): trigger one sync after plugin startup.
  • sync.extraPaths (optional): extra files/directories to sync. Paths are workspace-relative; directories are scanned recursively for .md.
  • sync.waitForProcessing (default: false): after syncing, wait for OpenViking queue processing to finish.
  • sync.waitTimeoutSec (optional): timeout used by waitForProcessing.

server fields (optional)

If server.enabled is omitted/false, the plugin assumes OpenViking is already running at baseUrl.

  • server.enabled: auto-start and auto-stop OpenViking from this plugin process.
  • server.venvPath (required when server.enabled=true): Python venv root containing openviking.
  • server.dataDir (optional): passed as --data-dir.
  • server.host (default: 127.0.0.1): host for auto-started OpenViking.
  • server.port (default: 1933): port for auto-started OpenViking.
  • server.startupTimeoutMs (default: 30000): startup health-check timeout.
  • server.env (optional): extra environment variables for OpenViking process.

Default Path Mapping

Default root: viking://resources/openclaw/{agentId}/memory-sync

Built-in mappings:

  • MEMORY.md -> .../root/MEMORY
  • SOUL.md -> .../root/SOUL
  • USER.md -> .../root/USER
  • AGENTS.md -> .../root/AGENTS
  • TOOLS.md -> .../root/TOOLS
  • IDENTITY.md -> .../root/IDENTITY
  • BOOTSTRAP.md -> .../root/BOOTSTRAP
  • memory/YYYY-MM-DD.md -> .../memory/{date}
  • skills/*/SKILL.md -> .../skills/{name}/SKILL
  • other files -> .../files/{path}

Validation

Verify OpenViking health:

curl -sS http://127.0.0.1:1933/health

Verify OpenClaw loaded this plugin:

openclaw plugins info openclaw-memory-openviking --json

Expected output includes:

  • "status": "loaded"
  • "toolNames": ["memory_search", "memory_get"]

Development

npm run build
npm test

Test suite includes:

  • tests/client.test.ts
  • tests/mapper.test.ts
  • tests/plugin.test.ts
  • tests/manager.test.ts

Troubleshooting

1) plugin id mismatch

Make sure your slot and entry use the same plugin ID:

  • plugins.slots.memory = "openclaw-memory-openviking"
  • plugins.entries["openclaw-memory-openviking"]

2) baseUrl is required

plugins.entries["openclaw-memory-openviking"].config.baseUrl is missing.

3) connection refused to port 1933

OpenViking is not running, or host/port does not match configuration.

4) plugin path not found: ~/.openclaw/plugins

Ensure each path listed in plugins.load.paths exists on disk, or remove unused paths.

5) memory_get falls back and then says local file not found

If the call context does not provide a valid workspaceDir, local fallback reads from the plugin process working directory. Run in a normal OpenClaw agent/session context, or ensure the target file exists in the current working directory.

License

MIT