360 Secure SkillHub
360 安全技能中心

LightRAG Search Skill

读取 ~/.lightrag_config.json 中配置的多个 LightRAG 服务器,调用 scripts/query_lightrag.py 以 local/global/hybrid/mix/naive 模式检索知识库,支持 --only-context 输出纯上下文,供写作等后续任务使用。

ruslanlanket
ruslanlanket
热度 67.54
最近更新 2026-05-17 11:11:05
分类:知识依赖:代码执行 / 第三方 API / 读写文件应用场景:研究 / 笔记整理 / 工作流

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add lightrag
Metadata
name
lightrag
description
Search and manage knowledge bases using LightRAG API. Supports multiple servers, context-aware writing, and direct information retrieval. Use when the user wants to query a LightRAG-powered knowledge base or use it as context for tasks.

LightRAG Skill

This skill allows you to interact with one or more LightRAG API servers. You can perform queries in various modes (local, global, hybrid, mix, naive) and use the retrieved context for further processing.

Configuration

The skill uses a configuration file at ~/.lightrag_config.json to store server details. Format:

{
  "servers": {
    "alias1": {
      "url": "http://server1:9621",
      "api_key": "optional_key"
    },
    "alias2": {
      "url": "http://server2:9621",
      "api_key": "optional_key"
    }
  },
  "default_server": "alias1"
}

Workflows

1. Direct Search

To find information, use scripts/query_lightrag.py. Modes: local, global, hybrid, mix, naive.

2. Using Context for Writing

To use a knowledge base as context (e.g., for a test or article):

  1. Run query_lightrag.py with the --only-context flag.
  2. Pass the resulting context to your writing task/model.

Reference

See API_DOCS.md for endpoint details.