MemOS icon indicating copy to clipboard operation
MemOS copied to clipboard

feat: Introduce Standardized file_id in TextualMemoryMetadata for Streamlined Traceability

Open starsalwaysineyes opened this issue 10 months ago • 2 comments

Pre-submission checklist | 提交前检查

  • [x] I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
  • [x] I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
  • [x] This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题

Problem Statement | 问题陈述

The current TreeNodeTextualMemoryMetadata in MemOS uses a file_ids list to store document associations. While flexible, this structure poses challenges for retrieval-heavy workflows where a single, definitive source identifier (file_id) is essential for citation accuracy and effective document lifecycle management.

Currently, extracting the primary source document from search results requires parsing the nested SourceMessage list, adding unnecessary computational overhead for downstream API consumers, particularly during high-concurrency retrieval or metadata filtering. We propose standardizing a top-level file_id field within TextualMemoryMetadata and ensuring its consistent exposure in the APISearchResponse. This enhancement will improve MemOS's native support for source traceability and make it more compatible with standard RAG pipeline implementations.

Willingness to Implement | 实现意愿

  • [ ] I'm willing to implement this myself | 我愿意自己解决
  • [ ] I would like someone else to implement this | 我希望其他人来解决

starsalwaysineyes avatar Jan 21 '26 03:01 starsalwaysineyes

This issue has been automatically marked as stale due to inactivity.

github-actions[bot] avatar Feb 20 '26 04:02 github-actions[bot]

This issue has been automatically closed due to inactivity.

github-actions[bot] avatar Feb 28 '26 03:02 github-actions[bot]