From 0d6a76d89105b19ab83a730483d9b794c256f082 Mon Sep 17 00:00:00 2001 From: abab-dev <146825408+abab-dev@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:04:02 +0530 Subject: [PATCH] fix: rename add_episode to add_memory (#588) --- mcp_server/cursor_rules.md | 2 +- mcp_server/graphiti_mcp_server.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mcp_server/cursor_rules.md b/mcp_server/cursor_rules.md index 1d296c21..94ee479a 100644 --- a/mcp_server/cursor_rules.md +++ b/mcp_server/cursor_rules.md @@ -9,7 +9,7 @@ ### Always Save New or Updated Information -- **Capture requirements and preferences immediately:** When a user expresses a requirement or preference, use `add_episode` to store it right away. +- **Capture requirements and preferences immediately:** When a user expresses a requirement or preference, use `add_memory` to store it right away. - _Best practice:_ Split very long requirements into shorter, logical chunks. - **Be explicit if something is an update to existing knowledge.** Only add what's changed or new to the graph. - **Document procedures clearly:** When you discover how a user wants things done, record it as a procedure. diff --git a/mcp_server/graphiti_mcp_server.py b/mcp_server/graphiti_mcp_server.py index d60e2014..bada22f7 100644 --- a/mcp_server/graphiti_mcp_server.py +++ b/mcp_server/graphiti_mcp_server.py @@ -539,7 +539,7 @@ Facts contain temporal metadata, allowing you to track the time of creation and (superseded by new information). Key capabilities: -1. Add episodes (text, messages, or JSON) to the knowledge graph with the add_episode tool +1. Add episodes (text, messages, or JSON) to the knowledge graph with the add_memory tool 2. Search for nodes (entities) in the graph using natural language queries with search_nodes 3. Find relevant facts (relationships between entities) with search_facts 4. Retrieve specific entity edges or episodes by UUID @@ -707,7 +707,7 @@ async def add_memory( Examples: # Adding plain text content - add_episode( + add_memory( name="Company News", episode_body="Acme Corp announced a new product line today.", source="text", @@ -717,7 +717,7 @@ async def add_memory( # Adding structured JSON data # NOTE: episode_body must be a properly escaped JSON string. Note the triple backslashes - add_episode( + add_memory( name="Customer Profile", episode_body="{\\\"company\\\": {\\\"name\\\": \\\"Acme Technologies\\\"}, \\\"products\\\": [{\\\"id\\\": \\\"P001\\\", \\\"name\\\": \\\"CloudSync\\\"}, {\\\"id\\\": \\\"P002\\\", \\\"name\\\": \\\"DataMiner\\\"}]}", source="json", @@ -725,7 +725,7 @@ async def add_memory( ) # Adding message-style content - add_episode( + add_memory( name="Customer Conversation", episode_body="user: What's your return policy?\nassistant: You can return items within 30 days.", source="message",