← Back to Skills Marketplace
123
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install conversations
Description
从 OpenClaw sessions/*.jsonl 导入对话历史到本地 SQLite,配合 FTS5 全文搜索。成为真正的记忆库,支持语义化查询历史对话,让整理和回顾更高效。装好后跑一次 import,之后随时可以 query。
README (SKILL.md)
conversations-universal
对话历史的本地记忆库。
使用方式
第一次使用
- 运行导入脚本,把历史 session 读入本地库:
python {baseDir}/scripts/import_sessions.py
- 之后每次想回顾历史,直接用 query 脚本:
python {baseDir}/scripts/query_conversations.py \x3C搜索内容>
查询示例
# 查询某天的讨论
python scripts/query_conversations.py "我们讨论过内存泄漏"
# 查询某个话题
python scripts/query_conversations.py "OpenClaw 配置"
自动导入
建议配合 cron 定期导入新 session:
openclaw cron add \
--name "对话历史导入" \
--cron "0 */6 * * *" \
--session isolated \
--message "python {baseDir}/scripts/import_sessions.py" \
--announce
工作原理
- 存储:SQLite + FTS5 全文搜索,零外部依赖
- 导入:读取
agents/main/sessions/*.jsonl,解析 role/content,写入 chunks 表 - 搜索:FTS5 MATCH,支持自然语言查询
环境变量
| 变量 | 默认值 | 说明 |
|---|---|---|
| OPENCLAW_WORKSPACE | 自动推断 | session 文件所在目录 |
| CONVERSATIONS_DB | {workspace}/conversations.db |
数据库路径 |
| DRY_RUN | false | 试运行,不写入 |
依赖
- Python 3.8+(内置 sqlite3,FTS5 需要 3.9+)
- OpenClaw sessions 目录
与 conversations 1.0 的区别
| conversations 1.0 | conversations-universal | |
|---|---|---|
| 搜索方式 | Ollama 向量搜索 | SQLite FTS5 |
| 外部依赖 | 需要 Ollama | 纯 Python |
| 搜索质量 | 高(语义) | 中(关键词) |
| 适用场景 | 已有 Ollama 的用户 | 所有人 |
Usage Guidance
This skill is internally coherent and implements what it claims: it reads your OpenClaw session JSONL files and builds a local SQLite database for keyword/FTS search. Before installing: (1) be aware it will aggregate your chat contents into a local DB (no network exfiltration in the code), so don’t install if you don’t want local copies of conversations; (2) run import with DRY_RUN first to verify paths and parsing; (3) ensure your Python+SQLite build supports FTS5 if you want full-text search (otherwise it falls back to LIKE); (4) back up or inspect any existing conversations.db before running to avoid accidental overwrites; and (5) note the SKILL.md documents OPENCLAW_WORKSPACE / CONVERSATIONS_DB / DRY_RUN as config vars even though the registry didn't mark required env vars.
Capability Analysis
Type: OpenClaw Skill
Name: conversations
Version: 2.0.0
The skill bundle is a utility for indexing and searching local OpenClaw conversation history using SQLite and FTS5. The scripts (import_sessions.py and query_conversations.py) operate entirely on local files within the OpenClaw workspace, contain no network activity, and use only standard Python libraries without any suspicious execution patterns or data exfiltration logic.
Capability Assessment
Purpose & Capability
Name/description claim: import OpenClaw sessions into local SQLite with FTS5 and provide query tooling. The included scripts implement exactly that: they locate sessions under an OpenClaw workspace, parse JSONL message records, deduplicate by MD5, create a local conversations.db, and provide LIKE/FTS5 search. No unexpected external services, binaries, or credentials are required.
Instruction Scope
SKILL.md and the scripts instruct running the bundled Python scripts and optionally scheduling via openclaw cron. They access files under agents/main/sessions (or the workspace path) and write a local conversations.db. This is in-scope for the stated purpose. Minor discrepancy: SKILL.md documents environment variables (OPENCLAW_WORKSPACE, CONVERSATIONS_DB, DRY_RUN) that are used by the scripts but the registry did not list any required env vars — these are configuration vars (not secrets) and optional, but the documentation/registry mismatch is worth noting.
Install Mechanism
Instruction-only with bundled Python scripts; there is no network download, no package install, and no install spec. This minimizes install-time risk. Scripts rely on Python 3.8+/3.9+ and built-in sqlite3; no third-party packages or external URLs are fetched.
Credentials
The skill requests no credentials or privileged config paths. It does read session files from the OpenClaw workspace (which contain chat history) and writes a local DB. The referenced environment variables are for configuration only (workspace path, DB path, dry-run) and do not contain secrets; still, the skill will aggregate potentially sensitive chat content locally—this is expected but worth informing the user.
Persistence & Privilege
always is false and the skill does not request persistent platform-level privileges or modify other skills. It creates/updates a conversations.db in the workspace but does not alter agent configurations beyond scheduling guidance (cron example).
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install conversations - After installation, invoke the skill by name or use
/conversations - Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.0
这是一个更普适的版本,任何装了 OpenClaw 的人都能用。
搜索方式:SQLite FTS5 全文搜索
外部依赖:纯 Python,零依赖
搜索质量:中(关键词匹配)
安装难度:低(装好 Python 就能跑)
v1.0.1
- 更新描述和文档,强调支持 OpenClaw sessions 文件及本地 SQLite 数据库导入与查询
- 增加环境变量说明(OPENCLAW_WORKSPACE、CONVERSATIONS_DB),支持自定义数据库路径
- 优化数据库结构和脚本说明,明确 chunks/embeddings 表作用
- 完善导入和查询脚本用法说明,增加示例与参数细节
- 建议工作流程更具体,包括定期导入和多样化查询方式
v1.0.0
Initial release of the conversations skill for managing conversation history.
- Import past conversations from sessions/*.jsonl into a centralized conversations.db, with deduplication and assistant/user filtering.
- Query historical conversations by stats, recent entries, random samples, keyword search, session, or timestamp.
- Provides command-line scripts for both import (import_sessions.py) and flexible querying (query_conversations.py).
- Stores all conversation and embedding data in workspace/conversations.db for further analysis or retrieval.
Metadata
Frequently Asked Questions
What is conversations?
从 OpenClaw sessions/*.jsonl 导入对话历史到本地 SQLite,配合 FTS5 全文搜索。成为真正的记忆库,支持语义化查询历史对话,让整理和回顾更高效。装好后跑一次 import,之后随时可以 query。 It is an AI Agent Skill for Claude Code / OpenClaw, with 123 downloads so far.
How do I install conversations?
Run "/install conversations" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is conversations free?
Yes, conversations is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does conversations support?
conversations is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created conversations?
It is built and maintained by shu0yu (@shu0yu); the current version is v2.0.0.
More Skills