Skip to content

Long Term Memory: add time and source to knowdledge atoms

Extend the Neo4J knowledge graph

  • add time properties to nodes and relations (created_on, modified_on)
  • add source properties to nodes and relations: name of the document, 'store' user command
  • fill in these new properties into the responses
  • allow queries like "what did you learn on 12.04.25?"

Graphiti

Graphiti is a framework for building and querying temporally-aware knowledge graphs, specifically tailored for AI agents operating in dynamic environments. Unlike traditional retrieval-augmented generation (RAG) methods, Graphiti continuously integrates user interactions, structured and unstructured enterprise data, and external information into a coherent, queryable graph.

Key concepts:

  1. Temporal Knowledge Graphs
  2. Incremental Updates / Episodic Ingestion
  3. Hybrid Retrieval / Search
  4. MCP server

Major usecase : Agent Memory

image.png

Tasks

Creation of Knowledge Graph

  • add_episode - Episodes represent a single data ingestion event. An episode is itself a node, and any nodes identified while ingesting the episode are related to the episode via MENTIONS edges.

    Supported episode types: text, message,json

    Graphiti automatically:

    • Chunks the text
    • Extracts entities + relationships
    • Cleans and normalizes them
    • Stores them in Neo4j
    • Creates embeddings per node

Create a test node in AI-Builder ( wip )

  • search -
    • Perform a hybrid search combining semantic similarity and BM25 retrieval
    • Perform a node search using _search method with standard recipes ( There are 15 receipes )

Explore different techniques ( wip )

References

  1. https://github.com/getzep/graphiti/tree/main
  2. https://help.getzep.com/graphiti/integrations/lang-graph-agent
  3. https://help.getzep.com/graphiti/core-concepts/adding-episodes
Edited by Sangamithra Panneer Selvam