2 Commits

Author SHA1 Message Date
f5940c55f7 Add instructions for Nova to query RAG directly
The memory_search tool requires external API keys (OpenAI/Google/Voyage)
which are not configured. This documents that Nova should use the RAG
scripts directly via command line instead.
2026-02-20 01:45:38 +00:00
476d7eec2d v1.0.7: Fixed session_key bug in chunk_messages() 2026-02-14 18:47:57 +00:00
4 changed files with 44 additions and 2 deletions

View File

@@ -2,6 +2,20 @@
All notable changes to the OpenClaw RAG Knowledge System will be documented in this file.
## [1.0.7] - 2026-02-14
### Fixed
- **Bug in chunk_messages()**: Fixed undefined variable `session_key` referenced in metadata generation
- Added `session_key` parameter to `chunk_messages()` function signature
- Fixed bug identified in ClawHub security scan report
- Pass `session_key` from ingestion loop to chunk_messages() call
- Resolves scope issue where function referenced non-existent variable
### Security
- Fixes code quality issue identified in security scan (bug in implementation)
---
## [1.0.6] - 2026-02-14
### Changed

View File

@@ -18,6 +18,32 @@ This skill provides a complete RAG (Retrieval-Augmented Generation) system for O
- 💾 Local ChromaDB storage (no API keys required)
- 🚀 Automatic AI integration retrieves context transparently
## For Nova (AI Assistant) - How to Query RAG
**IMPORTANT:** The `memory_search` tool in OpenClaw is a SEPARATE system that requires external API keys (OpenAI/Google/Voyage). Do NOT use it.
**Use the RAG skill scripts directly:**
```bash
# Quick search (returns top 10 results)
python3 ~/.openclaw/workspace/skills/rag-openclaw/rag_query.py "your search query"
# Search with type filter
python3 ~/.openclaw/workspace/skills/rag-openclaw/rag_query.py "SIP voip" --type session
python3 ~/.openclaw/workspace/skills/rag-openclaw/rag_query.py "porkbun DNS" --type skill
# Check what's indexed
python3 ~/.openclaw/workspace/skills/rag-openclaw/rag_manage.py stats
```
**When to use RAG:**
- Before answering questions about past work, decisions, or context
- When the user says "remember when..." or "we set up..."
- When you need to recall configurations, credentials, or setup details
- Whendebugging - search for how similar issues were solved before
The RAG uses local embeddings (all-MiniLM-L6-v2) and requires no external API keys.
## Installation
### Prerequisites

View File

@@ -127,6 +127,7 @@ def format_content(content) -> str:
def chunk_messages(
messages: List[Dict],
session_key: str,
context_window: int = 20,
overlap: int = 5
) -> List[Dict]:
@@ -135,6 +136,7 @@ def chunk_messages(
Args:
messages: List of message objects
session_key: Session identifier for metadata
context_window: Messages per chunk
overlap: Message overlap between chunks
@@ -244,7 +246,7 @@ def ingest_sessions(
print(f" Messages: {len(messages)}")
# Chunk messages
chunks = chunk_messages(messages, chunk_size, chunk_overlap)
chunks = chunk_messages(messages, session_key, chunk_size, chunk_overlap)
if not chunks:
print(f" ⚠️ No valid chunks, skipping")

View File

@@ -1,6 +1,6 @@
{
"name": "rag-openclaw",
"version": "1.0.6",
"version": "1.0.7",
"description": "RAG Knowledge System for OpenClaw - Semantic search across chat history, code, docs, and skills with automatic memory retrieval",
"homepage": "https://openclaw-rag-skill.projects.theta42.com",
"author": {