---
name: raglite-2626b7702ad0
version: 1.0.0
description: "Local-first RAG cache: distill docs into structured Markdown, then index/query with Chroma + hybrid search (vector + keyword)."
metadata:
  {
    "openclaw": {
      "emoji": "🔎",
      "os": ["darwin", "linux"],
      "requires": { "bins": ["python3", "pip"] }
    }
  }
---

# RAGLite — a local RAG cache (not a memory replacement)

RAGLite is a **local-first RAG cache**.

It does **not** replace model memory or chat context. It gives your agent a durable place to store and retrieve information the model wasn’t trained on — especially useful for **local/private knowledge** (school work, personal notes, medical records, internal runbooks).

## Why it’s better than “paid RAG” / knowledge bases (for many use cases)

- **Local-first privacy:** keep sensitive data on your machine/network.
- **Open-source building blocks:** **Chroma** 🧠 + **ripgrep** ⚡ — no managed vector DB required.
- **Compression-before-embeddings:** distill first → less fluff/duplication → cheaper prompts + more reliable retrieval.
- **Auditable artifacts:** the distilled Markdown is human-readable and version-controllable.

If you later outgrow local, you can swap in a hosted DB — but you often don’t need to.

## What it does

### 1) Condense ✍️
Turns docs into structured Markdown outputs (low fluff, more “what matters”).

### 2) Index 🧠
Embeds the distilled outputs into a **Chroma** collection (one DB, many collections).

### 3) Query 🔎
Hybrid retrieval:
- vector similarity via Chroma
- keyword matches via ripgrep (`rg`)

## Default engine

This skill defaults to **OpenClaw** 🦞 for condensation unless you pass `--engine` explicitly.

## Prereqs

- **Python 3.11+**
- For indexing/query:
  - Chroma server reachable (default `http://127.0.0.1:8100`)
- For hybrid keyword search:
  - `rg` installed (`brew install ripgrep`)
- For OpenClaw engine:
  - OpenClaw Gateway `/v1/responses` reachable
  - `OPENCLAW_GATEWAY_TOKEN` set if your gateway requires auth

## Install (skill runtime)

This skill installs RAGLite into a skill-local venv:

```bash
./scripts/install.sh
```

It installs from GitHub:
- `git+https://github.com/VirajSanghvi1/raglite.git@main`

## Usage

### One-command pipeline (recommended)

```bash
./scripts/raglite.sh run /path/to/docs \
  --out ./raglite_out \
  --collection my-docs \
  --chroma-url http://127.0.0.1:8100 \
  --skip-existing \
  --skip-indexed \
  --nodes
```

### Query

```bash
./scripts/raglite.sh query ./raglite_out \
  --collection my-docs \
  --top-k 5 \
  --keyword-top-k 5 \
  "rollback procedure"
```

## Outputs (what gets written)

In `--out` you’ll see:
- `*.tool-summary.md`
- `*.execution-notes.md`
- optional: `*.outline.md`
- optional: `*/nodes/*.md` plus per-doc `*.index.md` and a root `index.md`
- metadata in `.raglite/` (cache, run stats, errors)

## Troubleshooting

- **Chroma not reachable** → check `--chroma-url`, and that Chroma is running.
- **No keyword results** → install ripgrep (`rg --version`).
- **OpenClaw engine errors** → ensure gateway is up and token env var is set.

## Pitch (for ClawHub listing)

RAGLite is a **local RAG cache** for repeated lookups.

When you (or your agent) keep re-searching for the same non-training data — local notes, school work, medical records, internal docs — RAGLite gives you a private, auditable library:

1) **Distill** to structured Markdown (compression-before-embeddings)
2) **Index** locally into Chroma
3) **Query** with hybrid retrieval (vector + keyword)

It doesn’t replace memory/context — it’s the place to store what you need again.


---
Source attribution: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/virajsanghvi1/raglite/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 clawdbot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/virajsanghvi1/raglite/SKILL.md
Attribution basis: Source repository record

Fields of work: Data & Analytics, Development & Engineering, Education & Research, Product Management
Roles: Data Analyst, ML / AI Engineer, Product Manager, Researcher, Technical Product Manager
Specialties: API, Backend
Tools: OpenAI API, Chroma, Ripgrep
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 86f5f19268be01ea1f7ea84c925efbb721c3841d7e4ac416b5134b190c52f4de
