Smart Memory v2 Skill
name: smart-memory
by bluepointdigital · published 2026-03-22
$ claw add gh:bluepointdigital/bluepointdigital-smart-memory---
name: smart-memory
description: Persistent local cognitive memory for OpenClaw via a Node adapter and FastAPI engine.
---
# Smart Memory v2 Skill
Smart Memory v2 is a persistent cognitive memory runtime, not a legacy vector-memory CLI.
Core runtime:
Core Capabilities
Native OpenClaw Integration (v2.5)
Use the native OpenClaw skill package:
Primary exports:
Tool Interface (for agent tool use)
1. `memory_search`
- `query` (string, required)
- `type` (`all|semantic|episodic|belief|goal`, default `all`)
- `limit` (number, default `5`)
- `min_relevance` (number, default `0.6`)
2. `memory_commit`
- `content` (string, required)
- `type` (`semantic|episodic|belief|goal`, required)
- `importance` (1-10, default `5`)
- `tags` (string array, optional)
- checks `/health` first
- auto-tags if missing (`working_question`, `decision` heuristics)
- commits are serialized (sequential) to protect local CPU embedding throughput
- if server is unreachable, payload is queued to `.memory_retry_queue.json`
- unreachable response is explicit:
- `Memory commit failed - server unreachable. Queued for retry.`
3. `memory_insights`
- `limit` (number, default `10`)
Reliability Guarantees
Session Arc Lifecycle Hooks
The v2.5 skill supports episodic session arc capture:
Flow:
1. Extract recent conversation turns (up to 20).
2. Run summarization with prompt:
- `Summarize this session arc: What was the goal? What approaches were tried? What decisions were made? What remains open?`
3. Persist summary through internal `memory_commit` as:
- `type: "episodic"`
- `tags: ["session_arc", "YYYY-MM-DD"]`
Passive Context Injection
Use `inject_active_context` (or `createOpenClawHooks().beforeModelResponse`) before response generation.
This adds the standardized block:
[ACTIVE CONTEXT]
Status: {status}
Active Projects: {active_projects}
Working Questions: {working_questions}
Top of Mind: {top_of_mind}
Pending Insights:
- {insight_1}
- {insight_2}
[/ACTIVE CONTEXT]Add this guidance line to your agent base prompt:
`If pending insights appear in your context that relate to the current conversation, surface them naturally to the user. Do not force it - but if there is a genuine connection, seamlessly bring it up.`
Minimal OpenClaw Wiring Example
const {
createSmartMemorySkill,
createOpenClawHooks,
} = require("./skills/smart-memory-v25");
const memory = createSmartMemorySkill({
baseUrl: "http://127.0.0.1:8000",
summarizeSessionArc: async ({ prompt, conversationText }) => {
return openclaw.llm.complete({ system: prompt, user: conversationText });
},
});
const hooks = createOpenClawHooks({
skill: memory.skill,
agentIdentity: "OpenClaw Agent",
summarizeWithLLM: async ({ prompt, conversationText }) => {
return openclaw.llm.complete({ system: prompt, user: conversationText });
},
});
// Register memory.tools as callable tools:
// - memory_search
// - memory_commit
// - memory_insights
// and call hooks.beforeModelResponse / hooks.onTurn / hooks.onSessionEnd at lifecycle points.Node Adapter Methods (Base Adapter)
API Endpoints
Install (CPU-Only Required)
For Docker, WSL, and laptops without NVIDIA GPUs, use CPU-only PyTorch.
# from repository root
cd smart-memory
# Create Python venv
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install CPU-only PyTorch FIRST
pip install torch --index-url https://download.pytorch.org/whl/cpu
# Then install remaining dependencies
pip install -r requirements-cognitive.txt
# Finally, install Node dependencies
npm installPyTorch Policy
Deprecated
Legacy vector-memory CLI artifacts (`smart_memory.js`, `vector_memory_local.js`, `focus_agent.js`) are removed in v2.
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...