Agent skill

Cortexdb Memory Openclaw

by liliang-cn in liliang-cn/cortexdb

Give a Node.js agent (such as OpenClaw) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client npm package.

MITAuto-check passedKnowledge Management

Install Cortexdb Memory Openclaw

skills CLI
$ npx skills add liliang-cn/cortexdb --skill cortexdb-memory-openclaw -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install liliang-cn/cortexdb cortexdb-memory-openclaw --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/liliang-cn/cortexdb.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cortexdb-memory-openclaw .claude/skills/cortexdb-memory-openclaw && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cortexdb-memory-openclaw
GitHub stars
274
Token cost
~1.6k tokens
SKILL.md length
479 words
Files
2 (incl. scripts)
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Give a Node.js agent (such as OpenClaw) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client npm package.

  • Works in 5 steps: Run the sidecar (once) → Install the client → The two core moves: remember + recall → …
  • A Node agent needs to remember facts about a user across turns/sessions
  • SKILL.md covers When to use this, Step 1 — Run the sidecar (once), Step 2 — Install the client and Step 3 — The two core moves:…, plus 6 more sections
  • Runs JavaScript scripts from its folder; calls go and npm; needs CORTEXDB_GRPC_TOKEN

What it does

Cortexdb Memory Openclaw is an agent skill from liliang-cn/cortexdb. Give a Node.js agent (such as OpenClaw) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client npm package. Use when a Node agent needs to remember facts about a user across turns/sessions, recall them by meaning, store entities and relations, or answer multi-hop questions — and when the user mentions CortexDB, agent memory, long-term memory, RAG, knowledge graph, OpenClaw, or "remember this".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/memory-tools.js`). Compatibility notes: Requires Node.js 18+, npm, and the cortexdb-grpc sidecar binary (Go install or prebuilt release). Optional embeddings via any OpenAI-compatible endpoint (e.g…

It sits in Knowledge Management, covering Agent memory, Knowledge graphs and gRPC and Protobuf. It works with gRPC, Node.js, npm and SQLite. The repository describes itself as: AI memory and a knowledge graph in one SQLite file. Pure Go: vectors, RAG, agent memory, RDF/SPARQL, Cypher, 80+ MCP tools. Works without an embedding model. The licence is MIT.

When your agent uses it

  • A Node agent needs to remember facts about a user across turns/sessions
  • Recall them by meaning
  • Store entities and relations
  • Answer multi-hop questions — and when the user mentions CortexDB

Example prompts

  • “remember this”
  • “/cortexdb-memory-openclaw”

Requirements

  • Node.js
  • A credential in CORTEXDB_GRPC_TOKEN
  • Compatibility (from SKILL.md): Requires Node.js 18+, npm, and the cortexdb-grpc sidecar binary (Go install or prebuilt release). Optional embeddings via any OpenAI-compatible endpoint (e.g. Ollama).

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Run the sidecar (once)
  2. Install the client
  3. The two core moves: remember + recall
  4. Knowledge instead of plain memory (RAG)
  5. The differentiator: a knowledge graph

What it can do on your machine

Read from SKILL.md and the folder at commit 17f8a4f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • go
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • npmjs.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • CORTEXDB_GRPC_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Node.js 18+, npm, and the cortexdb-grpc sidecar binary (Go install or prebuilt release). Optional embeddings via any OpenAI-compatible endpoint (e.g. Ollama).

    From compatibility in the SKILL.md frontmatter.

Context cost

Cortexdb Memory Openclaw loads about 1.6k tokens when it runs. Until then it costs about 126 tokens; SKILL.md has 479 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~126
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from liliang-cn/cortexdb at commit 17f8a4f, republished under its MIT licence (© liliang-cn). 479 words, ~1,645 tokens.

Download SKILL.mdSave it as .claude/skills/cortexdb-memory-openclaw/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
cortexdb-memory-openclaw
description
Give a Node.js agent (such as OpenClaw) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client npm package. Use when a Node agent needs to remember facts about a user across turns/sessions, recall them by meaning, store entities and relations, or answer multi-hop questions — and when the user mentions CortexDB, agent memory, long-term memory, RAG, knowledge graph, OpenClaw, or "remember this".
compatibility
Requires Node.js 18+, npm, and the cortexdb-grpc sidecar binary (Go install or prebuilt release). Optional embeddings via any OpenAI-compatible endpoint (e.g. Ollama).
license
MIT
metadata.author
liliang-cn
metadata.project
cortexdb
metadata.version
1.0

CortexDB memory for a Node agent (OpenClaw)

Wire CortexDB in as the memory layer for a Node.js agent. CortexDB is a pure-Go, single-file database; the Node agent talks to it over gRPC via the cortexdb-client package. Beyond vector/lexical recall, it gives the agent a real knowledge graph (RDF + SPARQL) — the thing most agent-memory layers lack. It fits OpenClaw's local-first philosophy: one binary, one SQLite file, no separate service to stand up.

When to use this

  • The agent should remember user facts/preferences across turns or sessions.
  • The agent should recall memories by meaning, not exact match.
  • The agent needs entities + relations and multi-hop questions ("who, among the people Alice knows, works on X").
  • You're integrating with OpenClaw (or any Node agent/skill).

Step 1 — Run the sidecar (once)

bash
# install the binary (or download a prebuilt release)
go install github.com/liliang-cn/cortexdb/v2/cmd/cortexdb-grpc@latest

# lexical mode — zero config, no API key:
CORTEXDB_PATH=agent.db CORTEXDB_GRPC_TOKEN=s3cret cortexdb-grpc
# → listening on 127.0.0.1:47821

Enable vector/semantic recall by pointing it at any OpenAI-compatible embeddings endpoint (e.g. a local Ollama):

bash
OPENAI_BASE_URL=http://localhost:11434/v1 \
CORTEXDB_EMBED_MODEL=embeddinggemma CORTEXDB_EMBED_DIM=768 \
CORTEXDB_PATH=agent.db CORTEXDB_GRPC_TOKEN=s3cret cortexdb-grpc

Step 2 — Install the client

bash
npm install cortexdb-client

Step 3 — The two core moves: remember + recall

js
const { CortexClient } = require('cortexdb-client');

const client = CortexClient.connect('127.0.0.1:47821', { token: 's3cret' });

// remember a fact about the user (scoped per user)
await client.memory.SaveMemory({
  memoryId: 'pref-coffee', userId: 'alice', scope: 'user',
  content: 'Alice prefers dark roast coffee and runs OpenClaw locally.',
});

// later turn / next session: recall by meaning
const hits = await client.memory.SearchMemory({
  query: 'what does the user like to drink?',
  userId: 'alice', scope: 'user', topK: 3,
});
for (const h of hits.results) console.log(h.memory.content, h.score);

Every RPC is a promise; request fields are camelCase. Memory scopes isolate data: scope: 'user' (per userId), scope: 'session' (per sessionId), or scope: 'global'.

Step 4 — Knowledge instead of plain memory (RAG)

js
await client.knowledge.SaveKnowledge({
  knowledgeId: 'doc-1', title: 'Project brief',
  content: 'The user is building an autonomous agent in TypeScript.',
});
const res = await client.knowledge.SearchKnowledge({
  query: 'what is the user building?', topK: 3,
});

Step 5 — The differentiator: a knowledge graph

js
const iri = (v) => ({ kind: 'iri', value: v });
await client.graph.UpsertNamespace({ prefix: 'ex', uri: 'https://example.com/' });
await client.graph.UpsertKnowledgeGraph({ triples: [
  { subject: iri('ex:alice'), predicate: iri('ex:knows'), object: iri('ex:bob') },
] });
const ans = await client.graph.QuerySparql({
  query: 'SELECT ?o WHERE { <https://example.com/alice> <https://example.com/knows> ?o . }',
});
console.log(ans.result.count, 'result(s)');

Expose CortexDB as OpenClaw tools

OpenClaw skills teach the agent how and when to call tools. A ready-to-use helper module wraps the calls above into remember, recall, saveKnowledge, searchKnowledge, relate, and askGraph. recallContext uses the unified KnowledgeMemory facade to fuse scoped memory, durable knowledge, and graph facts:

  • scripts/memory-tools.js — import these and register them as OpenClaw tools, or call them directly from a custom skill/plugin.

For automatic OpenClaw memory lifecycle integration, install the native plugin at plugins/openclaw-cortexdb-memory and select cortexdb-memory in plugins.slots.memory. The native plugin replaces OpenClaw's built-in memory-core slot; this skill alone does not.

In your skill's instructions, tell the agent: to remember a durable fact about the user, call remember(text); to recall, call recall(query); to record a relationship, call relate(subject, predicate, object); to answer a structured "who/what is related to X" question, call askGraph(sparql).

Show full SKILL.md (151 more words)Show less

Install this skill into OpenClaw

OpenClaw follows the agentskills.io spec and discovers skills under <workspace>/skills, <workspace>/.agents/skills, ~/.agents/skills, and ~/.openclaw/skills.

bash
# from this repo (local directory):
openclaw skills install ./skills/cortexdb-memory-openclaw --as cortexdb-memory

# or from git / ClawHub:
openclaw skills install git:liliang-cn/cortexdb@main --global

--global installs to ~/.openclaw/skills. The skill becomes eligible automatically once the cortexdb-grpc binary is present and a sidecar is running.

Sub-clients (full surface)

client.knowledge, client.memory, client.graph (RDF/SPARQL/SHACL/inference/ ontology), client.graphrag, client.tools (generic dispatch, same shape as MCP), client.admin. Each RPC is available in both PascalCase (SaveMemory) and camelCase (saveMemory). Auth is a bearer token; pass { token } to connect.

Notes & gotchas

  • Zero-key default: without an embedder the sidecar uses lexical retrieval — good enough to start, no credentials needed.
  • One file, one process: the sidecar owns one SQLite file. Isolate multiple users via memory scopes (above), not multiple files.
  • Plaintext localhost: the bearer token rides plain gRPC; fine on localhost, add TLS / a reverse proxy for cross-machine use.
  • No build step: the npm client loads the proto contract at runtime.
  • Package and docs: https://www.npmjs.com/package/cortexdb-client · https://github.com/liliang-cn/cortexdb

© liliang-cn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in skills/cortexdb-memory-openclaw of liliang-cn/cortexdb.

  • SKILL.md
  • scripts/memory-tools.js

Open the folder on GitHubat commit 17f8a4f

Compare with similar skills

Cortexdb Memory Openclaw next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cortexdb Memory Openclaw compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cortexdb Memory Openclaw this skillliliang-cn/cortexdb274—~1.6kAutomated safety check: PassMIT
Compileapache/skywalking-nodejs180—~1.3kAutomated safety check: PassApache-2.0
Neo4j Graphrag Skillneo4j-contrib/neo4j-skills114—~4.2kAutomated safety check: NotesMIT
Cognee Session Memory and Improvetopoteretes/cognee32k—~3.2kAutomated safety check: PassApache-2.0
Bailian Knowledge Base Managermodelstudioai/cli542—~1.5kAutomated safety check: PassApache-2.0
Cognee Memory Recalltopoteretes/cognee32k—~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • Compile

    apache/skywalking-nodejs

    Compile / build / type-check the skywalking-nodejs agent. An agent skill from apache/skywalking-nodejs.

    180 GitHub stars~1.3k tokensUpdated 23 days ago
    Backend & APIsAuto-check passed
  • Neo4j Graphrag Skill

    neo4j-contrib/neo4j-skills

    Build GraphRAG retrieval pipelines on Neo4j using the neo4j-graphrag Python package (v1.22.0+).

    114 GitHub stars~4.2k tokensUpdated 2 days ago
    Knowledge ManagementAuto-check: notes
  • Explains how cognee stores session memory by session_id and bridges it into the permanent graph with improve(), including the stages, results and settings.

    32k GitHub stars~3.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Manages Alibaba Cloud Bailian knowledge bases with the bl command line: create bases, upload documents, deploy search services, fix chunks and handle data center files.

    542 GitHub stars~1.5k tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Cognee Memory Recall

    topoteretes/cognee

    Explains how to query cognee agent memory with recall(): how the search type is chosen, how to narrow a query to datasets, and what the returned results contain.

    32k GitHub stars~2.6k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Memory

    automateyournetwork/netclaw

    NetClaw's native persistent memory (spec 033) — structured facts with temporal validity, semantic search across past sessions, decision logging, and entity relationships, backed by SQLite + ChromaDB…

    675 GitHub stars~1.2k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed

More from liliang-cn/cortexdb

  • Cortexdb Memory Hermes

    liliang-cn/cortexdb

    Give a Python agent (such as Hermes Agent by Nous Research) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client…

    274 GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check passed
  • Cortexdb

    liliang-cn/cortexdb

    Use CortexDB for local-first AI memory, vector search, RAG, knowledge graphs, SPARQL/RDFS/SHACL, corpus-to-graph workflows, external structured-data import (CSV / SQL dumps), and MCP/tool calling.

    274 GitHub stars~18k tokensUpdated 2 days ago
    Auto-check: warnings
  • Cortexdb

    liliang-cn/cortexdb

    Use CortexDB for local-first AI memory, vector search, RAG, knowledge graphs, SPARQL/RDFS/SHACL, corpus-to-graph workflows, and MCP/tool calling.

    274 GitHub stars~5.7k tokensUpdated 2 days ago
    Auto-check: warnings

Questions about Cortexdb Memory Openclaw

What does Cortexdb Memory Openclaw do?

Give a Node.js agent (such as OpenClaw) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client npm package. Cortexdb Memory Openclaw is an agent skill from liliang-cn/cortexdb.js agent (such as OpenClaw) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client npm package.

When should I use Cortexdb Memory Openclaw?

Cortexdb Memory Openclaw fits situations like: A Node agent needs to remember facts about a user across turns/sessions; recall them by meaning; store entities and relations; answer multi-hop questions — and when the user mentions CortexDB.

How do I install Cortexdb Memory Openclaw in Claude Code?

Run `npx skills add liliang-cn/cortexdb --skill cortexdb-memory-openclaw -a claude-code`. Or copy the skill folder (skills/cortexdb-memory-openclaw in liliang-cn/cortexdb) into .claude/skills/cortexdb-memory-openclaw in your project. Claude Code loads it when a task matches its description.

How do I install Cortexdb Memory Openclaw in Codex?

Run `npx skills add liliang-cn/cortexdb --skill cortexdb-memory-openclaw -a codex`. Or copy the skill folder (skills/cortexdb-memory-openclaw in liliang-cn/cortexdb) into .agents/skills/cortexdb-memory-openclaw in your project. Codex loads it when a task matches its description.

Can I use Cortexdb Memory Openclaw in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add liliang-cn/cortexdb --skill cortexdb-memory-openclaw -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cortexdb-memory-openclaw, .gemini/skills/cortexdb-memory-openclaw, .github/skills/cortexdb-memory-openclaw and .opencode/skills/cortexdb-memory-openclaw in your project.

What does Cortexdb Memory Openclaw need to run?

Going by SKILL.md and its folder, Cortexdb Memory Openclaw needs JavaScript for the scripts in its folder, the command-line tools its instructions call (go and npm) and credentials named CORTEXDB_GRPC_TOKEN. Our summary lists: Node.js; A credential in CORTEXDB_GRPC_TOKEN. Compatibility (from SKILL.md): Requires Node.js 18+, npm, and the cortexdb-grpc sidecar binary (Go install or prebuilt release). Optional embeddings via any OpenAI-compatible endpoint (e.g. Ollama)..

Does Cortexdb Memory Openclaw access the network?

SKILL.md names 1 domain. As links in the text: npmjs.com. This is read from the text; nothing was executed.

Is Cortexdb Memory Openclaw safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Cortexdb Memory Openclaw use?

Cortexdb Memory Openclaw is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cortexdb Memory Openclaw use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cortexdb Memory Openclaw?

Skills that share tags, products or a category with Cortexdb Memory Openclaw: Compile (apache/skywalking-nodejs, 180 stars), Neo4j Graphrag Skill (neo4j-contrib/neo4j-skills, 114 stars), Cognee Session Memory and Improve (topoteretes/cognee, 32k stars) and Bailian Knowledge Base Manager (modelstudioai/cli, 542 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cortexdb Memory Openclaw?

liliang-cn (a GitHub user) maintains it in liliang-cn/cortexdb, which has 274 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 7, 2026.

Source: liliang-cn/cortexdb on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.