Smart Memory
CLAWHUB · Unverified
Context-aware memory for AI agents with dual retrieval modes — fast vector search or curated Focus Agent synthesis. SQLite backend, zero configuration, local embeddings. Skill: Smart Memory Owner: BluePointDigital Summary: Context-aware memory for AI agents with dual retrieval modes — fast vector search or curated Focus Agent synthesis. SQLite backend, zero configuration, local embeddings. Tags: latest:2.1.2 Version history: v2.1.2 | 2026-02-06T17:35:01.716Z | user - Added six new JavaScript module files: chunker.js, embed.js, hot_memory.js, memory_bridge.js, search.js, and session_m
- 62
- Rank
- 84
- Safety
- 1.3k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 4/15/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Apr 15, 2026
- Protocol compatibility
- OpenClawcompatibility · Apr 15, 2026
- Adoption signal
- 1.3K downloadsadoption · Apr 15, 2026
- Latest release
- 2.1.2release · Feb 6, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 2.1.2release
- Added six new JavaScript module files: chunker.js, embed.js, hot_memory.js, memory_bridge.js, search.js, and session_memory.js. - Enhanced project codebase by separating functionality into dedicated modules for chunking, embedding, searching, and memory management. - No user-facing changes documented; update increases maintainability and modularity.
Observed Feb 6, 2026 · source
Install and run
Setup complexity: medium.
clawhub skill install kn79jnjmwnh2n88m8qh12jdhcn80jh1m:smart-memory- Setup complexity is MEDIUM. Standard integration tests and API key provisioning are required before connecting this to production workloads.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-bluepointdigital-smart-memory/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
67,758 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: smart-memory
description: Context-aware memory for AI agents with dual retrieval modes — fast vector search or curated Focus Agent synthesis. SQLite backend, zero configuration, local embeddings.
---
# Smart Memory v2.1 - Focus Agent Edition
**Drop-in replacement for OpenClaw's memory system** with superior search quality and optional curated retrieval via Focus Agent.
## Features
- **Hybrid Search**: Combines FTS5 keyword search (BM25) with semantic vector search
- **Focus Agent**: Multi-pass curation for complex queries (retrieve → rank → synthesize)
- **Dual Modes**: Fast (direct) or Focus (curated) — toggle anytime
- **SQLite Backend**: Single-file database, no external services
- **100% Local**: Embeddings run locally with Transformers.js (no API keys)
- **Auto-Optimization**: Uses sqlite-vec when available for native vector ops
- **Zero Configuration**: Works immediately after install
## Installation
```bash
npx clawhub install smart-memory
```
Or from ClawHub: https://clawhub.ai/BluePointDigital/smart-memory
## Quick Start
### 1. Sync Memory
```bash
node smart-memory/smart_memory.js --sync
```
### 2. Search (Fast Mode - Default)
```bash
node smart-memory/smart_memory.js --search "James values principles"
```
### 3. Enable Focus Mode (Curated Retrieval)
```bash
node smart-memory/smart_memory.js --focus
node smart-memory/smart_memory.js --search "complex decision about project direction"
```
### 4. Disable Focus Mode
```bash
node smart-memory/smart_memory.js --unfocus
```
## Search Modes
### Fast Mode (Default)
Direct vector similarity search. Best for:
- Simple lookups
- Quick fact retrieval
- Routine queries
```bash
node smart-memory/smart_memory.js --search "git remote"
```
### Focus Mode (Curated)
Multi-pass curation via Focus Agent. Best for:
- Complex decisions
- Multi-fact synthesis
- Planning and strategy
- Comparing options
```bash
node smart-memory/smart_memory.js --focus
node smart-memory/smart_memory.js --search "What did we decide about BluePointDigital architecture?"
```
**How Focus Mode Works:**
1. **Retrieve** 20+ chunks (broad net)
2. **Rank** by weighted relevance (vector + term matching + source boost)
3. **Synthesize** into coherent narrative
4. **Deliver** structured context with confidence scores
## How It Works
### Hybrid Search Algorithm
1. **FTS5** finds exact keyword matches (BM25 ranking)
2. **Vector search** finds semantic matches (cosine similarity)
3. **Merged results** using weighted scoring:
- 70% vector score + 30% keyword score
- Catches both "what you mean" and "exact tokens"
### Focus Agent Curation
When enabled, searches go through additional processing:
```
Query: "What did we decide about BluePointDigital?"
┌─────────────────┐
│ Retrieve 20+ │ ← Vector similarity
│ chunks │
└────────┬────────┘
▼
┌─────────────────┐
│ Weighted │ ← Term matching
│ Ranking │ Source boosting
│ │ Recency boost
└────────┬─────README.md
# Smart Memory for OpenClaw
**Context-aware memory system with dual retrieval modes** — fast vector search when you need speed, curated Focus Agent when you need depth.
```bash
# Install and it just works
npx clawhub install smart-memory
# Optional: sync for better quality
node smart-memory/smart_memory.js --sync
```
## ✨ The Magic
**Same function call. Two modes. You choose.**
```javascript
// Fast mode (default): Direct vector search
memory_search("User principles values")
// Focus mode: Multi-pass curation for complex decisions
memory_mode('focus')
memory_search("What did we decide about the architecture?")
```
| Mode | Best For | How It Works |
|------|----------|--------------|
| **Fast** | Quick lookups, facts | Direct vector similarity (~10ms) |
| **Focus** | Decisions, synthesis | Retrieve → Rank → Synthesize (~100ms) |
## 🚀 Quick Start
### From ClawHub (Recommended)
```bash
npx clawhub install smart-memory
```
Done. `memory_search` now works with automatic mode selection.
### From GitHub
```bash
curl -sL https://raw.githubusercontent.com/BluePointDigital/smart-memory/main/install.sh | bash
```
### Manual
```bash
git clone https://github.com/BluePointDigital/smart-memory.git
cd smart-memory/smart-memory && npm install
```
## 🎯 How It Works
### Dual Retrieval Modes
```
User searches
│
▼
┌─────────────┐
│ Fast Mode? │
└──────┬──────┘
Yes │ │ No (Focus Mode)
▼ ▼
┌────────┐ ┌─────────────┐
│ Vector │ │ Retrieve 20+│
│ Search │ │ chunks │
└────┬───┘ └──────┬──────┘
│ ▼
│ ┌─────────────┐
│ │ Rank & │
│ │ Synthesize │
│ └──────┬──────┘
│ ▼
│ ┌─────────────┐
│ │ Curated │
│ │ Narrative │
└─────┴──────┬──────┘
▼
┌────────────┐
│ Results │
└────────────┘
```
### Zero Config Philosophy
1. **Install** → Works immediately (built-in fallback)
2. **Sync** → Gets better (vector embeddings)
3. **Choose mode** → Fast for speed, Focus for depth
4. **Use** → Always best available
## 🎛️ Toggle Modes
```bash
# Enable Focus mode (curated retrieval)
node smart-memory/smart_memory.js --focus
# Disable Focus mode (back to fast)
node smart-memory/smart_memory.js --unfocus
# Check current mode
node smart-memory/smart_memory.js --mode
```
## 📊 Before & After
| Query | Without Skill | With Skill (Fast) | With Skill (Focus) |
|-------|--------------|-------------------|-------------------|
| "User collaboration style" | ⚠️ Weak | ✅ Better | ✅ "work with me, not just for me" + context |
| "What did we decide?" | ⚠️ Scattered | ✅ Related chunks | ✅ Synthesized decision narrative |
| "Compare options A and B" | ⚠️ Manual work | ✅ Related hits | ✅ Structured comparison with sources |
## 🛠️ Usage
### In OpenClaw
```javascript
// Fast search (default)
const results = await memory_search("deployment config", 5);
// Enable focus for complex queries
mskills/vector-memory/README.md
# Vector Memory Skill
Smart memory search with **zero configuration**. Automatically uses semantic vector embeddings when available, falls back to built-in search otherwise.
## 🎯 How It Works
```
┌─────────────────┐
│ User searches │
└────────┬────────┘
│
┌────▼────┐
│ Vector │ ←── Semantic understanding
│ ready? │ (synonyms, concepts)
└────┬────┘
Yes │ No
┌────┘ └────┐
▼ ▼
┌────────┐ ┌──────────┐
│ Vector │ │ Built-in │ ←── Keyword matching
│ Search │ │ Search │ (fallback)
└────────┘ └──────────┘
│ │
└──────┬─────┘
▼
┌──────────────┐
│ Return results│
└──────────────┘
```
**No setup required.** Install the skill and `memory_search` immediately works—just better when you sync.
## 🚀 Installation
### From ClawHub
```bash
npx clawhub install vector-memory
```
### From GitHub
```bash
curl -sL https://raw.githubusercontent.com/YOUR_USERNAME/vector-memory-openclaw/main/install.sh | bash
```
### Manual
```bash
git clone https://github.com/YOUR_USERNAME/vector-memory-openclaw.git
cd vector-memory-openclaw/vector-memory && npm install
```
## ✨ What You Get
### Immediate (No Sync Required)
- `memory_search` works with built-in keyword search
- `memory_get` retrieves full content
- All standard memory operations functional
### After First Sync (Recommended)
```bash
node vector-memory/smart_memory.js --sync
```
- **Semantic search** - "principles" finds "values"
- **Concept matching** - "values" finds "principles"
- **Better relevance** - Neural embeddings understand meaning
## 🛠️ Tools
### memory_search
**Automatically selects best method**
```javascript
// Works immediately (uses built-in)
memory_search("James values")
// Works better after sync (uses vector)
memory_search("James values") // Same call, better results!
```
**Parameters:**
- `query` (string): What to search for
- `max_results` (number): Max results (default: 5)
**Returns:** Array of matches with path, lines, score, snippet
### memory_get
Get full content from a file.
```javascript
memory_get("MEMORY.md", 1, 20) // Get lines 1-20
```
### memory_sync
Index memory files for vector search.
```bash
node vector-memory/smart_memory.js --sync
```
Run this after editing memory files.
### memory_status
Check which method is active.
```bash
node vector-memory/smart_memory.js --status
```
## 📊 Comparison
| Query | Before (Built-in) | After (Vector) |
|-------|------------------|----------------|
| "James principles" | ⚠️ Weak matches | ✅ "What He Values" section |
| "Nyx origin" | ⚠️ Literal match | ✅ "The Transfer" section |
| "values beliefs" | ⚠️ Weak match | ✅ Strong semantic match |
**Same function call. Better results after sync.**
## 🔧 How to Use
### In OpenClaw
Just use `memory_search` normally:
```javascript
// This automatically uses best available method
const results = await memory_search("what did we discuss about projects");
```
### CLI
```ba_meta.json
{
"ownerId": "kn79jnjmwnh2n88m8qh12jdhcn80jh1m",
"slug": "smart-memory",
"version": "2.1.2",
"publishedAt": 1770399301716
}smart-memory/references/integration.md
# Integration Guide
## For OpenClaw Agents
### Method 1: Skill Installation
1. Copy `skills/vector-memory/` to your agent's `skills/` directory
2. Copy `vector-memory/` implementation folder
3. Install dependencies: `cd vector-memory && npm install`
4. Index memory: `node vector_memory_local.js --sync`
5. Use via skill system
### Method 2: Direct Tool Replacement
Replace built-in `memory_search` with:
```javascript
// In your agent's tools configuration
{
"name": "memory_search",
"command": "node /path/to/vector-memory/vector_memory_local.js --search {{query}} --max-results {{max_results}}"
}
```
### Method 3: Programmatic
```javascript
import { memorySearch, memoryGet, memorySync } from './vector-memory/memory.js';
// Search
const results = await memorySearch("James values", 5);
// Get full content
const content = memoryGet("MEMORY.md", 1, 20);
// Sync after edits
memorySync();
```
## For Other Frameworks
### LangChain (Python)
```python
from sentence_transformers import SentenceTransformer
from langchain_community.vectorstores import FAISS
model = SentenceTransformer('all-MiniLM-L6-v2')
embeddings = model.encode(texts)
vectorstore = FAISS.from_embeddings(embeddings, texts)
```
### N8N
Use Function node with `@xenova/transformers`:
```javascript
const { pipeline } = require('@xenova/transformers');
const embedder = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2');
const embedding = await embedder(query, { pooling: 'mean' });
```
### Custom Agents
Core pattern:
1. Load model: `SentenceTransformer('all-MiniLM-L6-v2')`
2. Embed chunks: `model.encode(chunks)`
3. Store: JSON, SQLite, or vector DB
4. Search: Cosine similarity between query and stored embeddings
5. Return: Full content from source files
## Environment Setup
### Required
- Node.js 18+ (for OpenClaw version)
- npm or yarn
### Optional
- Docker (for pgvector version)
- OpenAI API key (for pgvector version)
## Directory Structure
```
workspace/
├── skills/
│ └── vector-memory/ # Skill manifest
│ ├── skill.json
│ └── README.md
├── vector-memory/ # Implementation
│ ├── vector_memory_local.js # Local embeddings
│ ├── memory.js # OpenClaw wrapper
│ ├── package.json
│ └── node_modules/
├── memory/ # Your memory files
│ └── *.md
└── MEMORY.md # Main memory file
```
## Sharing Between Agents
Shareable:
- `skill.json`
- `vector_memory_local.js`
- `memory.js`
- `package.json`
Not shareable (agent-specific):
- `vectors_local.json` (rebuild per agent)
- `node_modules/` (reinstall per agent)
- `.cache/transformers/` (model downloads per agent)
## Auto-Sync
Add to heartbeat or cron:
```bash
# Sync if memory files changed
if [ -n "$(find memory MEMORY.md -newer vector-memory/.last_sync 2>/dev/null)" ]; then
node vector-memory/vector_memory_local.js --sync
touch vector-memory/.last_sync
fi
```AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-bluepointdigital-smart-memory. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about Smart Memory. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-bluepointdigital-smart-memory, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/BluePointDigital/smart-memory",
"sourceUrl": "https://clawhub.ai/BluePointDigital/smart-memory",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-bluepointdigital-smart-memory/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-bluepointdigital-smart-memory/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.3K downloads",
"href": "https://clawhub.ai/BluePointDigital/smart-memory",
"sourceUrl": "https://clawhub.ai/BluePointDigital/smart-memory",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.1.2",
"href": "https://clawhub.ai/BluePointDigital/smart-memory",
"sourceUrl": "https://clawhub.ai/BluePointDigital/smart-memory",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-06T17:35:01.716Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-bluepointdigital-smart-memory/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-bluepointdigital-smart-memory/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.1.2",
"description": "- Added six new JavaScript module files: chunker.js, embed.js, hot_memory.js, memory_bridge.js, search.js, and session_memory.js. - Enhanced project codebase by separating functionality into dedicated modules for chunking, embedding, searching, and memory management. - No user-facing changes documented; update increases maintainability and modularity.",
"href": "https://clawhub.ai/BluePointDigital/smart-memory",
"sourceUrl": "https://clawhub.ai/BluePointDigital/smart-memory",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-06T17:35:01.716Z",
"isPublic": true
}
]
}Record generated Nov 23, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-bluepointdigital-smart-memory/run-check
