# openclaw-docs-rag > Offline OpenClaw documentation with vector search and RAG capabilities - Author: Charpup - Repository: Charpup/openclaw-docs-rag - Version: 20260210035541 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-09 - Source: https://github.com/Charpup/openclaw-docs-rag - Web: https://mule.run/skillshub/@@Charpup/openclaw-docs-rag~openclaw-docs-rag:20260210035541 --- --- name: openclaw-docs-rag description: Offline OpenClaw documentation with vector search and RAG capabilities author: Galatea version: 1.0.0 --- # OpenClaw Docs RAG Query OpenClaw documentation using natural language and vector search. ## When to Use - Before executing tasks: Query relevant documentation for context - Learning OpenClaw: Find specific feature explanations - Troubleshooting: Search for error solutions and best practices ## Installation ```bash git clone https://github.com/Charpup/openclaw-docs-rag.git ~/.openclaw/skills/openclaw-docs-rag cd ~/.openclaw/skills/openclaw-docs-rag npm install ``` ## Setup 1. Set environment variables: ```bash export OPENAI_API_KEY="sk-..." # For embeddings export MEMU_DB_PASSWORD="..." # For vector store ``` 2. Initialize database: ```bash npm run init-db ``` 3. Sync documentation: ```bash npm run sync ``` ## Tools ### queryDocs Query OpenClaw documentation with natural language. **Usage:** ```bash ./query-docs.sh "how to configure cron jobs" ``` **Parameters:** - `query` (string, required): Search query - `top_k` (int, optional): Number of results (default: 5) **Returns:** - Relevant documentation chunks - Source URLs - Similarity scores ### syncDocs Sync documentation from docs.openclaw.ai. **Usage:** ```bash ./sync-docs.sh ``` **Parameters:** - `force` (boolean, optional): Force full re-sync (default: false) ## API Usage ```javascript const { queryDocs, syncDocs } = require('./index.js'); // Query const results = await queryDocs("cron jobs configuration", { topK: 5 }); // Sync await syncDocs({ force: true }); ``` ## Architecture - **Vector Store**: MemU PostgreSQL + pgvector - **Embeddings**: text-embedding-3-small (1536d) - **Chunk Size**: ~1000 tokens with overlap - **Query Latency**: <500ms (p95) ## License MIT