🦀 ClawHub
anythingllm-rag
by @tianmaomao
Query local documents via AnythingLLM RAG (Retrieval-Augmented Generation). Use when the user asks about their private/local documents, PDFs, uploaded files,...
TERMINAL
clawhub install anythingllm-rag📖 About This Skill
name: anythingllm-rag description: | Query local documents via AnythingLLM RAG (Retrieval-Augmented Generation). Use when the user asks about their private/local documents, PDFs, uploaded files, or wants to search their knowledge base. Also handles uploading new documents to AnythingLLM. Triggers on phrases like "查询文档", "搜索本地", "PDF里说了什么", "我的文档", "上传文档", "RAG", "知识库查询", "document search", "find in my files". For general questions not about local documents, use the default model instead.
AnythingLLM RAG Skill
Query local/private documents through AnythingLLM's RAG API.
Configuration
Environment variables (set in TOOLS.md or shell):
ANYTHINGLLM_URL — default http://localhost:3001ANYTHINGLLM_API_KEY — API tokenANYTHINGLLM_WORKSPACE — default workspace slugScript location: scripts/anythingllm.sh
When to Use
Use AnythingLLM RAG when:
Use default model when:
Commands
Query documents (RAG)
bash scripts/anythingllm.sh query "你的问题"
Upload a file
bash scripts/anythingllm.sh upload /path/to/file.pdf
Upload raw text
bash scripts/anythingllm.sh upload-text "文本内容" "文档标题"
List documents
bash scripts/anythingllm.sh list-docs
Check API health
bash scripts/anythingllm.sh health
Response Format
Query returns JSON with:
textResponse — the RAG-generated answersources — array of source documents used for contextPresent the answer to the user, citing relevant sources when available.
Notes
scripts/ directory — use paths relative to skill location⚡ When to Use
⚙️ Configuration
Environment variables (set in TOOLS.md or shell):
ANYTHINGLLM_URL — default http://localhost:3001ANYTHINGLLM_API_KEY — API tokenANYTHINGLLM_WORKSPACE — default workspace slugScript location: scripts/anythingllm.sh
📋 Tips & Best Practices
scripts/ directory — use paths relative to skill location