Research Careers Contact

GlossaryAgent memory

Agent memory

Agent memory is the information an AI agent keeps and reuses beyond a single model call: what it has done in the current task, facts it has learned and records from earlier sessions. A language model has no memory of its own between calls, so memory is built in the software around it.

How it works

Agent memory usually has two layers. Short-term memory is what sits in the model's context window during a task: the instructions, recent messages, tool results and the agent's own notes. Long-term memory lives outside the model, in a database, file store or vector index, and is written to and read from with tools.

When the context fills, the agent has to decide what to keep. Common approaches summarize older steps, drop tool output that is no longer needed, or move details into long-term storage and fetch them back when they matter. Research on agents that manage their own memory treats the context window like fast memory and outside storage like disk, with the agent paging information in and out. Other work stores each observation as a record, then retrieves records by recency, importance and relevance when the agent plans its next step.

Long-term memory is often retrieved the same way as documents in retrieval-augmented generation: records are embedded, stored in a vector database and searched by meaning.

Agent memory vs context window

The context window is the fixed amount of text a model reads in one call. Agent memory is the larger, managed store the agent draws on to fill that window. A bigger window holds more at once, but it does not decide what is worth keeping. Memory is that decision, made by software and recorded where it survives the end of a session.

Why it matters

Without memory, an agent repeats work, loses decisions made earlier in a task and asks for the same facts twice. With careless memory, it carries stale or wrong facts forward and acts on them. Memory also holds sensitive data, so what gets stored, for how long and who can read it are design decisions, not afterthoughts.

How to get it right

  • Separate working notes for the current task from durable facts.
  • Store facts with their source and date, so stale entries can be found and replaced.
  • Summarize long histories, and keep the original records for audit.
  • Retrieve only what the current step needs instead of loading everything.
  • Let people view, correct and delete what the agent remembers.
  • Keep sensitive data out of memory unless the task requires it.

Agent memory in robotics and drone hardware

Agents that work on hardware need durable records: which part revision a board uses, which design rule a fabricator applies, which test failed on which serial number. Storing those facts with their sources, and tying them to the BOM, revision and test records engineers already keep, lets an agent pick up a task where it left off without guessing at details that decide whether a board works.

Learn more