You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### ## Description
Please include a summary of the change, the problem it solves, the
implementation approach, and relevant context. List any dependencies
required for this change.
Related Issue (Required): Fixes #issue_number
## Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Refactor (does not change functionality, e.g. code style
improvements, linting)
- [ ] Documentation update
## How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
- [ ] Unit Test
- [ ] Test Script Or Test Steps (please provide)
- [ ] Pipeline Automated API Test (please provide)
## Checklist
- [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码
- [ ] I have commented my code in hard-to-understand areas |
我已在难以理解的地方对代码进行了注释
- [ ] I have added tests that prove my fix is effective or that my
feature works | 我已添加测试以证明我的修复有效或功能正常
- [ ] I have created related documentation issue/PR in
[MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) |
我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档
issue/PR(如果适用)
- [ ] I have linked the issue to this PR (if applicable) | 我已将 issue
链接到此 PR(如果适用)
- [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR
的人
## Reviewer Checklist
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] Made sure Checks passed
- [ ] Tests have been provided
constOPENCLAW_TASK_SUMMARY_PROMPT=`You create a DETAILED task summary from a multi-turn conversation. This summary will be the ONLY record of this conversation, so it must preserve ALL important information.
636
-
637
-
CRITICAL LANGUAGE RULE: You MUST write in the SAME language as the user's messages. Chinese input → Chinese output. English input → English output. NEVER mix languages.
638
-
639
-
Output EXACTLY this structure:
640
-
641
-
📌 Title
642
-
A short, descriptive title (10-30 characters). Like a chat group name.
643
-
644
-
🎯 Goal
645
-
One sentence: what the user wanted to accomplish.
646
-
647
-
📋 Key Steps
648
-
- Describe each meaningful step in detail
649
-
- Include the ACTUAL content produced: code snippets, commands, config blocks, formulas, key paragraphs
650
-
- For code: include the function signature and core logic (up to ~30 lines per block), use fenced code blocks
651
-
- For configs: include the actual config values and structure
652
-
- For lists/instructions: include the actual items, not just "provided a list"
653
-
- Merge only truly trivial back-and-forth (like "ok" / "sure")
654
-
- Do NOT over-summarize: "provided a function" is BAD; show the actual function
655
-
656
-
✅ Result
657
-
What was the final outcome? Include the final version of any code/config/content produced.
658
-
659
-
💡 Key Details
660
-
- Decisions made, trade-offs discussed, caveats noted, alternative approaches mentioned
661
-
- Specific values: numbers, versions, thresholds, URLs, file paths, model names
662
-
- Omit this section only if there truly are no noteworthy details
663
-
664
-
RULES:
665
-
- This summary is a KNOWLEDGE BASE ENTRY, not a brief note. Be thorough.
- DISCARD only: greetings, filler, the assistant explaining what it will do before doing it
668
-
- Replace secrets (API keys, tokens, passwords) with [REDACTED]
669
-
- Target length: 30-50% of the original conversation length. Longer conversations need longer summaries.
670
-
- Output summary only, no preamble.`;
671
-
672
-
constOPENCLAW_TOPIC_JUDGE_PROMPT=`You are a conversation topic boundary detector. Given a summary of the CURRENT conversation and a NEW user message, determine if the new message starts a DIFFERENT topic/task.
673
-
674
-
Answer ONLY "NEW" or "SAME".
675
-
676
-
Rules:
677
-
- "NEW" = the new message is about a completely different subject, project, or task
678
-
- "SAME" = the new message continues, follows up on, or is closely related to the current topic
679
-
- Follow-up questions, clarifications, refinements, bug fixes, or next steps on the same task = SAME
680
-
- Greetings or meta-questions like "你好" or "谢谢" without new substance = SAME
681
-
- A clearly unrelated request (e.g., current topic is deployment, new message asks about cooking) = NEW
682
-
683
-
Output exactly one word: NEW or SAME`;
684
-
685
-
constOPENCLAW_FILTER_RELEVANT_PROMPT=`You are a memory relevance judge. Given a user's QUERY and a list of CANDIDATE memory summaries, do two things:
686
-
687
-
1. Select ALL candidates that could be useful for answering the query. When in doubt, INCLUDE the candidate.
688
-
- For questions about lists, history, or "what/where/who" across multiple items, include ALL matching items.
689
-
- For factual lookups, a single direct answer is enough.
690
-
2. Judge whether the selected memories are SUFFICIENT to fully answer the query WITHOUT fetching additional context.
691
-
692
-
IMPORTANT for "sufficient" judgment:
693
-
- sufficient=true ONLY when the memories contain a concrete ANSWER, fact, decision, or actionable information that directly addresses the query.
694
-
- sufficient=false when the memories only repeat the question, show related topics but lack the specific detail, or contain partial information.
695
-
696
-
Output a JSON object with exactly two fields:
697
-
{"relevant":[1,3,5],"sufficient":true}
698
-
699
-
- "relevant": array of candidate numbers that are useful. Empty array [] if none are relevant.
700
-
- "sufficient": true ONLY if the memories contain a direct answer; false otherwise.
701
-
702
-
Output ONLY the JSON object, nothing else.`;
703
-
704
-
constOPENCLAW_DEDUP_JUDGE_PROMPT=`You are a memory deduplication system. Given a NEW memory summary and several EXISTING memory summaries, determine the relationship.
705
-
706
-
For each EXISTING memory, the NEW memory is either:
707
-
- "DUPLICATE": NEW is fully covered by an EXISTING memory — no new information at all
708
-
- "UPDATE": NEW contains information that supplements or updates an EXISTING memory (new data, status change, additional detail)
709
-
- "NEW": NEW is a different topic/event despite surface similarity
710
-
711
-
Pick the BEST match among all candidates. If none match well, choose "NEW".
712
-
713
-
Output a single JSON object:
714
-
- If DUPLICATE: {"action":"DUPLICATE","targetIndex":2,"reason":"..."}
715
-
- If UPDATE: {"action":"UPDATE","targetIndex":3,"reason":"...","mergedSummary":"a combined summary preserving all info from both old and new, same language as input"}
716
-
- If NEW: {"action":"NEW","reason":"..."}
717
-
718
-
CRITICAL: mergedSummary must use the SAME language as the input. Output ONLY the JSON object.`;
0 commit comments