LLM 代理的热感知内存层
necigit/Coral-Memory · 技能
LLM 代理的热感知内存层:三层热/温/冷存储、融合检索(向量余弦 + 关键字 Jaccard + 时间衰减)、带有 LLM-distill 钩子的基于热的驱逐、热重载配置。作为 DeepSeek Harness cordis 插件提供。 MIT,单个文件,仅限 numpy。
★ 0GitHub 星标
0分支
2026-08-17最近更新
Python开发语言
MIT许可证
项目简介
Mr. Code Muggle — hi guys, I made something fun to play with: fork it, break it, rebuild it — just maybe mention me (lol). The coral remembers what I can't. Questions? 📮 751286928@qq.com Shoutout to every open-source maker out there 🌱 功能区
蒸馏:相似记忆簇(Jaccard ≥ distillsimthreshold、簇 ≥ distillmincluster)交给 LLM 压缩成 一条 ≤80 字摘要(继承簇的热度/重要性),碎片记忆自动收敛。端点走 OpenAI 兼容 /chat/completions(urllib 零依赖),配置 llm 段(见配置参考)即启用; 未配置或调用失败时优雅降级为"不蒸馏",绝不阻断治理。注意:推理模型(如 deepseek-v4-)的 思考过程也占 maxtokens,本实现已用 1024 保证摘要必出。
治理余量让超容后的淘汰批量发生,而非每次 insert 全量治理(2 万压测:307.8s → 3.4s,90×)。 磁盘配额(storage.maxbytes,0 = 不限制):
安装命令
dsh plugin --profile web add github:necigit/Coral-Memory