Wireframe. This is a concept piece for future writing, serving as an exploration ground for product development still ahead. The structure here is a frame for prior-research integration; each pitfall will be expanded into prose with examples in later passes.

1. Premise

"Memory" is the wrong abstraction for long-horizon agents. The interesting object is a live, inspectable context substrate — fresh, traceable, temporally aware, and governed by explicit write policies. Most production "agent memory" stacks today are a single store (vectors, sometimes a graph) that conflates raw events, derived facts, episodic traces, and procedural rules under one schema and lifecycle. Almost every pitfall in §4 follows from that single design choice.

But conflation is a symptom, not a root cause. The deeper claim of this piece is that agents are still operating on retrieval infrastructure designed for humans. The dominant workarounds — build your own knowledge graph, build your own LLM wiki, build your own RAG variant — are bespoke reimplementations rather than reusable infrastructure. Agents need their search engine moment: a substrate (call it AgentDB) shaped around how agents actually operate, not around how a person types into a search box. §2 walks the framing that gets us there. §3 inventories the prior research that already addresses individual layers. §4 names the failure modes a purpose-built substrate would have to make impossible by construction.


2. Background

Web search starts from a simple premise: a human operator generates a query — often a very short one — and a set of documents is returned, ranked by relevance. The ranking model mixes term weights, document importance, recency, link structure, and personalization. Power users compose advanced operators (boolean, site:, filetype:, intitle:) that improve precision, but the central contract is the same: the engine returns ranked documents; the operator decides what to do with them. Search is fast. It does not reason. It does not synthesize. It does not act on the user's behalf. The locus of cognition sits with the human.

2.2 RAG Blurs Document and Operator

Traditional RAG inherits the search-engine contract but quietly violates it. Chunking creates a new document. The unit of retrieval is no longer the document the user authored; it is a synthetic fragment generated by an indexing decision (chunk size, overlap, splitting strategy). Retrieval techniques then drift further into operator territory: pulling contextual metadata associated with a chunk, bringing structurally matched information, expanding to surrounding chunks, hybrid (vector + lexical) retrieval, segmented retrieval restricted to a subset of chunks. Each enrichment is a small operator decision baked into the index. The result is that "retrieval" stops being a clean primitive — the engine is performing pre-ranking judgments that should belong to the consumer.

2.3 Agents as Operators

It is worth being precise about what "operator" meant in the search-engine era. The operator was the user — a person doing research, with a query as one partial step toward a larger purpose. The tacit contract was that the engine returned a slice of relevance, not an answer; synthesis, judgment, and follow-up belonged to the operator. Better operators wrote better queries: ones more fit to the task at hand. The existence of specialized engines for specialized tasks — Google for the open web, Google Scholar for academic literature, code search engines for source — was itself a recognition that operator work depends on the engine being shaped to the kind of question being asked.

Agentic workflows push that operator role onto the model itself. Coding agents are the cleanest example: given composable simple toolsgrep, ls, cat, head, tail, find — an agent can perform progressive exploration over a structure, narrowing its scope as it learns. These primitives can be combined with RAG-like approaches for speed: memoization of past results, semantic indexes as cheap entry points, embeddings for fuzzy navigation. The agent acts as the operator that early Google assumed was the human: it generates queries, inspects results, decides what to do next.

2.4 Where Structure Helps and Where It Doesn't

This pattern thrives in small-scoped, highly structured environments — codebases, OS filesystems, well-typed APIs. The reason is not that the agent is smart there; it is that the environment exposes a bridging structure that can be traversed. A file imports modules; modules resolve to installed packages; packages declare dependencies; dependencies expose APIs; APIs are called from other files. Given enough effort, time, and cognitive budget, the full dependency graph is reachable, and the moving pieces of the system can be understood through structural traversal. The domain boundary is known, and traversable.

Even here, the picture is optimistic. The bridging structure captures syntactic dependencies — what imports what, what calls what — but not semantic ones. A function's correctness may rest on an invariant enforced in another repository, a contract owned by a different microservice, or a business rule that was negotiated in a meeting and never written down. The why behind a piece of code — which constraints it satisfies, which compromise it encodes — is rarely reachable through structural traversal. The agent can confidently traverse an incomplete domain without realizing it, because the boundary of the domain does not end at the boundary of the code.

Most data is not like this. Unstructured documents — meetings, tickets, chat, support cases, research notes — have no canonical bridging structure. Even nominally structured data fails: cross-referencing between sources (entity disambiguation, "is this the same customer / same product / same incident?") cannot be solved at retrieval time without the data itself having been designed for it. There are too many unknowns.

2.5 The Retrieval Problem by Other Names

The retrieval problem appears in the literature under several aliases — the memory problem, the context problem, the long-horizon state problem. Most non-cognitive failures in agentic systems trace back to it: when to perform retrieval, how to perform it, and when to trust the result. Under-retrieval is particularly nasty, because it produces false negatives that the agent has no signal for; the agent then proceeds with overconfidence in the completeness of an incomplete result.

2.6 The Current Workaround: Generate Your Own Structure

The dominant response, when retrieval-on-unstructured-data underperforms, is to generate the missing structure. Karpathy's "LLM wiki" framing, Microsoft's GraphRAG [2], and the broader family of structured-index approaches are different points on the same idea: extract entities, relations, summaries, and an index from raw data, then run retrieval over the synthetic structure rather than over raw text.

The approach works. But it has not become infrastructure. Memory systems are not yet plug-and-play; each project re-implements its own variant. The cognitive cost — latency and token spend — to traverse, expand, and maintain these structures is high, and reindexing as the source data drifts is its own engineering problem (a substantial part of why CocoIndex exists; see §3.6).

2.7 The Thesis: AgentDB

Search engines became infrastructure because they were designed around a specific operator: a human typing a short query into a box. The interface, the ranking model, the index format, and the latency budget were all shaped by what a human can usefully consume in a fraction of a second. Agents are a different operator. They have different semantic strengths (composition, structured tool use, iterated query refinement), different weaknesses (overconfidence under partial retrieval, narrow context windows, expensive long-horizon state), and a different operational profile (machine-speed query generation, programmatic consumption of results, willingness to run multi-step exploration if the cost model allows).

The bet of this piece is that agentic memory will not be solved by stacking more retrieval tricks on top of human-era databases. The systems surveyed in §3 are early signals of what a purpose-built substrate — AgentDB — has to address: incremental indexing, lineage and provenance, temporal validity, hybrid retrieval planning, explicit write policies, taxonomic separation of memory types, and end-to-end evaluation. The pitfalls in §4 are the failure modes such a substrate has to make impossible by construction, not patchable by hand.


3. Prior Research in Consideration

Before naming pitfalls, the relevant frameworks. These are organized by the layer of the stack they address rather than by chronology.

3.1 GraphRAG & the Graph Layer

  • Microsoft GraphRAG — extracts an entity graph from a corpus and pre-generates community summaries so global, query-focused summarization can synthesize across many documents instead of pulling scattered chunks [2].
    • Local search combines structured graph data with source-document text, then ranks/filters/prioritizes candidates to fit a fixed context window [3].
    • Strength: global synthesis, entity/community structure.
    • Limit: indexing-time representation; freshness, temporal validity, contradiction, and write policy are out of scope.

3.2 Hybrid Graph + Vector Retrieval

  • LightRAG — integrates graph structure with vector representations and uses a dual-level retrieval (low-level detail and high-level knowledge) [8].
  • HippoRAG — hippocampal-indexing analogy; orchestrates LLMs, knowledge graphs, and Personalized PageRank. Reports up to 20% gains on multi-hop QA and 10–30× cheaper / 6–13× faster than iterative retrieval like IRCoT [9].
  • Design lesson: vector for semantic entry, graph for relationship expansion, source text for evidence grounding. Don't collapse the three.

3.3 Temporal Knowledge Graphs

  • Zep / Graphiti — temporal knowledge graph as an agent-memory layer; facts are triplets with datetime attributes for when they become valid or invalid [10].
  • Zep paper reports 94.8% on Deep Memory Retrieval (vs. MemGPT 93.4%), up to 18.5% accuracy improvement on LongMemEval, and ~90% latency reduction vs. baseline implementations [11].
  • Use case fit: agents acting on changing user/business state — preferences, permissions, ticket lifecycle, code state. A timeless edge like user — prefers — X is a bug in this regime.

3.4 Virtual Context & Agent-Controlled Memory

  • MemGPT — virtual context management inspired by OS hierarchical memory; treats the context window as a managed resource, uses interrupts for system/user flow control [12].
  • Letta — exposes archival memory as a semantically searchable long-term store; agents query it through tools, can insert memories during conversations, can filter by tags; archival fragments cannot be pinned directly [13].
  • Tradeoff: agency over memory introduces governance load — overfitting to a transient utterance, duplicating facts, persisting sensitive content. Memory operations must be tools with policy, observability, and review.

3.5 Extraction, Consolidation, Taxonomy

  • Mem0 — extraction-centric memory architecture: dynamically extracts, consolidates, and retrieves salient information from ongoing conversations; graph-memory variant for relational structure. Reports 26% relative LLM-as-judge improvement over OpenAI memory on LOCOMO, 91% lower p95 latency, >90% token-cost savings vs. full context [14].
  • LangChain / LangMem — taxonomy: short-term (thread-scoped) vs. long-term (cross-session); within long-term, semantic / episodic / procedural [15].
    • Hot-path writes: immediate availability, higher latency.
    • Background writes: lower path latency, requires consistency/frequency decisions.
  • Cognee — pipeline framework for AI memory apps; pluggable LLM, embedding, vector, and graph backends with custom tasks [16].

3.6 Incremental Indexing Substrate

  • CocoIndex — declarative, state-driven model: target state is a function of source data; Python frontend, Rust engine; "React for data engineering" framing [1][4].
    • Fine-grained incremental processing at component/source-item, function/memoization, and target CRUD levels; content-hash fingerprints decide recomputation [4][5].
    • Bidirectional lineage: forward source → derived (vector IDs, graph nodes); backward derived → source for precise deletion [5].
    • Knowledge-graph example: LLM extraction guided by Python dataclasses, S-P-O triples, Neo4j export with primary-key dedup, Postgres for incremental tracking [6].
    • Best understood as the maintenance substrate under GraphRAG, not GraphRAG itself; not a memory policy or retrieval planner.

3.7 Evaluation

  • GraphRAG-Bench — built because traditional QA benchmarks under-measure reasoning; evaluates the full pipeline (graph construction → retrieval → generation) on college-level, domain-specific, multi-hop questions across 16 disciplines and 20 textbooks [7].
  • Implication: nearest-neighbor recall is not the right top-line metric for agentic memory. Task success, reasoning coherence, freshness lag, and auditability are.

4. The Pitfalls

Each pitfall below pairs a common failure mode with the prior work that has already isolated it. The wireframe lists; later passes will turn each into a section with a concrete example.

4.1 Staleness — indexes drift from source-of-truth

  • Re-indexing on every change is too slow and too expensive; not re-indexing is worse.
  • Symptom: agent confidently cites a deleted file, a closed ticket, a renamed function, a stale CRM field.
  • Frame: incremental dataflow (CocoIndex) [1][4][5].

4.2 Lost provenance — "why did the agent believe that?"

  • Embeddings, graph edges, and summaries are derived; without source linkage they cannot be invalidated, audited, or selectively deleted.
  • Symptom: a user retracts a fact and the system has no idea which derived artifacts to purge.
  • Frame: bidirectional lineage (CocoIndex) [5].

4.3 Timeless edges — facts modeled as eternally true

  • Real worlds have validity intervals: users move, prefs change, permissions expire, code is refactored.
  • Symptom: user — prefers — X survives long after the user said the opposite.
  • Frame: temporal knowledge graphs (Zep / Graphiti) [10][11].

4.4 Conflated memory types — one bucket for everything

  • Semantic facts, episodic events, procedural rules, working memory, raw source text, summaries — different lifecycles, different write paths, different retention.
  • Symptom: a transient chat utterance overwrites a canonical business fact; or canonical facts get re-summarized into noise.
  • Frame: memory taxonomy (LangMem) [15].

4.5 Implicit write policy — every fragment becomes durable memory

  • If "everything the agent sees" gets persisted, signal-to-noise collapses; if "nothing" gets persisted, no learning.
  • Symptom: agent remembers a one-off mistake forever; or forgets a multi-session preference.
  • Frame: hot-path vs. background writes (LangMem) [15]; extraction/consolidation (Mem0) [14]; agent-as-tool-user (Letta) [13].

4.6 No contradiction or deletion semantics

  • Two sources disagree, a user corrects a fact, a retention policy fires — the system has no first-class notion of supersession or scoped deletion.
  • Symptom: contradictions retrieve together; "right to be forgotten" requires manual archaeology.
  • Frame: provenance + temporal validity (CocoIndex lineage [5] + Zep/Graphiti validity intervals [10]).

4.7 Retrieval-only thinking — vector-search-as-memory

  • "Top-k chunks for a prompt" is a retrieval pattern, not a memory architecture. It misses relationship paths, source-of-truth lookups, and tool calls.
  • Symptom: agent fails on multi-hop questions a graph traversal would have answered cheaply.
  • Frame: hybrid retrieval (LightRAG [8], HippoRAG [9]); virtual context management (MemGPT [12]).

4.8 Recall-only evaluation — measuring the wrong thing

  • Nearest-neighbor recall on a synthetic QA set is not the right top-line metric.
  • Symptom: a retrieval upgrade looks good on benchmarks and degrades real task success.
  • Frame: end-to-end pipeline evaluation (GraphRAG-Bench) [7]; cost / latency / freshness as first-class axes.

4.9 Agent-written memory without rails

  • Letting the model decide what to remember without permissions, scopes, retention rules, or a review path is unsafe in production.
  • Symptom: durable storage of sensitive content; persistence of a transient or adversarial assertion.
  • Frame: memory operations as explicit tools (Letta archival memory) [13].

4.10 Brittle entity resolution

  • Graph memory depends on "is this the same entity?" LLM extraction alone is insufficient at scale.
  • Symptom: duplicated nodes, fractured neighborhoods, retrieval that misses obvious matches.
  • Frame: open problem; partial mitigation via primary-key dedup at extraction time (CocoIndex KG example) [6].

4.11 Graph noise drift

  • Without incremental maintenance and pruning, graphs accumulate low-confidence edges that hurt rather than help retrieval.
  • Symptom: graph-augmented answers get worse over time as more "facts" are extracted.
  • Frame: incremental maintenance (CocoIndex) [4][5] + write-policy gates.

5. A Layered Sketch (Mitigation Frame)

Most pitfalls dissolve when the architecture is layered rather than monolithic. Sketch:

  1. Source / event capture — raw truth before summarization (DBs, logs, documents, chat events, CDC, queues).
  2. Incremental transformation — keep derived context fresh without full rebuilds (CocoIndex-style declarative dataflow, memoized transforms).
  3. Structured extraction — entities, facts, relations, summaries from raw text/events (LLM extraction, schemas, validators).
  4. Storage — different memory forms in different stores: vector, graph, relational, object, event log.
  5. Temporal / provenance layer — when facts are valid; where they came from (temporal KG, lineage, validity intervals).
  6. Retrieval / query planning — choose between vector search, graph traversal, SQL, source lookup, tool call.
  7. Memory write policy — agent tools, background consolidation, deterministic rules, human review.
  8. Evaluation / observability — task success, freshness lag, latency, cost, auditability.

Mapping prior work onto this stack:

  • Layers 2–4, partly 5: CocoIndex.
  • Layers 3, 4, 6: Microsoft GraphRAG, LightRAG, HippoRAG.
  • Layers 4–6, with temporal strength: Zep / Graphiti.
  • Layers 6–7: Letta / MemGPT.
  • Extraction + consolidation across user/session: Mem0.
  • Taxonomy and write-path patterns: LangGraph / LangMem.
  • Pluggable pipeline infrastructure: Cognee.

6. Open Questions

  • Independent benchmarks remain uneven; reported gains are hard to compare across baselines, judges, and datasets.
  • Entity resolution is still brittle.
  • Contradiction handling lacks shared semantics ("supersedes," "valid only during T," "two sources disagree").
  • Memory quality is hard to measure: relevant-but-harmful, accurate-but-stale, useful-here-distracting-there.
  • Agent-written memory needs scopes, retention rules, and review.
  • Graphs become expensive noise without incremental maintenance.
  • Multimodal memory (code, image, audio, UI traces, video) is early; provenance and temporal context for non-text artifacts is largely unsolved.

References

[1] CocoIndex — incremental data framework for AI agents. cocoindex.io

[2] D. Edge et al., "From Local to Global: A Graph RAG Approach to Query-Focused Summarization," arXiv preprint arXiv:2404.16130. arxiv.org/abs/2404.16130

[3] "Local Search," GraphRAG documentation, Microsoft. microsoft.github.io/graphrag/query/local_search

[4] "CocoIndex Overview," CocoIndex Docs. cocoindex.io/docs/getting_started/overview

[5] "Building a Real-Time Data Substrate for AI Agents: The Architecture Behind CocoIndex," CocoIndex (Medium). medium.com/@cocoindex.io/...

[6] "Build Real-Time Knowledge Graph For Documents with LLM," CocoIndex blog. cocoindex.io/blogs/knowledge-graph-for-docs

[7] "GraphRAG-Bench: Challenging Domain-Specific Reasoning for Evaluating Graph Retrieval-Augmented Generation," arXiv preprint arXiv:2506.02404. arxiv.org/abs/2506.02404

[8] Z. Guo et al., "LightRAG: Simple and Fast Retrieval-Augmented Generation," arXiv preprint arXiv:2410.05779. arxiv.org/abs/2410.05779

[9] B. J. Gutiérrez et al., "HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Models," arXiv preprint arXiv:2405.14831. arxiv.org/abs/2405.14831

[10] "Graph Overview," Zep documentation. help.getzep.com/graph-overview

[11] P. Rasmussen et al., "Zep: A Temporal Knowledge Graph Architecture for Agent Memory," arXiv preprint arXiv:2501.13956. arxiv.org/abs/2501.13956

[12] C. Packer et al., "MemGPT: Towards LLMs as Operating Systems," arXiv preprint arXiv:2310.08560. arxiv.org/abs/2310.08560

[13] "Archival memory," Letta documentation. docs.letta.com/guides/core-concepts/memory/archival-memory

[14] P. Chhikara et al., "Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory," arXiv preprint arXiv:2504.19413. arxiv.org/abs/2504.19413

[15] "Memory overview," LangChain Docs. docs.langchain.com/oss/python/concepts/memory

[16] Cognee Documentation. docs.cognee.ai


Document Status: Wireframe
Last Updated: 2026-05-03
Author: Mario Garrido