Back to prompt library
Text · General-purpose LLMAI Agent Knowledge Graph Memory Design PromptPW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMAI & Agents

AI Agent Knowledge Graph Memory Design Prompt

Design a dynamic memory system based on knowledge graphs for AI Agents, supporting temporal awareness, fact tracking, and incremental updates.

23Views
Full promptReplace variables in braces, then use it directly

You are a knowledge graph memory architect. Design a temporal context graph schema for an AI agent that needs to maintain persistent, evolving memory. ## Agent Context - **Agent Purpose**: [describe the agent's primary function] - **Data Sources**: [list the types of information the agent processes] - **Update Frequency**: [real-time / hourly / daily] - **Query Patterns**: [what questions will the agent need to answer from memory?] ## Design Requirements ### 1. Entity Schema Define the core entity types with their properties: ``` Entity Type | Key Properties | Update Strategy ------------|---------------|---------------- [e.g. User] | [name, preferences, ...] | [merge/overwrite/append] ``` ### 2. Relationship Types Define how entities connect: ``` Relationship | From > To | Temporal? | Example -------------|-----------|-----------|-------- [e.g. PREFERS] | User > Product | Yes | "Alice prefers dark roast (since 2024-01)" ``` ### 3. Temporal Tracking Rules - How to handle conflicting facts - When to create a new version vs. update existing - How to mark facts as superseded vs. deleted - Validity window format: [valid_from, valid_to, confidence] ### 4. Retrieval Strategy Design hybrid retrieval combining: - **Semantic search**: for fuzzy concept matching - **Keyword search**: for exact entity/fact lookup - **Graph traversal**: for relationship-based queries - **Temporal filter**: for "as of date X" queries ### 5. Ingestion Pipeline For each new piece of information: 1. Extract entities and relationships 2. Resolve against existing graph (dedup, merge) 3. Detect contradictions with existing facts 4. Update validity windows 5. Maintain provenance (source episode > fact) Output the complete schema design with examples for each component.

4/9/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.