Skip to content

JiuwenMemory v0.1.2

Choose a tag to compare

@openjiuwen-release-bot openjiuwen-release-bot released this 02 Sep 08:00

JiuwenMemory v0.1.2 Release Notes

发布信息

版本:v0.1.2
发布日期:2026-09-02
项目仓库:https://github.com/openJiuwen-ai/agent-memory

版本简述

本次 v0.1.2 版本新增记忆服务化 RESTful API、冲突处理与遗忘机制、Docker 一键部署、数据库 SSL 连接、国密算法存储加密与过期记忆批量治理六大企业级能力;同时修复 36 项问题,覆盖记忆 CRUD 接口参数校验与并发安全、向量存储检索一致性(ES/Milvus)、mem_meta 过期记忆任务系统(建表竞态、MySQL 启动期死锁、时区口径漂移等)、file 后端稳定性、GaussDB 方言适配与连接池配置,并完成服务化平台配置治理与两轮代码扫描整改;同步完善批量删除与记忆遗忘相关接口文档,全面提升记忆引擎在多存储后端下的数据一致性与生产环境运行稳定性。本里程碑关联的 44 项 issue 已全部关闭。

🚀 新增特性

  1. 记忆服务化能力
    支持查询、监控、可视化等记忆服务化能力,对外提供 RESTful API,统一上层业务调用规范,降低记忆能力的接入与运维成本。(#259)
  2. 支持一键部署,服务 Docker 化
    提供 Docker 化一键部署方案,简化环境准备与服务安装流程,缩短从获取代码到服务可用的路径。(#258)
  3. 数据库连接支持 SSL 证书
    数据库连接新增 SSL 证书支持,保障数据传输链路安全,满足企业级安全合规要求。(#235)
  4. 记忆存储加密支持国密算法
    记忆存储加密算法扩展支持国密算法(SM 系列),满足国内合规场景下的数据加密要求。(#255)
  5. 冲突处理与遗忘机制支持
    支持双时序(创建/更新时间)、多种遗忘策略可配置,记忆版本可追溯与可视化,为记忆治理提供完善的冲突消解与生命周期管理能力。(#249)
  6. 过期记忆批量治理与阈值告警
    新增基于用户维度记忆条数的多级阈值告警、过期记忆批量删除与 VACUUM 空间回收机制,实现记忆存量的可持续治理,避免记忆无限膨胀。(#104)

📄 文档改进

  1. 补充批量删除过期记忆接口文档
    将"批量删除过期记忆"涉及的 4 个接口补充至官方 docs,完善接口说明与参数定义。(#166)
  2. 同步记忆遗忘特性接口文档
    将遗忘记忆特性新增及修改的接口同步至 docs,消除文档与代码不同步的问题。(#282)

🛠️ 问题修复

记忆 CRUD 接口校验与并发安全修复

  1. 修复 update_mem_by_id 对不存在的 mem_id 执行"先删后写"返回 200 但数据未持久化的问题
    补充 mem_id 存在性校验,杜绝假成功响应,保证更新操作的原子性与可观测性。(#251)
  2. 修复 update/delete_mem_by_id 对不存在或空 mem_id 无校验、盲走中期记忆 upsert/delete 的问题
    增加入参前置校验,消除假成功污染中期向量库或以误导性 [158004] 报错的情况。(#248)
  3. 修复 simple 后端 update_memories 为非原子 delete-then-add,并发更新同一 mem_id 必现 [158004] not found 的问题
    改造更新流程保证原子性,并发更新场景不再报记忆不存在。(#269)
  4. 修复 get_user_mem_by_page 响应缺失 source_id 字段导致记忆溯源链路断裂的问题
    补全响应字段,恢复完整的记忆溯源能力。(#231)
  5. 修复 add_messages 对空 content 返回 500 的问题
    增加参数合法性校验,空 content 按预期返回明确的业务错误而非服务端异常。(#213)
  6. 修复 get_message_by_id 对不存在 ID 返回 500 的问题
    按契约返回 200 且 "found": false,与查询类接口行为保持一致。(#211)
  7. 修复 get_user_mem_by_page 的 page_size 入参缺失校验的问题
    负值不再透传至底层引擎,避免 400 错误被误包装为 500。(#243)
  8. 修复 HTTP /add_messages/ 接口缺少 session_id 参数的问题
    补齐会话标识参数,保证消息与会话正确关联。(#242)
  9. 修复写入后分页列表数据不可见、删除全部记忆后仍可检索、更新后检索仍为旧值的问题
    修正记忆增删改后的索引刷新与可见性逻辑,保证读写一致性。(#240)
  10. 修复服务化平台使用过程中发现的多项问题
    集中修复服务化平台试用反馈的功能缺陷,提升服务化链路整体可用性。(#65)

向量存储与检索一致性修复

  1. 修复 batch_delete_mem 不删除 ES 向量库中期记忆的问题
    补齐 ES 中期记忆的删除链路,避免批量删除后向量库残留脏数据。(#250)
  2. 修复 get_user_mem_by_page 全类型分支 filters 对中期记忆子集失效的问题
    修正过滤条件下推逻辑,EQ(blacklisted=true) 等查询不再被中期记忆数据污染。(#246)
  3. 修复 Milvus 搜索时 output_fields 未正确包含 content 字段的问题
    补全查询输出字段,恢复所有 middle_term_memory 搜索的正确返回。(#212)
  4. 修复 Elasticsearch 后端 middle_term_memory 写入失败的问题
    _build_mappings 不再硬编码 dynamic: "strict",未声明字段不再被拒绝写入。(#234)
  5. 修复 get_user_mem_by_page 分页跨页返回重复记录并跳过部分记录的问题
    为 simple_memory_index 排序增加稳定次级键,不再依赖底层向量库不稳定的返回顺序。(#39)
  6. 修复 MilvusVectorStore.list_collection_names 绕过懒加载导致空库查询抛 AttributeError 的问题
    统一走 get_client() 懒加载入口,空库场景可正常返回空列表。(#76)
  7. 修复 delete_mem_by_user_id / delete_mem_by_scope 不清理 retrieve_history KV 的问题
    对齐删除契约,与 delete_mem_by_id 行为保持一致,避免检索历史残留。(#26)
  8. 修复 file 后端 search 混合检索中 FTS 停用词污染召回排序的问题
    修正全文检索分词处理,恢复混合检索的召回质量。(#36)
  9. 修复 async_gaussdb 跨事件循环连接池绑定及 ES 向量存储 schema 不匹配的问题
    修正异步连接池的生命周期管理,对齐 ES 向量存储 schema 定义。(#239)

记忆遗忘 / file 后端稳定性修复

  1. 修复 file 后端调用 search_user_mem 或 get_user_mem_by_page 直接抛异常的问题
    补齐 file 存储后端的检索与分页实现,接口在 file 后端下可正常使用。(#72)
  2. 修复 file_memory_index sqlite 写锁竞争导致 /health 探针超时的问题
    优化写事务持锁范围,长稳测试中 health 探针成功率恢复正常水平。(#37)

mem_meta 过期记忆任务系统修复

  1. 修复独立库首请求撞建表竞态的问题
    _init_db 不再 fire-and-forget,保证建表完成后才处理请求,消除首请求 refresh 500。(#210)
  2. 修复 mysql 组合启动期死锁的问题
    消除 cleanup_zombie_tasks 后台 UPDATE 与首请求 refresh INSERT 在 mem_meta_task 表上的死锁(错误码 1213)。(#206)
  3. 修复 mem_meta 表定义使用无长度 String、mysql 建表即 CompileError 的问题
    修正表定义并增加启动期建表失败感知,避免四接口全 500 且无告警。(#199)
  4. 修复并发提交 refresh 防重竞态的问题
    将 check-then-insert 改造为原子操作,双发请求不再同时 202 accepted 产生双任务。(#193)
  5. 修复僵尸任务 started_at=NULL 不清理导致 batch_delete 永久阻塞的问题
    补齐僵尸任务识别与回收逻辑,批量删除任务不再被异常任务卡死。(#191)
  6. 修复 force=true 跳过运行中任务检查导致并发冲突的问题
    强制提交时同样校验运行中任务,避免同 scope 并发任务互相踩踏。(#190)
  7. 修复时间口径的三个问题
    接口时间显式声明时区(替代 UTC 裸串)、替换弃用的 utcnow() 写法、修正记忆年龄计算时区混用导致的 30 天阈值 +8h 漂移。(#189)
  8. 修复 batch_delete scope 级删除失败被任务级状态掩盖的问题
    失败信息不再被终态 completed 吞掉,failed_count 如实反映各 scope 的删除结果。(#180)

数据库与 GaussDB 适配修复

  1. 修复 GaussDB 连接池缺少 pool_recycle / pool_size 配置的问题
    补全连接池参数,十万级数据量下 expired_memorys 接口不再因连接失效返回 500。(#192)
  2. 修复数据库使用 GaussDB 时 SQL 不支持现有 on conflict 语句的问题
    按 GaussDB 方言改写冲突处理 SQL,保障 GaussDB 部署形态下功能可用。(#238)
  3. 修复 gauss_dialect 导入路径写错的问题
    修正模块导入路径,消除 GaussDB 方言加载失败。(#237)

服务化平台配置与代码质量修复

  1. 修复服务化模板配置硬编码大模型的问题
    删除硬编码的模型配置,模型选择交由用户配置项管理,避免误导与污染。(#153)
  2. 修复 ModelClientConfig description 中出现公司名称敏感词的问题
    清理配置描述中的敏感词信息。(#148)
  3. 完成 Python 内核代码逻辑扫描整改
    依据静态扫描结果修复代码逻辑隐患,提升内核代码质量。(#194)
  4. 完成服务化平台代码扫描整改
    依据扫描结果修复服务化平台代码问题,提升服务化代码质量。(#188)

以上就是 JiuwenMemory v0.1.2 的完整更新内容!感谢您使用 JiuwenMemory!我们期待您的反馈和建议!🚀


JiuwenMemory v0.1.2 Release Notes (English)

Release Info

Version: v0.1.2
Release Date: Sep 2, 2026
Repository: https://github.com/openJiuwen-ai/agent-memory

Version Overview

This v0.1.2 release delivers six enterprise-grade capabilities: memory service with RESTful API, conflict handling & forgetting mechanisms, Docker-based one-click deployment, SSL-certified database connections, SM-series (Chinese national cryptography) storage encryption, and batch governance of expired memories with multi-level threshold alerts. It also resolves 36 defects covering memory CRUD parameter validation and concurrency safety, vector storage and retrieval consistency (ES/Milvus), the mem_meta expired-memory task system (table-creation race conditions, MySQL startup deadlocks, timezone drift, etc.), file backend stability, GaussDB dialect adaptation and connection pool configuration, along with service-platform configuration governance and two rounds of code-scan remediation. Documentation for the batch-delete and memory-forgetting APIs has also been completed. All 44 issues in this milestone are now closed.

🚀 New Features

  1. Memory-as-a-Service
    Support query, monitoring and visualization capabilities for memory services via RESTful API, standardizing upstream integration and reducing the cost of adopting and operating memory capabilities. (#259)
  2. One-Click Deployment with Docker
    Provide a Dockerized one-click deployment solution, simplifying environment preparation and service installation from code to a running service. (#258)
  3. SSL Certificate Support for Database Connections
    Add SSL certificate support for database connections to secure data-in-transit and meet enterprise security compliance requirements. (#235)
  4. SM-Series National Cryptography Support for Memory Encryption
    Extend memory storage encryption to support Chinese national cryptography algorithms (SM series) for domestic compliance scenarios. (#255)
  5. Conflict Handling & Forgetting Mechanisms
    Support dual timestamps (created/updated), configurable multi-strategy forgetting policies, and traceable, visualizable memory versions, providing complete conflict resolution and lifecycle management for memory governance. (#249)
  6. Batch Governance of Expired Memories with Threshold Alerts
    Introduce multi-level threshold alerts based on per-user memory counts, batch deletion of expired memories, and VACUUM space reclamation, enabling sustainable memory governance and preventing unbounded memory growth. (#104)

📄 Documentation Improvements

  1. Batch Delete APIs Documentation
    Document the 4 APIs involved in "batch delete of expired memories" in the official docs, completing API descriptions and parameter definitions. (#166)
  2. Memory Forgetting APIs Documentation Sync
    Sync the newly added and modified APIs of the memory forgetting feature into the docs, eliminating the doc-code inconsistency. (#282)

🛠️ Bug Fixes

Memory CRUD Validation & Concurrency Safety Fixes

  1. Fix update_mem_by_id returning 200 without persisting data for non-existent mem_id during "delete-then-write"
    Add mem_id existence validation to eliminate false-success responses and ensure atomic, observable updates. (#251)
  2. Fix missing validation on empty or non-existent mem_id in update/delete_mem_by_id blindly hitting middle-term memory upsert/delete
    Add pre-parameter validation to prevent false successes polluting the middle-term vector store or misleading [158004] errors. (#248)
  3. Fix non-atomic delete-then-add in simple backend update_memories causing inevitable [158004] not found on concurrent updates to the same mem_id
    Rework the update flow for atomicity; concurrent updates no longer report missing memories. (#269)
  4. Fix missing source_id field in get_user_mem_by_page response breaking the memory traceability chain
    Restore the complete memory traceability capability. (#231)
  5. Fix add_messages returning 500 on empty content
    Validate parameter legitimacy; empty content now returns an explicit business error instead of a server exception. (#213)
  6. Fix get_message_by_id returning 500 for non-existent IDs
    Return 200 with "found": false per the API contract, consistent with other query endpoints. (#211)
  7. Fix missing validation for the page_size parameter of get_user_mem_by_page
    Negative values are no longer passed through to the underlying engine, avoiding 400 errors being mis-wrapped as 500. (#243)
  8. Fix missing session_id parameter in the HTTP /add_messages/ API
    Add the session identifier to correctly associate messages with sessions. (#242)
  9. Fix data invisible in paginated lists after writing, still retrievable after deleting all memories, and stale values returned after updates
    Correct index refresh and visibility logic after memory create/update/delete to guarantee read-write consistency. (#240)
  10. Fix multiple issues found during service platform usage
    Consolidated fixes for functional defects reported during service platform trials, improving overall availability of the service path. (#65)

Vector Storage & Retrieval Consistency Fixes

  1. Fix batch_delete_mem not deleting middle-term memories from the ES vector store
    Complete the ES middle-term deletion path to avoid stale data remaining after batch deletion. (#250)
  2. Fix filters in the all-types branch of get_user_mem_by_page not applying to the middle-term subset
    Correct filter pushdown so queries like EQ(blacklisted=true) are no longer polluted by middle-term memory data. (#246)
  3. Fix Milvus search output_fields not including the content field
    Complete the output field list, restoring correct results for all middle_term_memory searches. (#212)
  4. Fix Elasticsearch backend middle_term_memory write failures
    _build_mappings no longer hardcodes dynamic: "strict"; undeclared fields are no longer rejected on write. (#234)
  5. Fix get_user_mem_by_page pagination returning duplicated records and skipping others across pages
    Add a stable secondary sort key to simple_memory_index, no longer relying on unstable vector store return order. (#39)
  6. Fix MilvusVectorStore.list_collection_names bypassing lazy loading and raising AttributeError on empty stores
    Route through the get_client() lazy-loading entry point; empty stores now return an empty list correctly. (#76)
  7. Fix delete_mem_by_user_id / delete_mem_by_scope not cleaning the retrieve_history KV store
    Align the deletion contract with delete_mem_by_id to avoid stale retrieval history. (#26)
  8. Fix FTS stop-word pollution in file backend hybrid search recall ranking
    Correct full-text tokenization to restore hybrid search recall quality. (#36)
  9. Fix async_gaussdb cross-event-loop connection pool binding and ES vector store schema mismatch
    Correct async connection pool lifecycle management and align the ES vector store schema. (#239)

Memory Forgetting / File Backend Stability Fixes

  1. Fix search_user_mem and get_user_mem_by_page raising exceptions on the file backend
    Implement search and pagination for the file storage backend; both APIs now work as expected. (#72)
  2. Fix file_memory_index sqlite write-lock contention causing /health probe timeouts
    Narrow write transaction lock scope; health probe success rate returns to normal in long-run stability tests. (#37)

mem_meta Expired-Memory Task System Fixes

  1. Fix first-request race against table creation on standalone databases
    _init_db is no longer fire-and-forget, guaranteeing tables are created before requests are handled, eliminating first-request refresh 500s. (#210)
  2. Fix MySQL startup deadlock between background and foreground tasks
    Eliminate the deadlock (error 1213) between the cleanup_zombie_tasks background UPDATE and the first-request refresh INSERT on the mem_meta_task table. (#206)
  3. Fix mem_meta table definitions using lengthless String types causing immediate CompileError on MySQL CREATE TABLE
    Correct table definitions and add startup-time table-creation failure detection, avoiding all four APIs returning 500 silently. (#199)
  4. Fix non-atomic check-then-insert race when submitting refresh tasks concurrently
    Make the check-and-insert atomic; duplicate submissions no longer both get 202 accepted and create duplicate tasks. (#193)
  5. Fix zombie tasks with started_at=NULL never being cleaned up, permanently blocking batch_delete
    Add zombie-task detection and reclamation so batch delete jobs are no longer stuck. (#191)
  6. Fix force=true skipping running-task checks and causing concurrency conflicts
    Validate running tasks even on forced submissions, preventing concurrent tasks from trampling each other within the same scope. (#190)
  7. Fix three time-handling defects
    Explicitly declare timezones in API responses (replacing bare UTC strings), replace deprecated utcnow() usage, and correct timezone mixing in memory-age calculation that caused +8h drift on the 30-day threshold. (#189)
  8. Fix batch_delete scope-level failures masked by task-level status
    Failures are no longer swallowed by the terminal completed state; failed_count now truthfully reflects per-scope deletion results. (#180)

Database & GaussDB Adaptation Fixes

  1. Fix missing pool_recycle / pool_size in the GaussDB connection pool
    Complete pool parameters; the expired_memorys API no longer returns 500 due to stale connections under 100k-level data volumes. (#192)
  2. Fix GaussDB not supporting the existing on conflict SQL syntax
    Rewrite conflict-handling SQL per the GaussDB dialect, ensuring feature availability under GaussDB deployments. (#238)
  3. Fix incorrect gauss_dialect import path
    Correct the module import path, eliminating GaussDB dialect loading failures. (#237)

Service Platform Configuration & Code Quality Fixes

  1. Fix hardcoded LLM configuration in service templates
    Remove hardcoded model configuration; model selection is now managed via user configuration, avoiding misleading defaults. (#153)
  2. Fix company-name sensitive words in ModelClientConfig description
    Clean up sensitive information in configuration descriptions. (#148)
  3. Python kernel code logic scan remediation
    Fix code logic defects identified by static scanning, improving kernel code quality. (#194)
  4. Service platform code scan remediation
    Fix issues identified by scanning, improving service platform code quality. (#188)

That's all for JiuwenMemory v0.1.2! Thank you for using JiuwenMemory — we look forward to your feedback and suggestions! 🚀