# Persistent AI Memory Systems: Comparative Breakdown

Category: Memory & Storage
Stack: Mem0, Zep, LangChain Memory, Graphify

## Overview
Comparing dedicated memory servers, graph-based local memory, and file-based state logs across multi-turn agent sessions.

## The Problem
Agents reset to zero context between sessions, requiring users to repeatedly explain preferences and project architecture.

## Production Rule
Select memory architecture based on scope. Use file-based logs for single projects; use decoupled vector/graph memory for cross-project enterprise agents.

## Code / Specification
File: `memory_architecture_matrix.md`

```system review
1. Ephemeral Memory: Context window turn history (lost on restart)
2. File-Based State: run-log.md / CLAUDE.md (zero cost, high persistence)
3. Graph Memory: Graphify / Neo4j (tracks entity relationships across sessions)
4. Vector Memory: pgvector / Mem0 (fuzzy semantic retrieval of past conversations)
```
