360 Secure SkillHub
360 安全技能中心

Marrs

面向任意 RAG/向量数据库的记忆维护工具包:提供 save_memory() 写入助手、监控与碎片整理脚本模板、热队列逻辑和可编辑的默认配置;用户需自行填写服务地址并创建定时任务。

agenthyjack
agenthyjack
热度 47.61
最近更新 2026-05-11 17:41:28
分类:知识依赖:代码执行 / 第三方 API / 读写文件应用场景:笔记整理 / 工作流 / 自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add marrs
Metadata
name
marrs
description
Memory maintenance helper for any RAG/vector database. Includes save_memory() helper, monitor and defrag script templates, hot queue support, and configurable defaults. Declares 'requests' dependency. Fully generic, safe, and configurable once you edit the config. Accurate description of all contents.

marrs

Memory maintenance helper for any RAG/vector database.

Complete Setup Guide (so it works for any user)

  1. Install via ClawHub or copy the folder.
  2. pip install requests (the only external dependency).
  3. Edit scripts/config.py with your own RAG details (examples are placeholders only).
  4. Create two scheduled jobs to run the monitor and defrag scripts (see your platform's cron/docs).
  5. Test with the example in the Basic Usage section below.

Review the three small Python scripts before use — they are short and easy to audit.

Configuration (scripts/config.py)

RAG_URL = "http://your-rag-server:port"   # ← Replace with your own
DEFAULT_COLLECTION = "memory"             # Change to your main collection
MONITOR_INTERVAL_SECONDS = 300
DEFRAG_INTERVAL_SECONDS = 86400

Basic Usage

from scripts.save_memory import save_memory

save_memory("Your content here", collection="your-collection")

What it contains

  • save_memory() helper that POSTs to your RAG /ingest endpoint
  • Template scripts for monitor and defrag (background maintenance)
  • Hot queue logic for fast retrieval of frequent items
  • Configurable defaults (you must edit them)

No hardcoded paths, no internal systems, no credentials.

Security Notes

  • Only interacts with the RAG_URL you configure.
  • Uses the 'requests' library (installed separately).
  • Prints status messages to stdout (visible in your logs).
  • The crons you create will run the scripts autonomously — only add them if you trust the code after review.
  • Recommended: run the scripts in an isolated environment first.

This package is instruction + runnable scripts. The SKILL.md accurately describes everything it contains. No private data, no keys, no tokens, no names, no locations.

Version: 1.5.0 Status: Honest metadata, declared dependency, clear audit instructions. Clean for public use.