Backend ServicesGraph memory
LLMSlim + Neo4j
Temporal agent memory where newer facts supersede old ones, with an audit trail.
Neo4jContextStore keeps tenant-scoped memories in Neo4j. When a fact changes, supersede() links the new memory to the one it replaces, so recall() returns only what is valid now while the history stays auditable. Recalled memories are untrusted context items for the planner.
1. Package installation
Install LLMSlim and the official Neo4j SDK using your package manager.
pip install 'llmslim[neo4j]'2. Architecture & execution flow
3. Production code pattern
from llmslim.integrations.neo4j import Neo4jContextStore
store = Neo4jContextStore.from_env(tenant_id="tenant-42")
old = await store.remember("customer.card_address", "Ship cards to Indiranagar, Bengaluru.")
await store.supersede(old.memory_id, "Ship cards to Koregaon Park, Pune.", reason="customer moved")
items = await store.recall(subject="customer.card_address")
# Only the current address comes back; pass items to plan_context(memories=items).4. Deployment best practices
5. Key optimization tips
Frequently asked questions
Troubleshooting
recall() returns an old fact
Record the change with supersede() rather than remember(); two memories on one subject are reported as conflicting until one supersedes the other.