Skip to content

fix: dont create skill everytime #1769

Closed
Closed

Description

@hijzy

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 的,而不是一般软件问题

Bug Description | 问题描述

Don't create skill everytime

How to Reproduce | 如何重现

memory add

Environment | 环境信息

python3.13

Additional Context | 其他信息

No response

Willingness to Implement | 实现意愿

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

Activity

  1. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

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

  2. added
    status:staleAuto-marked stale after 30d inactivity; closes 7d later unless exempt.
    on Jul 3, 2026
  3. added
    status:in-progressSomeone or AI is working on it | 人工或 AI 正在处理
    area:memory记忆存储、检索、更新、召回逻辑
    and removed
    types:bugSomething isn't working | 功能异常
    status:staleAuto-marked stale after 30d inactivity; closes 7d later unless exempt.
    area:coreMOS 编排层 / 框架底座 / 跨模块问题
    on Jul 7, 2026
  4. added theissue type on Jul 7, 2026
  5. removed
    status:in-progressSomeone or AI is working on it | 人工或 AI 正在处理
    on Jul 16, 2026
  6. shinetata commented on Jul 16, 2026

    @shinetata
    Collaborator

    Resolved by #1770 (commit 16eeaa4c), merged on 2026-05-20 — the same day this issue was filed.

    Cause / 原因: process_skill_memory_fine triggered SkillMemory extraction on every add, even for ordinary conversations with little or no tool usage. / 之前每次 add 都会抽取技能记忆,即便对话中几乎没有工具调用。

    Fix / 修复: skill extraction is now skipped when the conversation contains fewer than 5 tool-role messages, so a normal memory add no longer creates a skill (SkillMemory is meant to be distilled from multi-round tool-using tasks). / 现在当对话中 role=="tool" 的消息少于 5 条时跳过抽取,普通 memory add 不再创建技能记忆(技能记忆本应从多轮工具调用任务中提炼)。

    tool_rounds = sum(1 for message in messages if message.get("role") == "tool")
    if tool_rounds < 5:
        logger.info(f"[PROCESS_SKILLS] Skip skill extraction: tool rounds {tool_rounds} < 5")
        return []

    The fix is live on main (src/memos/mem_reader/read_skill_memory/process_skill_memory.py). This issue stayed open only because the PR was merged into a dev branch, so GitHub never auto-closed it. Closing as completed. / 修复已在 main 生效;本 Issue 未自动关闭是因为 PR 当时合入的是 dev 分支。现关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:memory记忆存储、检索、更新、召回逻辑

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions