Agent Memory Graphs (Cognee, Zep Graphiti) vs. Deterministic Enterprise Business Ontology
Why LLM-extracted conversational and GraphRAG memory engines excel at episodic recall—and why live million-row ERP/MES accounting, RBAC, and transactional write-backs require a deterministic ontology.
- 01
Cognee(add -> cognify -> memify -> searchECL tri-store) andZep Graphiti(EpisodeNode,EntityNode,valid_at/invalid_atbi-temporal graphs) solve probabilistic episodic memory across chat turns and unstructured notes. - 02Feeding million-row ERP invoice or stock ledgers through LLM extraction pipelines (
cognify()oradd_episode()) triggersO(N)token write amplification,HTTP 429rate-limit bottlenecks, and entity-resolution supernode drift. - 03Subgraph
top-ktraversal (limit=10..50) cannot compute exact relationalSUM(),GROUP BY,FIFOinventory costing, orOEEaggregations. - 04Production agent stacks separate Episodic Memory (what the user discussed last Tuesday) from the Enterprise Business Ontology (live zero-copy SQL/API truth, caller RBAC, and human-gated ERP mutations).
1. What Cognee (ECL Tri-Store) & Zep Graphiti (Bi-Temporal Memory) Were Built to Solve
Engineers building stateful agents in LangGraph, CrewAI, or PydanticAI need agents to remember user preferences and prior conversation episodes across sessions. Cognee compiles unstructured inputs into Pydantic DataPoint graphs persisted across relational (PostgreSQL/SQLite), vector (Qdrant/LanceDB/pgvector), and graph (Neo4j/FalkorDB/Kuzu) stores behind cognee-mcp. Zep Graphiti models conversational history as a bi-temporal property graph tracking both event validity (valid_at/invalid_at) and ingestion timestamps (created_at/expired_at).
For personal assistants, customer-support memory, and unstructured research notes, episodic memory graphs outperform flat vector chunks. Architectural failures arise when teams try to use an LLM-extracted memory graph as their system-of-record ERP/MES ontology.
2. Four Hard Limits of Probabilistic Memory Graphs on Live ERP & Shop-Floor Data
Routing transactional ERP, QMS, WMS, and finance workloads through conversational memory engines hits four fundamental systems boundaries:
O(N)LLM Write Amplification & Ingestion Lag: Running multi-prompt entity extraction on tens of millions ofSTLINE,BSEG, or MES cycle rows burns prohibitive token budgets and lags behind live shop-floor transactions.- Inability to Run Exact Relational Aggregations: Retrieving the 25 closest graph neighbors cannot calculate reconciled trial-balance totals, FIFO lot layers, or VAT withholding math.
- Embedded File Locks & Missing Multi-Branch RBAC: Default
SQLite/Kuzu/LanceDBlocal stores hit file-lock contention under concurrent MCP workers, and extracted memory graphs lack caller-scoped plant, store, andMaliyet Gizliliği(FOB margin) column masking. - Memory Edges Are Not ACID ERP Transactions: Writing a fact into agent memory does not validate statutory
UBL-TRschemas or execute a governed SAPBAPI, Logo Objects REST, or Nebim V3 Integrator mutation.
Anti-Pattern: ERP Ledgers ──(LLM cognify / add_episode)──> Memory Graph ──> Hallucinated Totals!
Production Architecture:
├─ Episodic Agent Memory (Cognee / Zep Graphiti):
│ "The plant manager previously asked to prioritize export orders for Bursa Line 2."
│
└─ Enterprise Business Ontology (Zero-Copy MCP Plane):
Live ERP/MES Read Views + Caller RBAC + Human-Approved Official ERP Write Gates.Keep user preferences and session context in an episodic memory store if helpful, while grounding every inventory, costing, ledger, and write-back tool call in a deterministic zero-copy business ontology.
Glossary Concepts Referenced in This Guide
"Anadolu Machine Inc." in CRM, "ANADOLU MAKINA" in ERP, CUST_10492 in MES) to a single canonical real-world identity.Free to reference in engineering docs, ADRs, articles, and course syllabi with attribution.
[Agent Memory Graphs (Cognee, Zep Graphiti) vs. Deterministic Enterprise Business Ontology — Ontoloji.org](https://ontoloji.org/en/guides/cognee-and-zep-graphiti-agent-memory-vs-enterprise-ontology)