// Yapay Zeka

How does AI agent memory work, and which types of memory stand out?

AI agent memory is not a single database or an ever-growing prompt. It is a designed system that stores task context, experiences, and facts and brings them into play at the right moment; so what layers is it made up of, and where does it break down?

When people talk about AI agents, memory is often thought of as a single database or an ever-growing prompt window. In reality, agent memory is a system that stores, organizes, and retrieves the information the model needs beyond its immediate response. It holds the task’s active state, past experiences, facts, and learned ways of working; but it is neither a single database nor the same thing as the model’s context window.

Short-term memory holds the task’s current state

Working memory, or short-term memory, contains the active state of the task at hand: the goal, the current plan, recent observations, open questions, tool outputs, and completed steps. This information is sometimes kept within the conversation, and sometimes in a separate state object. Because context is limited, in long-running tasks older events are summarized, critical variables are stored separately, or only the next relevant part of the task is loaded.

Episodic memory, on the other hand, records experiences as events: what happened, when it happened, under what conditions it occurred, what steps were taken, and what the outcome was. This way, an agent can remember that a deployment failed after a particular configuration change, or on what grounds the user rejected a suggestion.

Semantic memory turns experience into knowledge

Semantic memory holds facts and concepts independently of any single event. The user’s preferred language, the definition of an internal metric, or the relationship between products are typical examples. Procedural memory is added to this as well: reusable ways of working. All these layers also have a counterpart: forgetting. Limiting outdated, sensitive, or devalued state is as important as storing it for the system to remain healthy.

The four stages of the memory pipeline

A functioning memory pipeline consists of four steps. Capture: observing a message, action, result, or environment change. Selection and encoding: deciding whether the information is worth storing and turning it into a record with its metadata. Storage: placing the record into an appropriate system with access controls and a retention policy. Retrieval: when a new task arrives, searching and ranking relevant records and putting a small selection into context. One of the precursors of this approach, the Generative Agents research, described an architecture in which agents stored observations, retrieved memories based on relevance, recency, and importance, and then formed higher-level reflections.

The distinction between agent memory and RAG also becomes clear here. RAG searches an organized knowledge base that sits outside the agent. In a memory system, however, there are records arising from the agent’s own interactions; the system must decide not only what to read but also what to write.

The most common memory errors

Reliable memory preserves timestamps and source information, defines which system is authoritative, and surfaces contradictions explicitly rather than silently choosing the first record. Despite this, three errors repeat: stale memory, where an old fact overrides the current record value; false memory, where an inference generated by the model is stored as if verified; and retrieval noise, where similar but irrelevant records mislead the model.

Memory does not mean the model is learning

In most cases, the model weights do not change. Agent memory largely means bringing externally held information into context at runtime. It can significantly change behavior, but it is a different job from training or fine-tuning the underlying model. For teams that want to set up agent memory correctly, the summary is clear: memory is a retrieval and governance architecture built around the model.

Source: Unite.AI

// JOIN THE CONVERSATION

Share your experience

Bir sorunun, farklı bir çözümün veya eklemek istediğin bir notun var mı? Giriş yapmadan da yazabilirsin.

// KEEP READING

One more note.

All posts ↗︎