TL;DR
Memory and context are the differentiating substrate of enterprise AI in 2026. A hierarchical, hybrid architecture — working / short-term / episodic / semantic / procedural memory layered over hybrid retrieval (BM25 + dense + GraphRAG), governed embeddings, tiered storage, and tenant-isolated vector and graph stores — has emerged as the reference pattern. Open source (Mem0, Letta, Zep, Cognee, LangMem, LlamaIndex), specialist commercial (Pinecone, Weaviate, Qdrant, Vectara, Glean, Coveo), and hyperscaler offerings (AWS Bedrock AgentCore Memory + Knowledge Bases, Azure AI Search/Foundry, Vertex AI Memory Bank, Databricks Mosaic AI Vector Search 2.0, Snowflake Cortex Search) now compete on freshness, governance, and provenance — not raw recall.
1. Definition
Agentic memory is the layer that gives an AI agent short-term scratchpads, long-term episodic memory, and semantic recall across sessions. Context management is the discipline of curating what the LLM sees on every step — instructions, tool definitions, retrievals, prior turns, summaries — so the agent stays grounded, accurate, and within its context budget.
2. Why it matters
- Without memory, agents forget prior objections, repeat research, lose workflow state, and cannot learn from outcomes.
- With poorly governed memory, agents leak across tenants (Asana MCP, May 2025), exfiltrate via RAG scope violations (M365 Copilot EchoLeak, CVE-2025-32711), or confidently cite events that never occurred.
- Memory has become a procurement category — Forrester and Gartner began publishing comparative analyses of enterprise memory in 2026.
- Cost discipline matters: vendor reports document 10× cost growth in 6 months when memory consolidation/summarization is not implemented.
3. The five memory types
- Working memory — the active scratchpad and tool results inside one task.
- Short-term memory — the current session, often a rolling window of turns.
- Episodic memory — what happened in past sessions with this user, account, or workflow.
- Semantic memory — durable facts, policies, embeddings, and knowledge graphs.
- Procedural memory — skills, tools, recipes, and prompt patterns the agent reuses.
4. Reference architecture
A. Ingestion & parsing
- Document parsing: Unstructured, LlamaParse, Reducto, Azure Document Intelligence, AWS Textract.
- Structured-data ingestion: CDC (Debezium, Fivetran, Estuary), event streams (Kafka, Kinesis, Pub/Sub).
- Chunking with metadata enrichment (source, ACLs, freshness, owner) and Anthropic-style contextual chunk prefixes.
B. Embeddings & retrieval
- Embedding models: OpenAI text-embedding-3-small/large, Cohere Embed v3, Voyage-3, BGE-M3, NV-Embed-v2.
- Hybrid retrieval: BM25 + dense + reciprocal rank fusion (RRF) + reranker (Cohere Rerank, Voyage Rerank, BGE-Reranker) — typically reaches ~91% recall@10, well above naive vector search.
- GraphRAG (Microsoft GraphRAG, Neo4j + LLM, LangChain Graphs) for multi-hop reasoning.
C. Memory layers
- Letta (formerly MemGPT) — OS-inspired core/recall/archival tiers, agent-edited memory blocks.
- Mem0 — vector + graph + KV, three-tier user/session/agent (48K+ GitHub stars, $24M funding 2025).
- Zep / Graphiti — temporal knowledge graph, Apache 2.0 community edition.
- Cognee — local-first with graph reasoning.
- LangMem — episodic/semantic/procedural inside LangGraph.
- Microsoft Semantic Kernel + Kernel Memory; MemMachine; Memori (SQL-native, audit-friendly).
D. Storage
- Vector DBs: Weaviate, Qdrant, Milvus, Chroma, pgvector, Vespa, FAISS, Pinecone, Zilliz.
- Graph DBs: Neo4j, Memgraph, JanusGraph, ArangoDB.
- General DBs with vector: MongoDB Atlas Vector Search, Elastic, OpenSearch, Couchbase, Redis.
- Object storage for raw documents (S3, GCS, Azure Blob) — treat embeddings as recomputable derivatives.
E. Permission-aware retrieval & governance
- ACL propagation from source systems (SharePoint, Confluence, Google Drive) through every retrieval.
- Tenant-context revalidation per cached response.
- Provenance metadata on every memory write; review queues for memory written from untrusted input.
- Expiration policies, GDPR Article 17 deletion across derived embeddings, summaries, and graph nodes.
F. Evaluation & observability
- LongMemEval (ICLR 2025) — canonical long-horizon memory benchmark.
- Standard metrics: recall, precision, freshness, faithfulness, citation accuracy.
- OpenTelemetry / OpenInference traces of every retrieval, with chunk IDs and rerank scores.
- Production sampling fed back into golden eval sets — see our Enterprise LLM Evaluation Framework.
Designing the memory layer for a production agent?
We architect, build, and evaluate enterprise memory systems.
See our Enterprise AI Context & Memory Systems and RAG & Knowledge Systems services for the full engagement model.
5. Ecosystem — buy vs build vs open source
Open source
- Frameworks: LlamaIndex, LangChain (with LangGraph + LangMem SDK 2025).
- Memory layers: Letta, Mem0, Zep / Graphiti, Cognee, LangMem, Semantic Kernel + Kernel Memory, MemMachine, Memori.
- RAG frameworks: Haystack, RAGFlow, txtai.
Commercial / managed
- Specialist vector: Pinecone, Weaviate Cloud, Qdrant Cloud, Zilliz Cloud (managed Milvus).
- Enterprise search / RAG: Vectara, Glean ($7.2B valuation Jun 2025; 250+ connectors; permission-aware; ISO 42001), Coveo, Guru, Lucidworks, Algolia, Moveworks.
- Memory-as-a-service: Mem0 cloud, Zep cloud, LlamaCloud, Letta cloud.
Hyperscalers
- AWS: Bedrock Knowledge Bases (managed RAG), Bedrock AgentCore Memory (short-term + long-term + episodic, GA Dec 2025), Kendra, OpenSearch Service.
- Azure: Azure AI Search, Azure AI Foundry (Agent Service GA 2025), Microsoft Graph, Copilot ecosystem.
- Google Cloud: Vertex AI Search, Vertex AI Memory Bank (Public Preview 2025), Vector Search 2.0 (collections, auto-embeddings, hybrid + semantic re-ranking), Agent Engine.
- Databricks: Mosaic AI Vector Search 2.0 (Storage-Optimized Endpoints with 1B+ vectors, 7× cost reduction), Mosaic AI Gateway, Agent Bricks, Genie.
- Snowflake: Cortex Search, Cortex AI.
Buy-vs-build heuristics
Build in-house for unique data structures (custom knowledge graphs for clinical trials, financial instruments), air-gapped/sovereign deployment, or extreme-scale low-latency (<5ms p99 at >1B vectors).
Buy commercial for permission-aware enterprise search across 50+ SaaS apps (Glean, Coveo), memory-as-a-service for personalization (Mem0, Zep cloud), or fastest time-to-value on a customer-facing copilot.
Use open source when you want flexibility (Weaviate, Qdrant, Milvus self-hosted), have a Postgres-centric stack (pgvector / pgvectorscale), or need full control of the memory hierarchy (Letta).
Hyperscaler-native when you're already deeply committed to a cloud's AI stack, or when procurement and security review favor avoiding new DPA negotiations.
Hybrid: knowledge graph (Neo4j) + vector DB (Pinecone/Weaviate/pgvector) + memory layer (Mem0/Zep) + enterprise search (Glean) + hyperscaler RAG (Bedrock Knowledge Bases) for specific workloads.
TCO
- Vector DB managed services: $25–$2,000+/mo for small workloads, scaling to six figures for 100M+ vector indices.
- Embedding APIs: $0.02 (OpenAI text-embedding-3-small) to $0.13 (3-large) per million tokens; self-hosted BGE-M3 amortizes well at >100M tokens/month.
- Reranking: $0.001–$0.002/query.
- Hyperscaler memory services bill per event/memory record/retrieval call.
6. Failure modes of poorly architected memory
- Context window overflow / lost-in-the-middle.
- Memory poisoning (adversarial inputs persisted into long-term store).
- Cross-session / cross-tenant contamination — see Asana MCP.
- PII bleed across users/tenants.
- Memory bloat / cost explosion.
- Inconsistent context across agents seeing different state.
- Embedding drift after model swap; retrieval-quality regressions during dual-write windows.
- Hallucinated memory; consent / RTBF violations; hierarchical conflicts; catastrophic forgetting.
For the full incident catalog and mitigation map, see AI Agent Failure Modes.
7. Current limitations
- No memory system has solved the cross-tenant isolation + caching tradeoff robustly enough that it's safe by default.
- Embedding drift on model upgrades is not handled automatically by most stacks.
- GDPR Article 17 deletion across derived embeddings, summaries, and graph nodes is operationally hard.
- LongMemEval is a starting point — it doesn't capture confidentiality, multi-tenancy, or freshness.
- GraphRAG quality depends heavily on entity-extraction quality, which remains domain-specific.
- Long-context vs. RAG is empirically unsettled; RAG still dominates the cost-quality Pareto frontier in most enterprise scenarios.
Enterprise AI memory is the infrastructure that gives agents access to the right business context — past decisions, customer history, workflow state, policies — across sessions and tools. RAG is one slice; durable memory, structured summaries, and tenant-scoped retrieval are the rest.
Workflows where this capability changes the unit economics of the process.
- Customer success agents that recall account history across every channel.
- Sales copilots that build on prior opportunity context instead of starting fresh.
- Operations agents that resume long-running workflows after handoffs.
- Knowledge-work copilots grounded in policies, contracts, and internal SOPs.
- Agents need to remember context across sessions, users, or workflow steps.
- Retrieval quality is now the bottleneck on agent accuracy.
- Tenant isolation, PII redaction, or access control must be enforced at retrieval time.
- You are paying to re-process the same context in every prompt.
- Single-turn, stateless Q&A where the model's training data suffices.
- Workflows where regulatory rules forbid persisting interaction data.
- Enterprise AI Context & Memory SystemsProduction-grade memory infrastructure for agents.
- RAG & Knowledge SystemsGoverned retrieval grounded in your business sources.
- MCP & Tool IntegrationsTool surfaces that respect memory and tenant scope.
- AI-Native Process ImplementationProcesses redesigned around durable agent memory.
Translate this into an AI-native business process
Apply this architecture to a real workflow. We map your highest-leverage business process to a closed-loop, governed agentic implementation plan.
Related reading
- AI Agent Failure Modes — the incident record and mitigation map.
- AI Readiness Assessment — scoring data, talent, governance, infrastructure.
- Enterprise LLM Evaluation Framework.
- AI Governance for Agentic Systems.
- FAQ: What is agentic memory and context management?
- Services: Enterprise AI Context & Memory Systems · RAG & Knowledge Systems · MCP & Tool Integrations.
FAQs
What is an enterprise AI memory and context system?
It is the layer that gives an AI agent short-term scratchpads, long-term episodic memory, and semantic recall across sessions, plus the discipline of curating exactly what the LLM sees on each step. A production-grade system combines working, episodic, semantic, and procedural memory over hybrid retrieval (BM25 + dense + GraphRAG), governed embeddings, tiered storage, and tenant-isolated vector and graph stores.
What are the canonical types of agent memory?
Working memory (active scratchpad and tool results inside one task), short-term memory (the current session), episodic memory (what happened in past sessions with this user/account), semantic memory (durable facts, policies, embeddings, knowledge graphs), and procedural memory (skills, tools, recipes the agent reuses).
What is GraphRAG and when do I need it?
GraphRAG extends retrieval-augmented generation with an entity-and-relationship graph extracted from the corpus, enabling multi-hop reasoning that pure vector retrieval cannot answer. It earns its keep when domain entities are densely interconnected (clinical trials, financial instruments, supply chains, security investigations) and when answers require relationship traversal, not just semantic similarity.
What is LongMemEval and what does it measure?
LongMemEval (ICLR 2025) is the canonical benchmark for long-horizon agent memory — 500 questions across 5 capabilities (information extraction, multi-session reasoning, knowledge updates, temporal reasoning, abstention). April 2026 leaders include OMEGA 95.4% (GPT-4.1), Mastra Observational Memory 94.87% (GPT-5-mini), Emergence AI 86%, Zep/Graphiti 71.2% (GPT-4o). Most managed memory systems do not yet publish LongMemEval scores.
Build, buy, or open source for the memory and context layer?
Hybrid is the dominant 2026 pattern: knowledge graph (Neo4j) + vector DB (Pinecone/Weaviate/pgvector) + memory layer (Mem0/Zep/Letta/LangMem) + permission-aware enterprise search (Glean/Coveo) + hyperscaler RAG (Bedrock Knowledge Bases, Vertex AI Search, Azure AI Search, Databricks Mosaic AI Vector Search) for specific workloads.
How do you prevent memory poisoning and cross-tenant leakage?
Permission-aware writes with provenance metadata, expiration policies for stale memory, review queues for memory written from untrusted user input, ACL propagation on every retrieval, tenant-context revalidation per cached response, and embedding lineage tied to source-document hashes. The Asana MCP incident (May–Jun 2025) is the canonical exemplar of what happens without these.
Do I need a vector database?
Often yes — but not always. pgvector inside an existing Postgres is usually enough to start. Switch to a dedicated vector DB (Pinecone, Weaviate, Qdrant, Milvus) when scale (>10M vectors), hybrid search SLAs, multi-tenant ACLs, or specialized index formats justify the operational and licensing cost.
