Skip to content

Project memory search on the project-memory branch never sees what project memory Add writes #2648

Open

Description

@JunfengRan

Pre-submission checklist | 提交前检查

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

Problem Statement | 问题陈述

The project-memory branch (#2635) adds the project memory read path: memos.project_memory.index, RetrievalStore, ProjectRetrieval, schema.sql, and the /product/search (project and trajectory views), /product/get_memory, /product/get_memory/{id} and /product/get_message routes. That read path only reads its own tables: memos_project.pm_retrieval_roots / pm_retrieval_items / pm_retrieval_log, plus a space registry memos_project.pm_spaces / pm_domains that it expects another service to maintain. Writers must call index.replace_snapshot() and index.set_embedding() inside their own transaction.

Nothing on the branch writes those tables. The project memory Add pipeline (Episode acceptance, extraction, topic assignment, Default Topic Formation, entry merge and the OCC commit, all in PostgreSQL) keeps its committed Topics in its own schema. So with both pieces in one server:

  1. A member's messages are accepted by /product/add with allow_memory_view: ["project"] and are organized into a committed Topic.
  2. /product/search with include_memory_view: ["project"] returns no topics, /product/get_memory with space_id lists nothing, and /product/get_message returns 500 "Project message store is not configured".
  3. Spaces and domains created through the project memory space API are unknown to the read path, so it rejects them with SPACE_NOT_FOUND.

The two halves also collide when merged: both add memos/project_memory/store.py, both declare the project search fields on APISearchRequest, and the project memory plugin answers the same views through its own search hooks.

Requested capability: wire the Add writer into the retrieval read path, so a topic committed by Add is searchable and readable through the upstream endpoints in the same commit, and the space registry follows space and domain changes (create, rename, delete, clear). When the retrieval service is not configured, the existing plugin read path should keep working.

A second, smaller need: the retrieval time budgets (0.46 s per request, 0.10 s for the query embedding, 240 ms / 75 ms statement timeouts) are fixed. In a test or evaluation deployment where the database or embedding service is remote, every query embedding can time out and search silently degrades to lexical only. The budgets should be scalable from configuration, with production defaults unchanged.

Willingness to Implement | 实现意愿

  • I'm willing to implement this myself | 我愿意自己解决
  • I would like someone else to implement this | 我希望其他人来解决
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:pluginOpenClaw & Hermesstatus:needs-designNeeds design discussion before implementation | 开发前需要方案设计types:enhancementNew feature or improvement | 新功能或改进

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions