Overview

Agent memory is the persistence layer that allows an AI agent to accumulate context across sessions, rather than starting fresh on every conversation. Memory transforms a stateless LLM into a long-running partner that knows the user’s projects, preferences, past decisions, and habitual patterns.

The design of memory matters as much as its existence: naive “save everything and retrieve relevant chunks” approaches degrade over months of history. The more useful mental model is a living graph where memories have authority that can decay, reinforce, or be superseded — rather than a flat store where everything is equally “remembered” forever.

Related: , , , LLM wiki

Memory storage patterns

Flat retrieval (naive)

Save notes → embed → retrieve relevant chunks → stuff back into context. Works for a few weeks of history but degrades once the agent has months of data: everything is equally weighted, contradictions accumulate, and context windows fill with low-authority old memories.

Living graph (preferred for long-term)

Store memories in a graph where edges encode relationships and nodes have authority scores. Authority changes over time:

Tool stack for this approach: SQLite + embeddings + a graph layer. The graph/decay component matters more than the vector search quality.

One open-source implementation: Constellation Engine (https://github.com/CONSTELLATION-ENGINE/constellation-engine), built specifically because the standard “partner that grows with you” requirement cannot be met by simple vector retrieval.

File-system as memory

A simpler pattern: the directory structure is the memory and context. Files in a project folder accumulate context for that project. Switching folders switches context. Avoids cross-contamination between projects. The agent can be asked to “look in [path] for context” without polluting the current session.

Memory files taxonomy (Claude Code pattern)

The pattern uses three typed memory files:

The co-evolution horizon

Short-term agents feel like chatbots you keep re-explaining yourself to. Long-term agents with well-designed memory feel like partners: they know your projects, notice when your habits break, surface connections you missed, and gradually need less orientation per session.

The shift from “agent as tool” to “agent as partner” depends on memory quality more than model quality. A weaker model with good persistent memory often outperforms a stronger model with none.

The high-value personal use case is co-evolution. You build a workflow, the agent remembers the shape of your life, stale stuff decays, important stuff sticks, and over time it stops feeling like a chatbot you keep re-explaining yourself to. — Similar_Boysenberry7, r/hermesagent, 2026-06-18

Memory and scheduling

For personal agents running long-term, memory must integrate with scheduling:

When memory goes wrong

Resources