--- title: "What is a memory graph?" description: "A memory graph stores agent knowledge as entities and dated relationships. Definition, contrast with vector stores, and the temporal variant." canonical: https://past.dev/glossary/memory-graph last-updated: 2026-10-17 --- # What is a memory graph? Source: https://past.dev/glossary/memory-graph A memory graph stores an agent's knowledge as entities and dated relationships rather than as isolated text chunks. Each node is a person, organization, or subject; each edge is a fact connecting them, carrying the time it applies to. Because the structure is explicit, a query can follow relationships and filter by date rather than matching similar text alone. ## How a memory graph works A memory graph is built from ingested text rather than modeled by hand. Extraction turns each record into facts, [entity resolution](/glossary/entity-resolution) links the subjects of those facts to existing nodes, and each fact becomes a dated edge between nodes. A plain knowledge graph stores what is currently true, while a [temporal knowledge graph](/glossary/temporal-knowledge-graph) also records when each fact became valid, when it stopped being valid, and which fact replaced it. Memory graphs for agents are usually temporal, because the subjects they track change: owners rotate, prices move, policies get revised. Construction techniques and query patterns are covered in [knowledge graphs for LLMs](/knowledge-graph-for-llm). ## Memory graph vs vector store | Property | Vector store | Memory graph | | --- | --- | --- | | What is stored | Text chunks with embeddings | Entities and dated facts | | How retrieval works | Similarity to the query | Relationships, dates, and filters | | What an update does | A new chunk is added beside the old one | The old fact's validity window closes; the new fact links to it | The two are complementary. [Vector memory](/glossary/vector-memory) finds text that resembles the question; a graph answers questions about structure and time, such as who owned an account in March. Hybrid systems use both signals. ## A memory graph in practice An agent ingests three records about Meridian Health. A January 8 email names Dana Whitfield as the account owner. A March 3 note records that the contract renews on October 1. A June 11 transcript records Dana handing the account to Tomas Rivera. The graph stores one Meridian Health node, one node per person, and dated edges: an ownership edge for Dana valid from January 8 to June 11, an ownership edge for Tomas valid from June 11, and a renewal fact recorded on March 3. A July query for the current owner returns Tomas with the June 11 handoff as evidence, and a query about March returns Dana. This example describes a general graph design. The past.dev [quickstart](/docs/memory-api/quickstart) describes the product through its public contract. ## Related concepts - **[Temporal knowledge graph](/glossary/temporal-knowledge-graph)**: the time-aware graph model most memory graphs use. - **[Vector memory](/glossary/vector-memory)**: similarity-based storage, the usual alternative or companion. - **[Fact supersession](/glossary/fact-supersession)**: how a changed fact replaces its predecessor inside the graph. - **[Entity resolution](/glossary/entity-resolution)**: how references across records land on the same node. ## Frequently asked questions ### What is a memory graph in AI? It is a way of storing an agent's long-term memory as a graph: entities as nodes, facts as dated relationships between them. Retrieval follows structure and dates instead of relying only on text similarity. ### How is a memory graph different from a vector database? A vector database stores text chunks and retrieves by semantic similarity. A memory graph stores entities and dated facts, so it can answer who is connected to what, as of which date, and what changed. ### What is the difference between a memory graph and a knowledge graph? A memory graph is a knowledge graph used as an agent's memory. It is usually built automatically from ingested text and extended with timestamps so facts can be superseded rather than overwritten. ## Related - [What is a temporal knowledge graph?](https://past.dev/glossary/temporal-knowledge-graph) - [What is vector memory?](https://past.dev/glossary/vector-memory) - [What is entity resolution?](https://past.dev/glossary/entity-resolution) - [Facts that change over time](https://past.dev/guides/facts-that-change-over-time) - [Benchmark methodology](https://past.dev/benchmarks/methodology)