Jasper Recall v0.2.3
Local RAG (Retrieval-Augmented Generation) system for AI agent memory. Gives your agent the ability to remember and search past conversations.
New in v0.2.2: Shared ChromaDB Collections — separate collections for private, shared, and learnings content. Better isolation for multi-agent setups.
New in v0.2.1: Recall Server — HTTP API for Docker-isolated agents that can't run CLI directly.
New in v0.2.0: Shared Agent Memory — bidirectional learning between main and sandboxed agents with privacy controls.
When to Use
- - Memory recall: Search past sessions for context before answering
- Continuous learning: Index daily notes and decisions for future reference
- Session continuity: Remember what happened across restarts
- Knowledge base: Build searchable documentation from your agent's experience
Quick Start
Setup
One command installs everything:
CODEBLOCK0
This creates:
- - Python venv at INLINECODE0
- ChromaDB database at INLINECODE1
- CLI scripts in INLINECODE2
- OpenClaw plugin config in INLINECODE3
Why Python?
The core search and embedding functionality uses Python libraries:
- - ChromaDB — Vector database for semantic search
- sentence-transformers — Local embedding models (no API needed)
These are the gold standard for local RAG. There are no good Node.js equivalents that work fully offline.
Why a Separate Venv?
The venv at ~/.openclaw/rag-env provides:
| Benefit | Why It Matters |
|---|
| Isolation | Won't conflict with your other Python projects |
| No sudo |
Installs to your home directory, no root needed |
|
Clean uninstall | Delete the folder and it's gone |
|
Reproducibility | Same versions everywhere |
The dependencies are heavy (~200MB total with the embedding model), but this is a one-time download that runs entirely locally.
Basic Usage
Search your memory:
CODEBLOCK1
Index your files:
CODEBLOCK2
Create session digests:
CODEBLOCK3
How It Works
Three Components
- 1. digest-sessions — Extracts key info from session logs (topics, tools used)
- index-digests — Chunks and embeds markdown files into ChromaDB
- recall — Semantic search across your indexed memory
What Gets Indexed
By default, indexes files from ~/.openclaw/workspace/memory/:
- -
*.md — Daily notes, MEMORY.md - INLINECODE7 — Session summaries
- INLINECODE8 — Project documentation
- INLINECODE9 — Development logs (if present)
Embedding Model
Uses sentence-transformers/all-MiniLM-L6-v2:
- - 384-dimensional embeddings
- ~80MB download on first run
- Runs locally, no API needed
Agent Integration
Memory-Augmented Responses
CODEBLOCK4
Automated Indexing (Heartbeat)
Add to HEARTBEAT.md:
CODEBLOCK5
Cron Job
Schedule regular indexing:
CODEBLOCK6
Shared Agent Memory (v0.2.0+)
For multi-agent setups where sandboxed agents need access to some memories:
Memory Tagging
Tag entries in daily notes:
CODEBLOCK7
ChromaDB Collections (v0.2.2+)
Memory is stored in separate collections for isolation:
| Collection | Purpose | Who accesses |
|---|
| INLINECODE11 | Main agent's private content | Main agent only |
| INLINECODE12 |
[public] tagged content | Sandboxed agents |
|
agent_learnings | Learnings from any agent | All agents |
|
jasper_memory | Legacy unified (backward compat) | Fallback |
Collection selection:
CODEBLOCK8
Sandboxed Agent Access
CODEBLOCK9
Moltbook Agent Setup (v0.4.0+)
For the moltbook-scanner (or any sandboxed agent), use the built-in setup:
CODEBLOCK10
This creates:
- -
~/bin/recall — Wrapper that forces --public-only flag - INLINECODE17 — Symlink to main workspace's shared memory
The sandboxed agent can then use:
CODEBLOCK11
Privacy model:
- 1. Main agent tags memories as
[public] or [private] in daily notes - INLINECODE20 extracts
[public] content to INLINECODE22 - Sandboxed agents can ONLY search the
shared collection
Privacy Workflow
CODEBLOCK12
CLI Reference
recall
CODEBLOCK13
serve (v0.2.1+)
CODEBLOCK14
Example (from Docker container):
CODEBLOCK15
privacy-check (v0.2.0+)
CODEBLOCK16
sync-shared (v0.2.0+)
CODEBLOCK17
index-digests
CODEBLOCK18
digest-sessions
CODEBLOCK19
Configuration
Custom Paths
Set environment variables:
CODEBLOCK20
Chunking
Default settings in index-digests:
- - Chunk size: 500 characters
- Overlap: 100 characters
Security Considerations
⚠️ Review these settings before enabling in production:
Server Binding
The serve command defaults to 127.0.0.1 (localhost only). Do not use --host 0.0.0.0 unless you explicitly intend to expose the API externally and have secured it appropriately.
Private Memory Access
The server enforces public_only=true by default. The env var RECALL_ALLOW_PRIVATE=true bypasses this restriction. Never set this on public/shared hosts — it exposes your private memories to any client.
autoRecall Plugin
When autoRecall: true in the OpenClaw plugin config, memories are automatically injected before every agent message. Consider:
- - Set
publicOnly: true in plugin config for sandboxed agents - Review which collections will be searched
- Use
minScore to filter low-relevance injections
What's automatically skipped (no recall triggered):
- - Heartbeat polls (
HEARTBEAT, Read HEARTBEAT.md, HEARTBEAT_OK) - Messages containing INLINECODE35
- Messages < 10 characters
- Agent-to-agent messages (cron jobs, workers, spawned agents)
- Automated reports (
📋 PR Review, 🤖 Codex Watch, ANNOUNCE_*) - Messages from senders starting with
agent: or INLINECODE40
Safer config for untrusted contexts:
CODEBLOCK21
Environment Variables
The following env vars affect behavior — set them explicitly rather than relying on defaults:
| Variable | Default | Purpose |
|---|
| INLINECODE41 | INLINECODE42 | Memory files location |
| INLINECODE43 |
~/.openclaw/chroma-db | Vector database path |
|
RECALL_SESSIONS_DIR |
~/.openclaw/agents/main/sessions | Session logs |
|
RECALL_ALLOW_PRIVATE |
false | Server private access |
|
RECALL_PORT |
3458 | Server port |
|
RECALL_HOST |
127.0.0.1 | Server bind address |
Dry-Run First
Before sharing or syncing, use dry-run options to preview what will be exposed:
CODEBLOCK22
Sandboxed Environments
For maximum isolation, run jasper-recall in a container or dedicated account:
- - Limits risk of accidental data exposure
- Separates private memory from shared contexts
- Recommended for multi-agent setups with untrusted agents
Troubleshooting
"No index found"
CODEBLOCK23
"Collection not found"
CODEBLOCK24
Model download slow
First run downloads ~80MB model. Subsequent runs are instant.
Links
- - GitHub: https://github.com/E-x-O-Entertainment-Studios-Inc/jasper-recall
- npm: https://www.npmjs.com/package/jasper-recall
- ClawHub: https://clawhub.ai/skills/jasper-recall
技能名称: jasper-recall
详细描述:
Jasper Recall v0.2.3
用于AI智能体记忆的本地RAG(检索增强生成)系统。赋予你的智能体记住和搜索过往对话的能力。
v0.2.2 新功能: 共享ChromaDB集合——为私有、共享和学习内容提供独立集合。为多智能体设置提供更好的隔离性。
v0.2.1 新功能: Recall服务器——为无法直接运行CLI的Docker隔离智能体提供HTTP API。
v0.2.0 新功能: 共享智能体记忆——主智能体与沙盒智能体之间的双向学习,并带有隐私控制。
何时使用
- - 记忆召回:在回答前搜索过往会话以获取上下文
- 持续学习:为未来参考索引每日笔记和决策
- 会话连续性:记住重启期间发生的事情
- 知识库:从智能体的经验中构建可搜索的文档
快速开始
设置
一条命令安装所有内容:
bash
npx jasper-recall setup
这将创建:
- - Python虚拟环境位于 ~/.openclaw/rag-env
- ChromaDB数据库位于 ~/.openclaw/chroma-db
- CLI脚本位于 ~/.local/bin/
- OpenClaw插件配置位于 openclaw.json
为什么用Python?
核心搜索和嵌入功能使用Python库:
- - ChromaDB — 用于语义搜索的向量数据库
- sentence-transformers — 本地嵌入模型(无需API)
这些是本地RAG的黄金标准。没有好的Node.js等效方案可以完全离线工作。
为什么用独立的虚拟环境?
位于 ~/.openclaw/rag-env 的虚拟环境提供:
| 优势 | 重要性 |
|---|
| 隔离性 | 不会与你其他Python项目冲突 |
| 无需sudo |
安装到你的主目录,无需root权限 |
|
干净卸载 | 删除文件夹即可完全移除 |
|
可复现性 | 各处版本一致 |
依赖项较重(包含嵌入模型总共约200MB),但这是一次性下载,完全在本地运行。
基本用法
搜索你的记忆:
bash
recall 我们关于API设计做了什么决定
recall hopeIDS模式 --limit 10
recall 会议笔记 --json
索引你的文件:
bash
index-digests # 将记忆文件索引到ChromaDB
创建会话摘要:
bash
digest-sessions # 处理新会话
digest-sessions --dry-run # 预览将要处理的内容
工作原理
三个组件
- 1. digest-sessions — 从会话日志中提取关键信息(主题、使用的工具)
- index-digests — 将markdown文件分块并嵌入到ChromaDB
- recall — 跨索引记忆进行语义搜索
被索引的内容
默认情况下,索引来自 ~/.openclaw/workspace/memory/ 的文件:
- - .md — 每日笔记,MEMORY.md
- session-digests/.md — 会话摘要
- repos/.md — 项目文档
- founder-logs/.md — 开发日志(如果存在)
嵌入模型
使用 sentence-transformers/all-MiniLM-L6-v2:
- - 384维嵌入
- 首次运行下载约80MB
- 本地运行,无需API
智能体集成
记忆增强响应
python
在回答关于过往工作的问题之前
results = exec(recall 项目设置决策 --json)
在响应中包含相关上下文
自动索引(心跳)
添加到HEARTBEAT.md:
markdown
记忆维护
- - [ ] 有新会话日志?→ digest-sessions
- [ ] 记忆文件已更新?→ index-digests
定时任务
安排定期索引:
json
{
schedule: { kind: cron, expr: 0 /6 },
payload: {
kind: agentTurn,
message: 运行 index-digests 以更新记忆索引
},
sessionTarget: isolated
}
共享智能体记忆(v0.2.0+)
适用于沙盒智能体需要访问某些记忆的多智能体设置:
记忆标签
在每日笔记中标记条目:
markdown
2026-02-05 [public] - 功能已发布
这对所有智能体可见。
2026-02-05 [private] - 个人笔记
仅主智能体可见(未标记时的默认值)。
2026-02-05 [learning] - 发现的模式
在智能体之间双向共享的学习内容。
ChromaDB集合(v0.2.2+)
记忆存储在独立的集合中以实现隔离:
| 集合 | 用途 | 谁可访问 |
|---|
| privatememories | 主智能体的私有内容 | 仅主智能体 |
| sharedmemories |
[public] 标记的内容 | 沙盒智能体 |
| agent_learnings | 来自任何智能体的学习内容 | 所有智能体 |
| jasper_memory | 旧版统一集合(向后兼容) | 回退 |
集合选择:
bash
主智能体(默认)- 搜索 private_memories
recall api设计
沙盒智能体 - 仅搜索 shared_memories
recall 产品信息 --public-only
仅搜索学习内容
recall 模式 --learnings
搜索所有集合(合并结果)
recall 所有内容 --all
特定集合
recall 某内容 --collection private_memories
旧版模式(单一集合)
recall 旧方式 --legacy
沙盒智能体访问
bash
沙盒智能体使用 --public-only
recall 产品信息 --public-only
主智能体可以看到所有内容
recall 产品信息
Moltbook智能体设置(v0.4.0+)
对于moltbook-scanner(或任何沙盒智能体),使用内置设置:
bash
使用 --public-only 限制配置沙盒智能体
npx jasper-recall moltbook-setup
验证设置是否正确
npx jasper-recall moltbook-verify
这将创建:
- - ~/bin/recall — 强制使用 --public-only 标志的包装器
- shared/ — 指向主工作区共享记忆的符号链接
沙盒智能体随后可以使用:
bash
~/bin/recall 查询 # 自动限制为公共记忆
隐私模型:
- 1. 主智能体在每日笔记中将记忆标记为 [public] 或 [private]
- sync-shared 将 [public] 内容提取到 memory/shared/
- 沙盒智能体只能搜索 shared 集合
隐私工作流
bash
在共享前检查敏感数据
privacy-check 要扫描的文本
privacy-check --file notes.md
将 [public] 条目提取到共享目录
sync-shared
sync-shared --dry-run # 先预览
CLI参考
recall
recall 查询 [选项]
选项:
-n, --limit N 结果数量(默认:5)
--json 输出为JSON
-v, --verbose 显示相似度分数和集合来源
--public-only 仅搜索 shared_memories(沙盒智能体)
--learnings 仅搜索 agent_learnings
--all 搜索所有集合(合并结果)
--collection X 按名称搜索特定集合
--legacy 使用旧版 jasper_memory 集合
serve(v0.2.1+)
npx jasper-recall serve [选项]
选项:
--port, -p N 监听端口(默认:3458)
--host, -h H 绑定主机(默认:127.0.0.1)
为Docker隔离智能体启动HTTP API服务器。
端点:
GET /recall?q=查询&limit=5 搜索记忆
GET /health 健康检查
安全:默认强制 public_only=true。
设置 RECALLALLOWPRIVATE=true 以允许私有查询。
示例(从Docker容器):
bash
curl http://host.docker.internal:3458/recall?q=产品+信息
privacy-check(v0.2.0+)
privacy-check 文本 # 扫描内联文本
privacy-check --file X # 扫描文件