← Back to Skills Marketplace
bowen31337

ClawMemory

by bowen31337 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
104
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install alex-clawmemory
Description
Sovereign agent memory engine — self-hosted, privacy-first SQLite store with LLM-based fact extraction (GLM-4.7), hybrid BM25+vector search, contradiction re...
README (SKILL.md)

ClawMemory Skill

Sovereign agent memory engine — self-hosted, privacy-first. All data stays local (SQLite) with optional Turso cloud sync.

Repo: https://github.com/clawinfra/clawmemory
Server port: localhost:7437
Last verified: 2026-03-28


✅ VERIFIED WORKING PATTERNS (copy-paste ready)

Start the server

cd /tmp/clawmemory && ./clawmemory serve --config config.json
# OR with defaults (SQLite at ./clawmemory.db, port 7437, Ollama at localhost:11434)
./clawmemory serve

Guard rules:

  • Ollama must be running for vector search — if not, BM25-only mode activates automatically (no crash)
  • Server binds localhost:7437 by default — not exposed externally
  • First run auto-runs migrations (safe to restart)

Store a fact manually

curl -s -X POST http://localhost:7437/facts \
  -H "Content-Type: application/json" \
  -d '{"text": "User prefers Python over Go for scripting", "category": "preference", "importance": 0.8}'

Search memory

# Hybrid BM25 + vector (best quality)
curl -s "http://localhost:7437/search?q=python+preference&limit=5" | python3 -m json.tool

# BM25-only (fast, no Ollama needed)
curl -s "http://localhost:7437/search?q=python+preference&limit=5&mode=bm25" | python3 -m json.tool

Extract facts from a conversation turn (auto-capture)

curl -s -X POST http://localhost:7437/extract \
  -H "Content-Type: application/json" \
  -d '{
    "turns": [
      {"role": "user", "content": "I always deploy to Hetzner, never AWS."},
      {"role": "assistant", "content": "Got it, using Hetzner for deployments."}
    ]
  }' | python3 -m json.tool

Get user profile

curl -s http://localhost:7437/profile | python3 -m json.tool

Forget a fact

curl -s -X DELETE http://localhost:7437/facts/\x3Cfact-id>

OpenClaw Plugin (TypeScript) — Auto-wire

The plugin at plugin/ auto-injects memory pre-turn and auto-captures post-turn.

cd /tmp/clawmemory/plugin && npm install && npm run build
# Copy plugin/dist/ to OpenClaw plugins dir and enable in config

Plugin config in openclaw.config.json:

{
  "plugins": [
    {
      "id": "clawmemory",
      "path": "./plugins/clawmemory/dist/index.js",
      "config": {
        "serverUrl": "http://localhost:7437",
        "maxContextFacts": 10,
        "minImportance": 0.3
      }
    }
  ]
}

What it does automatically:

  • Pre-turn: searches memory for relevant facts → injects as [Memory context] block into system prompt
  • Post-turn: sends conversation turn to /extract → stores new facts

Config Reference (config.json)

{
  "server": { "host": "localhost", "port": 7437 },
  "store": {
    "sqlitePath": "./clawmemory.db",
    "tursoUrl": "",
    "tursoToken": ""
  },
  "extractor": {
    "endpoint": "http://localhost:8080/v1",
    "model": "glm-4.7",
    "apiKey": "placeholder"
  },
  "embed": {
    "ollamaUrl": "http://localhost:11434",
    "model": "qwen2.5:7b"
  },
  "decay": {
    "halfLifeDays": 30,
    "minImportance": 0.1,
    "intervalMinutes": 60
  }
}

Key tunables:

  • extractor.endpoint → point at any OpenAI-compatible endpoint (GLM-4.7, local Ollama, Anthropic proxy)
  • embed.modelmxbai-embed-large gives better separability than qwen2.5:7b for security classification tasks
  • decay.halfLifeDays → reduce to 7 for short-lived contexts (task sessions), increase to 90 for long-term persona facts

❌ KNOWN BROKEN / DO NOT USE

  • Turso sync with empty token — set tursoUrl: "" to disable; non-empty URL with empty token causes silent write failures
  • Ollama llama3.2-vision for embeddings — wrong dimensionality, breaks vector search index; use qwen2.5:7b or mxbai-embed-large
  • Multi-statement SQL migrationsgo-libsql can't handle them; each migration must be a single statement

Build from source

git clone https://github.com/clawinfra/clawmemory /tmp/clawmemory
cd /tmp/clawmemory
go build ./...  # produces ./clawmemory binary
go test ./... -timeout 120s  # all tests should pass

CI status: main branch — golangci-lint v2 requires action@v7 (fixed 2026-03-28, commit 877384b)


API Reference (quick)

Method Path Body / Params Description
POST /facts {text, category, importance} Store a fact directly
POST /extract {turns: [{role,content}]} LLM-extract + store facts from conversation
GET /search `?q=\x3Cquery>&limit=N&mode=bm25 hybrid`
GET /profile Get synthesized user profile
DELETE /facts/:id Soft-delete a fact (sets importance=0)
POST /forget {query} Find + soft-delete facts matching query

Categories: person, preference, fact, skill, relationship, event, goal


Integration with OpenClaw workspace

ClawMemory replaces manual memory/YYYY-MM-DD.md writes for structured facts. Daily notes remain the primary context store for narrative/decisions; ClawMemory handles queryable structured facts (preferences, skills, relationships).

When to use ClawMemory vs daily notes:

  • Daily notes: decisions, decisions-with-context, URLs shared, task state → still use these
  • ClawMemory: User prefers X, User's email is Y, Project Z uses Go → queryable atomic facts
Usage Guidance
What to check before installing: - Inspect the GitHub repository (https://github.com/clawinfra/clawmemory) before git-cloning and building; the SKILL.md instructs you to build/run code from that repo. - Expect to need tools not listed in the registry metadata: git, Go toolchain (go build), Node/npm (plugin), curl, python3 (examples), and optionally Ollama for embeddings. Ensure those binaries are available and trusted. - Be aware the plugin auto-captures conversation turns (post-turn) and injects memory into the system prompt (pre-turn). If you enable the plugin, it will persist user/assistant content into the local SQLite store by default. - If you enable Turso sync or point extractor.endpoint at a remote LLM service, conversation content and extracted facts may be transmitted off-host. Only supply API keys/tokens (extractor.apiKey, tursoToken) for endpoints you trust; the skill metadata does not declare these secrets but the config supports them. - If you want strict local-only operation: keep tursoUrl empty, run a local extractor/embedding service (Ollama or other on localhost), and verify server is bound to localhost (port 7437) and not exposed externally. - Prefer running builds and the server in an isolated environment (container or dedicated VM) until you've vetted the code and behavior. Given the coherent purpose but the metadata/instruction discrepancies and the potential for inadvertent data sync, proceed only after code and config review.
Capability Analysis
Type: OpenClaw Skill Name: alex-clawmemory Version: 1.0.0 The clawmemory skill describes a memory engine that requires cloning a remote repository (github.com/clawinfra/clawmemory), building a Go binary, and running a local server. It involves high-risk behaviors such as shell execution, local file system access for SQLite, and network communication with external LLM providers and Turso cloud databases. While these capabilities are plausibly required for its stated purpose of providing persistent agent memory, the requirement to execute unverified remote code and the potential for data exfiltration to cloud services meet the criteria for a suspicious classification.
Capability Assessment
Purpose & Capability
The skill's name/description (self-hosted memory engine with LLM extraction and a plugin) aligns with the SKILL.md instructions: a local HTTP server, fact extraction, BM25/vector search, and an OpenClaw plugin. However, the SKILL.md assumes you will build/run Go and Node projects, use curl/python3 for CLI examples, and optionally run Ollama and Turso — none of these required binaries or credentials are declared in the registry metadata, which is an inconsistency that should be resolved.
Instruction Scope
Instructions direct the agent/operator to run a local server that auto-captures conversation turns (plugin pre-turn/post-turn behavior) and store those as structured facts. That behavior is expected for a memory engine, but it means the skill will capture and persist conversation content by default. The SKILL.md also documents optional Turso cloud sync and an extractor endpoint requiring an API key — both of which can cause data to leave the local host if configured. The instructions do not explicitly warn operators about these privacy/exfiltration risks.
Install Mechanism
The skill is instruction-only (no install spec), which is lower automated risk. However, it instructs to git clone a GitHub repo and run go build and npm install/build for the plugin — fetching and building external source code is an explicit manual step and pulls arbitrary code from the listed repo (https://github.com/clawinfra/clawmemory). The registry metadata does not declare this external dependency; users should inspect that repository before building/ running.
Credentials
Registry metadata declares no required environment variables or primary credential, but SKILL.md/config.json show fields for extractor.apiKey and store.tursoToken (sensitive secrets). The skill's operation (LLM extractor endpoint and optional Turso sync) legitimately requires secrets if you enable those features, so the absence of declared env requirements in the registry is an inconsistency and a potential blind spot for users who may inadvertently provide secrets or point the server at remote endpoints.
Persistence & Privilege
The skill does not request always:true and does not modify other skills automatically per the registry flags. But the provided OpenClaw plugin is designed to be installed into the agent and will auto-inject pre-turn memory and auto-capture post-turn conversation data, creating persistent integration into the agent's runtime behavior. That persistence is expected for a memory plugin but is a meaningful privacy/persistence change an operator must opt into by installing the plugin.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install alex-clawmemory
  3. After installation, invoke the skill by name or use /alex-clawmemory
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Sovereign agent memory engine — hardened copy-paste patterns, API ref, config guide, known broken section. CI fixed (golangci-lint-action v7).
Metadata
Slug alex-clawmemory
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is ClawMemory?

Sovereign agent memory engine — self-hosted, privacy-first SQLite store with LLM-based fact extraction (GLM-4.7), hybrid BM25+vector search, contradiction re... It is an AI Agent Skill for Claude Code / OpenClaw, with 104 downloads so far.

How do I install ClawMemory?

Run "/install alex-clawmemory" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ClawMemory free?

Yes, ClawMemory is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ClawMemory support?

ClawMemory is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ClawMemory?

It is built and maintained by bowen31337 (@bowen31337); the current version is v1.0.0.

💬 Comments