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

@usecortex_ai/openclaw-cortex-ai

v0.1.3

Published

OpenClaw plugin for Cortex AI — the State-of-the-art agentic memory system with auto-capture, recall, and knowledge graph context for open-claw

Readme

Cortex AI — OpenClaw Plugin

State-of-the-art agentic memory for OpenClaw powered by Cortex AI. Automatically captures conversations, recalls relevant context with knowledge-graph connections, and injects them before every AI turn.

Install

openclaw plugins install @usecortex_ai/openclaw-cortex-ai

Restart OpenClaw after installing.

If you run OpenClaw via the local gateway, restart it too:

openclaw gateway restart

Interactive Onboarding

Run the interactive CLI wizard (recommended):

# Basic onboarding (API key, tenant ID, sub-tenant, ignore term)
openclaw cortex onboard

# Advanced onboarding (all options including recall mode, graph context, etc.)
openclaw cortex onboard --advanced

The wizard guides you through configuration with colored prompts and writes your config to plugins.entries.openclaw-cortex-ai.config inside OpenClaw's settings file.

The path is resolved in the same order OpenClaw itself uses:

  1. $OPENCLAW_CONFIG_PATH — if set, used directly
  2. $OPENCLAW_STATE_DIR/openclaw.json — if OPENCLAW_STATE_DIR is set
  3. $OPENCLAW_HOME/.openclaw/openclaw.json — if OPENCLAW_HOME is set
  4. Default: ~/.openclaw/openclaw.json (macOS/Linux) or %USERPROFILE%\.openclaw\openclaw.json (Windows)

No manual adjustment needed — the wizard auto-detects the correct path.

After onboarding, restart the gateway:

openclaw gateway restart

Manual Configuration

If you prefer, you can configure credentials manually.

Two required values:

  • API key
  • Tenant ID

Environment variables (recommended for secrets):

export CORTEX_OPENCLAW_API_KEY="your-api-key"
export CORTEX_OPENCLAW_TENANT_ID="your-tenant-id"

Or configure directly in OpenClaw's settings file:

  • macOS / Linux: ~/.openclaw/openclaw.json
  • Windows: %USERPROFILE%\.openclaw\openclaw.json
{
  "plugins": {
    "entries": {
      "openclaw-cortex-ai": {
        "enabled": true,
        "config": {
          "apiKey": "${CORTEX_OPENCLAW_API_KEY}",
          "tenantId": "${CORTEX_OPENCLAW_TENANT_ID}"
        }
      }
    }
  }
}

After changing config, restart the gateway so the plugin reloads:

openclaw gateway restart

Options

| Key | Type | Default | Description | | -------------------- | ----------- | --------------------- | ------------------------------------------------------------------------------ | | subTenantId | string | "cortex-openclaw-plugin" | Sub-tenant for data partitioning within your tenant | | autoRecall | boolean | true | Inject relevant memories before every AI turn | | autoCapture | boolean | true | Store conversation exchanges after every AI turn | | maxRecallResults | number | 10 | Max memory chunks injected into context per turn | | recallMode | string | "fast" | "fast" or "thinking" (deeper personalised recall with graph traversal) | | graphContext | boolean | true | Include knowledge graph relations in recalled context | | ignoreTerm | string | "cortex-ignore" | Messages containing this term are excluded from recall & capture | | debug | boolean | false | Verbose debug logs |

How It Works

  • Auto-Recall — Before every AI turn, queries Cortex (/recall/recall_preferences) for relevant memories and injects graph-enriched context (entity paths, chunk relations, extra context).
  • Auto-Capture — After every AI turn, the last user/assistant exchange is sent to Cortex (/memories/add_memory) as conversation pairs with infer: true and upsert: true. The session ID is used as source_id so Cortex groups exchanges per session and builds a knowledge graph automatically.

Slash Commands

| Command | Description | | --------------------------- | ------------------------------------- | | /cortex-onboard | Show current configuration status | | /cortex-remember <text> | Save something to Cortex memory | | /cortex-recall <query> | Search memories with relevance scores | | /cortex-list | List all stored user memories | | /cortex-delete <id> | Delete a specific memory by its ID | | /cortex-get <source_id> | Fetch the full content of a source |

AI Tools

| Tool | Description | | ---------------------- | ----------- | | cortex_store | Save the recent conversation history to Cortex as memory | | cortex_search | Search Cortex memories (returns graph-enriched context) | | cortex_list_memories | List all stored user memories (IDs + summaries) | | cortex_get_content | Fetch full content for a specific source_id | | cortex_delete_memory | Delete a memory by memory_id (use only when user explicitly asks) |

CLI

openclaw cortex onboard             # Interactive onboarding wizard
openclaw cortex onboard --advanced  # Advanced onboarding wizard
openclaw cortex search <query>      # Search memories
openclaw cortex list                # List all user memories
openclaw cortex delete <id>         # Delete a memory
openclaw cortex get <source_id>     # Fetch source content
openclaw cortex status              # Show plugin configuration

Troubleshooting

Not configured. Run openclaw cortex onboard

This means the plugin is enabled, but credentials are missing.

Run:

openclaw cortex onboard
openclaw gateway restart

CLI says a command is unknown

Update/restart the gateway so it reloads the plugin:

openclaw gateway restart

Context Injection

Recalled context is injected inside <cortex-context> tags containing:

  • Entity Paths — Knowledge graph paths connecting entities relevant to the query
  • Context Chunks — Retrieved memory chunks with source titles, graph relations, and linked extra context