Skip to content

Releases: AmritaBot/plugin-memory

V0.2.7

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 15:07

Full Changelog: 0.2.6...0.2.7

V0.2.6

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 14:58

Full Changelog: 0.2.5...0.2.6

V0.2.5

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 14:46

Full Changelog: 0.2.4...0.2.5

V0.2.4

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 14:33

Full Changelog: 0.2.3...0.2.4

V0.2.3

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 14:25

Full Changelog: 0.2.2...0.2.3

V0.2.2.post1

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 14:10

好吧其实是打包问题

Full Changelog: 0.2.2...0.2.2.post1

V0.2.2

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 13:56

加载修复
Full Changelog: 0.2.1...0.2.2

V0.2.1

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 13:35

TOML序列化修复

Full Changelog: 0.2.0...0.2.1

V0.2.0

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 16 Jul 13:16

Amrita 长期记忆插件 v0.2.0 发行摘要

  • 核心变更:引入“潜意识推理循环”(Subconscious Reasoning Loop),实现后台自动整理记忆库,形成表层工具调用 + 底层常驻 Agent 的双层架构。

主要新特性

🔹 双层架构

  • 表层(Surface) – 现有 5 个 Function Calling 工具(write/read/update/delete/list_memory),按需调用,基于 ChromaDB 语义检索,支持群/用户分区隔离。
  • 底层(Subconscious) – 新增常驻后台 Agent,定时自动扫描、去重、合并、压缩记忆库,基于 Core Agent 框架 + Harness 模式复用 ChatObject 管线。

🔹 潜意识 Agent 核心能力

  • 自动整理 – LLM 驱动的去重、合并、标签补全、低质记忆清理。
  • 自调度 – Agent 通过 subconscious_iter_stop 控制下次运行时间,支持固定延迟或 ISO 时间戳。
  • 上下文压缩 – 运行前自动执行 Core MemoryLimiter,截断超限消息并生成摘要,通过 Jinja2 模板注入 prompt。
  • 膨胀感知 – ChromaDB 条目超过阈值时,自动在 prompt 中注入压缩提示。
  • 主动消息 – 可配置允许 Agent 向用户发送主动问候(需设置 allow_send_to_user)。
  • Token 统计 – 复用 Bot 全局 InsightsModel,无需额外维护。
  • 暂停/恢复 – 用户聊天时自动暂停推理循环,支持随机延迟唤醒,dump_interpreter() 实现毫秒级断点续推。

🔹 新增配置段 [subconscious]

[subconscious]
enabled = false               # 是否启用(默认关闭)
target_user_id = ""           # 目标用户 ID(必填)
max_iterations = 10           # 单轮最大 ReAct 步数
initial_delay_seconds = 60    # 启动后首次延迟
default_interval_seconds = 600# 默认循环间隔
pause_on_user_chat = true     # 用户聊天时自动暂停
allow_send_to_user = false    # 是否允许主动发消息
memory_warn_threshold = 100   # 记忆条数告警阈值
max_abstracts = 5             # 摘要滑动窗口大小
# ... 更多参数见文档

🔹 新增潜意识专用工具(10 个)

仅对 Subconscious Agent 可见,不暴露给对话 LLM:

  • subconscious_read_memory / write_memory / update_memory / delete_memory / list_memory – 记忆 CRUD(硬编码 user scope)
  • subconscious_iter_stop – 结束本轮,设置下次运行时间
  • subconscious_send_to_user – 生成并排队主动消息
  • subconscious_read_chat_context – 读取用户最近聊天记录
  • subconscious_duplicate_helper – 返回全部记忆 + LLM 合并指导 prompt(去重辅助)
  • subconscious_get_memory_stats – 统计概览(总量/重要性/标签/时间范围)

🔹 依赖更新

  • 新增 nonebot-plugin-apscheduler>=0.5.0(任务调度)

升级指南

  1. 更新插件uv add amrita_plugin_memory --upgrade
  2. 启用潜意识功能(实验性)
    • config/amrita_plugin_memory/config.toml 中设置 subconscious.enabled = true
    • 填写 target_user_id(仅支持单用户)
    • 按需调整其他参数
  3. 提示词模板:插件会自动在配置目录创建 subconscious_prompt.txtsubconscious_send_prompt.txt,可自定义。
  4. 注意:此功能为实验性,建议先在测试环境验证。

已知限制

  • 当前仅支持单目标用户(target_user_id 唯一)。
  • 主动消息需显式启用 allow_send_to_user
  • 与 Bot 现有角色设定(private_prompt_character)联动,自动注入。

致谢

感谢所有贡献者与测试用户。如有问题,请提交 Issue 至项目仓库。

发布标签v0.2.0
兼容 Amrita 版本>=1.3
兼容 Python3.10~3.13

Full Changelog: 0.1.6...0.2.0

V0.1.6

Choose a tag to compare

@JohnRichard4096 JohnRichard4096 released this 14 Jul 13:46

Full Changelog: 0.1.5...0.1.6