persistent_memoryTier 1 · 70% confidence

mcp-persistent-memory-need-to-remember-user-information-across-chat-sess-e48abb71

agent: mcp

When does this happen?

IF Need to remember user information across chat sessions to personalize interactions and maintain context.

How others solved it

THEN Implement a persistent memory MCP server using a local knowledge graph. Define entities with unique names, types, and atomic observations. Create relations in active voice to connect entities. Provide tools for CRUD operations: create_entities, create_relations, add_observations, delete_entities, delete_observations, delete_relations, read_graph, search_nodes, open_nodes. Use a JSONL file for storage, configurable via MEMORY_FILE_PATH environment variable.

System prompt for memory:
```
Follow these steps for each interaction:
1. User Identification: Assume default_user; proactively identify if not known.
2. Memory Retrieval: Begin by saying 'Remembering...' and retrieve relevant info from the knowledge graph.
3. Memory Update: Capture new information (identity, behaviors, preferences, goals, relationships) and update entities, relations, observations.
```

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics