TOOL WIKI · MEMORY & STATE

FalkorDB

Provides a graph storage and query layer for connected data.

Download example files Code + setup + checks in a ZIP
Jump to a section 10 sections

EXAMPLE USE CASE

Read a preference from a tenant-qualified graph node

A returning user’s preference or an unfinished run needs an explicit owner, storage lifetime and recall rule.

Input
A scratch graph, tenant a, user u1 and format=bullets.
Expected output
The stored preference from a scoped read query.
  • Success check: The stored preference can be recalled for the intended user. Inspect the record and its source rather than only the generated answer.
  • Try a failure: Reuse the user ID under a different tenant and ensure it does not match this node.

Example scope: Actual graph write/read; extraction, history and retention are application policies.

Official reference · FalkorDB

WHAT IT ISGraph database
WHERE IT FITSMemory & state
SEE HOW THE SYSTEM FITS TOGETHERSELECT A COMPONENT
candidateretainqueryrecordscontextmaintainInteractionSubject + evidenceWrite policySelect and verifyFalkorDBGraph databaseRecall requestAuthenticated scopeContext builderRelevant selected factsLifecycle controlsCorrect, expire, delete
  1. Separate working conversation state from candidate long-term facts.

  2. Retain only permitted information and preserve where it came from.

  3. Building relationship-based context or a graph-backed memory service. Validate the graph model and the operations required by your memory framework.

  4. Use verified tenant and subject identifiers when retrieving memory.

  5. Choose useful records within the current context budget.

  6. Apply corrections and deletion to records, derived indexes, and caches.

FalkorDB

Building relationship-based context or a graph-backed memory service. Validate the graph model and the operations required by your memory framework.

Follow the arrows, then select a component to inspect its responsibility. On mobile, downward arrows connect the next step; bent arrows identify branches and return paths. Select a destination to jump to that component.

When to consider it

  • Building relationship-based context or a graph-backed memory service.

A design decision to make

  • Validate the graph model and the operations required by your memory framework.

Prerequisites and setup

  • Docker and a separate scratch graph. The demo port differs from the Redis example.
Shell
docker run --name asg-falkor -d -p 127.0.0.1:6381:6379 falkordb/falkordb
python3 -m venv .venv
source .venv/bin/activate
pip install FalkorDB

Try a small integration

memory.py

Python · memory.py
from falkordb import FalkorDB

graph = FalkorDB(host="localhost",port=6381).select_graph("asg_demo")
graph.query("MERGE (u:User {tenant:$tenant,id:$id}) SET u.format=$format",
    params={"tenant":"a","id":"u1","format":"bullets"})
result = graph.ro_query("MATCH (u:User {tenant:$tenant,id:$id}) RETURN u.format",
    params={"tenant":"a","id":"u1"})
print(result.result_set)

Run and check the result

Shell
python memory.py
  • The stored preference can be recalled for the intended user. Inspect the record and its source rather than only the generated answer.
  • A different user must not inherit this preference.

Common failures

  • Extraction acceptance does not establish immediate query visibility; inspect job/index state when results are empty.
  • Do not silently copy memory across users after a failed lookup.

Production decisions

  • Define allowed memory types, evidence/provenance, correction, expiry and user deletion before accepting automatic writes.
  • Derive user and tenant scope from authenticated application state. Test cross-user recall, expired facts and deletion from every derived index.
  • Separate graph namespaces or enforce resource filters consistently; a graph name supplied by the model is not an authorization decision.

Keep exploring

A layered architecture for agent memoryA context pipeline for a long-running agent

Explore the same layer

Mem0LettaZepGraphiti

Compare candidates on your own workload. This entry describes a product’s role; it is not a claim that products in the category are interchangeable.