85 agentic tools audited for security incidents · Talk to the lab →
MotionticBook a call
Glossary

What is agent memory?

Agent memory is the set of mechanisms that let an AI agent carry information beyond a single model call, from short-term session state within one task to long-term knowledge stored outside the context window and recalled later.

A model remembers nothing between calls. Anything an agent appears to remember was put back into its context by the harness: the conversation so far, a summary of earlier work, a note it wrote to a file, or facts retrieved from a store.

Agent memory is the design of that process. It decides what is kept, in what form, where it is stored, and when it is brought back into view.

Short-term and long-term memory

  • Session state

    The running record of the current task: messages, tool calls and results. Kept as a durable log outside the context window so nothing is lost when context is trimmed.

  • Trimming

    Keep only the last N turns. Simple and deterministic, but older details are dropped.

  • Summarisation

    Fold older turns into a structured summary. Keeps the gist and can drop past mistakes, at the risk of losing a detail that mattered.

  • Notes and memory files

    The agent writes what it learned to files outside its context and reads them back in later sessions.

  • Retrieved knowledge

    Facts, preferences and past cases stored in a database or search index and pulled in when relevant.

What the labs say

Anthropic added a file-based memory tool and automatic clearing of stale tool results to its developer platform in September 2025, so learning can carry across sessions while the context window stays clean. OpenAI's Agents SDK cookbook describes trimming and summarisation as the two short-term strategies.

Google's guidance on context-aware multi-agent systems separates storage (sessions, memory and artifacts) from presentation (the working context built for each call). That split is the core design idea: memory is stored richly and shown to the model selectively.

How Motiontic's engineers apply it

Motiontic's engineers decide what an agent should remember by looking at where it fails without memory: repeated questions, lost decisions, forgotten preferences. Each type of memory gets its own store and its own rule for when it is recalled.

Long-term memory is treated as data, with retention limits, access controls and a way for a person to inspect or delete what the agent has stored.

Short-term compared with long-term agent memory

Short-term compared with long-term agent memory
Short-term (session)Long-term
ScopeOne task or conversationAcross tasks, sessions and users
Typical storeEvent log, trimmed or summarised historyFiles, databases, vector or keyword search
Main riskContext fills up and recall dropsStale or wrong facts recalled with confidence
Managed byTrimming, summarisation, compactionWrite rules, retrieval rules, retention and deletion

Common questions

How do AI agents remember things?

The model itself does not. The agent harness stores conversation history, summaries, notes and facts outside the model, and puts the relevant parts back into the context window on each call.

What is the difference between agent memory and RAG?

RAG retrieves documents to answer a question. Agent memory also stores what the agent has done and learned, such as decisions, preferences and progress, and recalls it in later steps or sessions. Retrieval is one way to recall memory.

Does a bigger context window remove the need for memory?

No. Recall degrades as context fills, and a long history costs tokens on every call. Memory design keeps the working context small and relevant, whatever the window size.

Running agents that have to hold up?

Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.