~/wiki

agent memory

---
title: Agent Memory
category: concepts
created: 2026-04-14
updated: 2025-01-05
tags: [agent-memory, context-management, personalization, stateful-agents, data-flywheels, short-term-memory, long-term-memory, vector-stores, in-context-learning, external-memory, compaction, agent-harnesses]
sources: [raw/articles/Your harness, your memory.md, raw/feeds/2026-06-11-llm-powered-autonomous-agents.md]
confidence: high
---

# Agent Memory

The system by which agents retain and utilize information across interactions, enabling personalization, learning, and improved user experiences over time. Agent memory is inseparable from [agent-harnesses](/concepts/agent-harnesses) and creates significant competitive advantages.

## Types of Memory

- **Short-term memory**: conversation messages and large tool-call results, handled directly by the [harness](/concepts/agent-harnesses) within the context window.
- **Long-term memory**: cross-session memory that must be written and read by the harness. Often *not part of the MVP* — teams first get the agent working, then add personalization.

## Memory is the harness, not a plugin

Per sarah-wooders (cited by harrison-chase): "Asking to plug memory into an agent harness is like asking to plug driving into a car." Managing context — and therefore memory — is a core responsibility of the harness. Concrete harness/memory coupling points include:

- How `AGENTS.md` / `CLAUDE.md` files are loaded into context
- How skill metadata is shown to the agent (system prompt vs. system messages)
- Whether the agent can modify its own system instructions
- What survives **compaction** and what is lost
- Whether interactions are stored and made queryable
- How filesystem / working-directory state is exposed

Because memory abstractions are still in their infancy, separate standalone memory systems do not yet make sense — "how the harness manages context and state in general is the foundation for agent memory."

## Strategic value: the data flywheel

Without memory, agents are easily replicable by anyone with the same tools. With memory, you accumulate a **proprietary dataset** of user interactions and preferences that powers a differentiated, increasingly personalized experience. This statefulness also raises switching costs (stateless model providers are easy to swap; stateful memory is not) — see [memory-ownership](/concepts/memory-ownership) and [vendor-lock-in](/concepts/vendor-lock-in).

## See also

- [agent-harnesses](/concepts/agent-harnesses)
- [memory-ownership](/concepts/memory-ownership)
- [vendor-lock-in](/concepts/vendor-lock-in)
- [deep-agents](/concepts/deep-agents)
- sarah-wooders