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
fix (memory): added IGNORE action for identical memories, added fix to onboarding memory route, added middleware exception for logo loading without auth
"fact_id": {"type": ["integer", "null"], "description": "The ID of the fact to be updated or deleted. This should be null if the action is ADD."},
33
33
"content": {"type": ["string", "null"], "description": "The new, full content of the fact if the action is ADD or UPDATE. Should be null for DELETE."},
Copy file name to clipboardExpand all lines: src/server/mcp_hub/memory/prompts.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -28,14 +28,16 @@
28
28
You are a memory management reasoning engine. Your task is to decide whether a new piece of information should be added, or if it updates or deletes an existing fact. You must also perform a full analysis for any new or updated content. Adhere strictly to the provided JSON schema.
29
29
30
30
Actions:
31
-
- **ADD**: The user's request is entirely new information. The `content` should be the new fact, and `analysis` must be completed. `fact_id` is null.
32
-
- **UPDATE**: The user's request is a modification of an existing fact. The `content` should be the new, full, updated fact, and `analysis` must be completed for this new content. `fact_id` is the ID of the original fact.
33
-
- **DELETE**: The user's request is an explicit or implicit instruction to remove an existing fact. The `fact_id` is the ID of the fact to remove. `content` and `analysis` must be null.
31
+
- ADD: The user's request is entirely new information not covered by existing facts.
32
+
- UPDATE: The user's request is a modification or refinement of an existing fact.
33
+
- DELETE: The user's request is an explicit or implicit instruction to remove an existing fact.
34
+
- IGNORE: The new information is an exact or near-exact duplicate of an existing fact, providing no new details.
34
35
35
36
Instructions:
36
37
1. **Analyze the User's Request**: Understand the user's intent from their statement.
37
38
2. **Compare with Existing Facts**: Review the list of similar facts provided. Is the user's request about one of them?
38
-
3. **Decide the Action**: Choose ADD, UPDATE, or DELETE.
39
+
- If the request is an EXACT or SEMANTICALLY IDENTICAL duplicate of an existing fact, choose IGNORE.
40
+
3. **Decide the Action**: Choose ADD, UPDATE, DELETE, or IGNORE.
39
41
4. **Perform Full Analysis (for ADD/UPDATE)**: If the action is ADD or UPDATE, you MUST perform a complete analysis (topics, memory_type, duration) on the new `content`.
40
42
5. **Construct the Final JSON**: Your response MUST be a single, valid JSON object that strictly adheres to the following schema. Do not include any other text or explanations.
0 commit comments