LiteRAG
/install literag
LiteRAG
Use this skill when the target corpus is too large or too noisy for main agent memory.
Install
Packaged dependency install:
python3 -m pip install -r {baseDir}/requirements.txt
Layout
- Config + databases live under
\x3Cworkspace>/.literag/ - Main config:
\x3Cworkspace>/.literag/knowledge-libs.json - Default workspace resolution order:
OPENCLAW_WORKSPACE→WORKSPACE→ walk upward from the current path until the OpenClaw workspace sentinel files are found - Core scripts live under
skills/literag/scripts/ - Skill bin entrypoint:
skills/literag/bin/literag - Workspace convenience wrappers live at
scripts/literag-query.py,scripts/literag-index.py,scripts/literag-status.py,scripts/literag-meta.py, andscripts/lq
Rules
- Keep personal/work memory in OpenClaw builtin memory
- Keep large external corpora in LiteRAG, not
memory_search - Treat each knowledge base as an independent library with its own SQLite
- Search first, inspect second
- Prefer grouped document hits over raw chunk spam
- Prefer source-relative paths when citing files back to the user
- Use local OpenAI-compatible embeddings by default unless explicitly changed in config
Read these files when needed
- Always read
\x3Cworkspace>/.literag/knowledge-libs.jsonwhen targeting a library or changing config - Read
references/usage.mdwhen you need command examples, output schema, or the intended search → inspect workflow - Read
references/configuration.mdwhen adding libraries, source roots, excludes, chunking overrides, or ranking overrides - Read
references/agent-prompts.mdwhen another agent / ACP harness needs a ready-made LiteRAG prompt template - Read
references/optimization-playbook.mdwhen a specific library needs retrieval-quality tuning, ranking cleanup, or indexing-throughput tuning - Read scripts under
skills/literag/scripts/only when editing behavior or diagnosing bugs
Slash / user-invocable usage
When invoked as /literag ..., parse the remaining argument string as a subcommand.
Supported forms:
/literag search \x3Clibrary> \x3Cquery>/literag inspect \x3Clibrary> \x3Cpath> [--start N --end N]/literag index \x3Clibrary> [--limit-files N] [--embedding-batch-size N]/literag index-all [--limit-files N] [--embedding-batch-size N]/literag status \x3Clibrary>/literag meta \x3Clibrary>/literag benchmark \x3Clibrary> --query ...
If the user gives a natural-language request instead of a strict subcommand, translate it to the nearest supported operation instead of being pedantic.
Supported commands
index_library.py— index one libraryindex_all.py— index all configured librariessearch_library.py— grouped hybrid/fts/vector retrievalinspect_result.py— expand a hit by file path + chunk rangestatus_library.py— show index health / compatibility / countsmeta_library.py— dump raw sqlitemetarecordsbenchmark_library.py— benchmark hybrid/fts/vector latency + hit shape across fixed query setsbin/literag— packaged CLI entrypoint for search / inspect / index / status / meta / benchmarkscripts/literag-query.py— query/search/inspect wrapperscripts/literag-index.py— index wrapper for one library or all librariesscripts/literag-status.py— status wrapperscripts/literag-meta.py— meta wrapperscripts/literag-benchmark.py— benchmark wrapperscripts/lq— tiny shell alias forliterag-query.py
Operating workflow
- Read
\x3Cworkspace>/.literag/knowledge-libs.json - Resolve the target library
- Run
search_library.pyfor grouped retrieval - If needed, run
inspect_result.pyon the top hit or chosen range - For quick operator use, prefer
scripts/literag-query.pyorscripts/lq - Use
scripts/literag-index.pywhen you need a short indexing entrypoint - Use
scripts/literag-status.pybefore debugging weird retrieval or after config changes - Use
scripts/literag-meta.pywhen you need the raw stored metadata - Use
scripts/literag-benchmark.pyorskills/literag/scripts/benchmark_library.pywhen you need repeatable retrieval latency / hit-shape comparisons - Keep LiteRAG separate from builtin memory unless the user explicitly wants a durable summary copied into workspace memory
Current intent
Use LiteRAG for:
- Blender manual + Blender Python reference
- Future blog/article/site knowledge bases
- Any large external docs where hybrid retrieval is needed without polluting builtin memory
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install literag - 安装完成后,直接呼叫该 Skill 的名称或使用
/literag触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
LiteRAG 是什么?
Local retrieval skill for large documentation corpora using independent SQLite knowledge libraries with keyword plus vector hybrid search. Use when searching... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 95 次。
如何安装 LiteRAG?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install literag」即可一键安装,无需额外配置。
LiteRAG 是免费的吗?
是的,LiteRAG 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
LiteRAG 支持哪些平台?
LiteRAG 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 LiteRAG?
由 Mozi Arasaka(@mozi1924)开发并维护,当前版本 v0.2.2。