Agent skill

Cortexdb Memory Hermes

by liliang-cn in 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…

MITAuto-check passedKnowledge Management

Install Cortexdb Memory Hermes

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

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

GitHub CLI
$ gh skill install liliang-cn/cortexdb cortexdb-memory-hermes --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-hermes .claude/skills/cortexdb-memory-hermes && 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-hermes
GitHub stars
274
Token cost
~1.7k 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 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…

  • Works in 5 steps: Run the sidecar (once) → Install the client → The two core moves: remember + recall → …
  • A Python 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 Python scripts from its folder; calls go and pip; needs CORTEXDB_GRPC_TOKEN

What it does

Cortexdb Memory Hermes is an agent skill from 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 PyPI package. Use when a Python 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, Hermes, or "remember this".

Its SKILL.md is about 1.7k 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.py`). Compatibility notes: Requires Python 3.9+, pip, 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 Python, gRPC 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 Python 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-hermes”

Requirements

  • Python 3
  • A credential in CORTEXDB_GRPC_TOKEN
  • Compatibility (from SKILL.md): Requires Python 3.9+, pip, 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/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • go
    • pip

    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):

    • pypi.org

    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 Python 3.9+, pip, 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 Hermes loads about 1.7k tokens when it runs. Until then it costs about 131 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
~131
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

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,720 tokens.

Download SKILL.mdSave it as .claude/skills/cortexdb-memory-hermes/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
cortexdb-memory-hermes
description
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 PyPI package. Use when a Python 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, Hermes, or "remember this".
compatibility
Requires Python 3.9+, pip, 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 Python agent (Hermes)

Wire CortexDB in as the memory layer for a Python agent. CortexDB is a pure-Go, single-file database; the Python 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.

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 Hermes Agent (or any Python agent/framework).

Step 1 — Run the sidecar (once)

CortexDB runs as a local sidecar process, owning one SQLite file.

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

To enable vector/semantic recall, point 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
pip install cortexdb-client          # or: uv add cortexdb-client

Step 3 — The two core moves: remember + recall

python
from cortexdb_client import CortexClient, proto

client = CortexClient.connect("127.0.0.1:47821", token="s3cret")

# remember a fact about the user (scoped per user)
client.memory.SaveMemory(proto.SaveMemoryRequest(
    memory_id="pref-coffee",
    user_id="alice", scope="user",
    content="Alice prefers dark roast coffee and dislikes heavy frameworks.",
))

# later turn / next session: recall by meaning
hits = client.memory.SearchMemory(proto.SearchMemoryRequest(
    query="what does the user like to drink?",
    user_id="alice", scope="user", top_k=3,
))
for h in hits.results:
    print(h.memory.content, h.score)

Memory scopes isolate data: scope="user" (per user_id), scope="session" (per session_id), or scope="global". Use user for durable preferences and session for short-lived conversation state.

Step 4 — Knowledge instead of plain memory (RAG)

For documents the agent should retrieve from (not just per-user notes), use the knowledge service — it chunks, indexes, and (with an embedder) does GraphRAG:

python
client.knowledge.SaveKnowledge(proto.SaveKnowledgeRequest(
    knowledge_id="doc-1",
    title="Project brief",
    content="The user is building an autonomous research agent in Python.",
))
res = client.knowledge.SearchKnowledge(proto.SearchKnowledgeRequest(
    query="what is the user building?", top_k=3,
))

Step 5 — The differentiator: a knowledge graph

Store entities and relations, then traverse them with SPARQL. This is what makes CortexDB more than a vector store for an agent.

python
iri = lambda v: proto.RdfTerm(kind="iri", value=v)
client.graph.UpsertNamespace(proto.UpsertNamespaceRequest(
    prefix="ex", uri="https://example.com/"))
client.graph.UpsertKnowledgeGraph(proto.UpsertKnowledgeGraphRequest(triples=[
    proto.RdfTriple(subject=iri("ex:alice"), predicate=iri("ex:knows"), object=iri("ex:bob")),
]))
ans = client.graph.QuerySparql(proto.QuerySparqlRequest(
    query="SELECT ?o WHERE { <https://example.com/alice> <https://example.com/knows> ?o . }"))
print(ans.result.count, "result(s)")

Expose CortexDB as Hermes tools

Hermes runs Python and dispatches tools/subagents. Wrap the calls above as small tool functions the agent can call — remember(text), recall(query), relate(from, rel, to), ask_graph(sparql). Each is a 3-line wrapper over the client. A ready-to-import module is provided:

  • scripts/memory_tools.py — remember, recall, save_knowledge, search_knowledge, relate, ask_graph, plus unified recall_context and remember_context, returning plain dicts/strings that drop straight into a tool-calling loop.

For automatic pre-turn recall and completed-turn synchronization, install the native Hermes MemoryProvider at plugins/hermes-cortexdb-memory and set memory.provider: cortexdb. A skill or MCP server exposes tools but does not by itself participate in Hermes' native memory lifecycle.

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

Install this skill into Hermes

Hermes adopts the agentskills.io standard; skills live under ~/.hermes/skills/ and activate as /skill-name.

bash
# from a URL to this SKILL.md, or a local checkout:
hermes skills install https://raw.githubusercontent.com/liliang-cn/cortexdb/main/skills/cortexdb-memory-hermes/SKILL.md --name cortexdb-memory-hermes

# or point Hermes at a directory of skills via ~/.hermes/config.yaml:
#   skills:
#     external_dirs:
#       - /path/to/cortexdb/skills

Then in a Hermes session: /cortexdb-memory-hermes. Hermes also speaks MCP — if you prefer, run cortexdb-mcp-stdio and connect it as an MCP server instead of (or alongside) this skill.

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. Every RPC takes a proto.<Name>Request and returns the response message. 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.
  • Package and docs: https://pypi.org/project/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-hermes of liliang-cn/cortexdb.

  • SKILL.md
  • scripts/memory_tools.py

Open the folder on GitHubat commit 17f8a4f

Compare with similar skills

Cortexdb Memory Hermes 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 Hermes compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cortexdb Memory Hermes this skillliliang-cn/cortexdb274—~1.7kAutomated safety check: PassMIT
Neo4j Graphrag Skillneo4j-contrib/neo4j-skills114—~4.2kAutomated safety check: NotesMIT
Cognee Session Memory and Improvetopoteretes/cognee32k—~3.2kAutomated safety check: PassApache-2.0
Cognee Memory Recalltopoteretes/cognee32k—~2.6kAutomated safety check: PassApache-2.0
Install and Run Cogneetopoteretes/cognee32k1 repos~1kAutomated safety check: NotesApache-2.0
Cognee Custom Graph Modelstopoteretes/cognee32k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • 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
  • 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
  • Install and Run Cognee

    topoteretes/cognee

    Installs the cognee AI memory library in a Python environment, sets the LLM key and gets a first remember and recall script running with the Python SDK.

    32k GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check: notes
  • Cognee Custom Graph Models

    topoteretes/cognee

    Defines the shape of cognee's knowledge graph with graph_model: DataPoint node classes, identity and index fields, typed edges and fixes for duplicated nodes.

    32k GitHub stars~2.5k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Cognee Custom Pipelines

    topoteretes/cognee

    Shows how to write custom cognee tasks, chain them into pipelines, store custom DataPoints and run enrichment over the existing graph.

    32k GitHub stars~2.8k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from liliang-cn/cortexdb

  • Cortexdb Memory Openclaw

    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.

    274 GitHub stars~1.6k 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 Hermes

What does Cortexdb Memory Hermes do?

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…. Cortexdb Memory Hermes is an agent skill from 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 PyPI package.

When should I use Cortexdb Memory Hermes?

Cortexdb Memory Hermes fits situations like: A Python 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 Hermes in Claude Code?

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

How do I install Cortexdb Memory Hermes in Codex?

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

Can I use Cortexdb Memory Hermes 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-hermes -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-hermes, .gemini/skills/cortexdb-memory-hermes, .github/skills/cortexdb-memory-hermes and .opencode/skills/cortexdb-memory-hermes in your project.

What does Cortexdb Memory Hermes need to run?

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

Does Cortexdb Memory Hermes access the network?

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

Is Cortexdb Memory Hermes 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 Hermes use?

Cortexdb Memory Hermes 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 Hermes use?

About 1.7k tokens (SKILL.md is roughly 6.9k 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 Hermes?

Skills that share tags, products or a category with Cortexdb Memory Hermes: Neo4j Graphrag Skill (neo4j-contrib/neo4j-skills, 114 stars), Cognee Session Memory and Improve (topoteretes/cognee, 32k stars), Cognee Memory Recall (topoteretes/cognee, 32k stars) and Install and Run Cognee (topoteretes/cognee, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cortexdb Memory Hermes?

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.