360 Secure SkillHub
360 安全技能中心

anythingllm-rag

该 Skill 提供 Bash 脚本,通过 AnythingLLM 的 RAG API 查询本地或私有文档、上传文件与原始文本、列出已上传文档并检查 API 健康状态。需配置服务地址、API 密钥和工作区,查询结果返回答案文本与来源文档引用。

tianmaomao
tianmaomao
热度 74.88
最近更新 2026-05-18 12:29:59
分类:知识依赖:代码执行 / 读写文件 / 第三方 API应用场景:研究 / 摘要总结

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add anythingllm-rag
Metadata
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:3001
  • ANYTHINGLLM_API_KEY — API token
  • ANYTHINGLLM_WORKSPACE — default workspace slug

Script location: scripts/anythingllm.sh

When to Use

Use AnythingLLM RAG when:

  • User asks about their local/private documents
  • User wants to search uploaded PDFs, DOCX, TXT files
  • User asks "what does X document say about Y"
  • User wants to upload documents to the knowledge base

Use default model when:

  • General knowledge questions
  • Questions not related to local documents
  • Coding, writing, analysis without document context

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 answer
  • sources — array of source documents used for context

Present the answer to the user, citing relevant sources when available.

Notes

  • Scripts are in the skill's scripts/ directory — use paths relative to skill location
  • API key and workspace are pre-configured
  • For PDF/DOCX queries, documents must be uploaded first