# Agent memory

Agent memory is what lets an AI agent carry something from one session to the next. A model
only sees its current context window, so anything worth keeping, like a user's preference, a
project's conventions, or a lesson from a correction, has to be written somewhere else and
loaded back in later. As of October 2026 that ranges from memory built into products, such as
ChatGPT's memory and the CLAUDE.md files and auto memory notes in Anthropic's Claude Code, to
building blocks for developers, such as LangChain's LangGraph long-term store and Anthropic's
memory tool.

Memory makes an agent more useful, and it also makes its mistakes last. Claude Code's docs put
it plainly: memory is context, not enforced configuration, so a model can still ignore a
remembered rule, and a stale or wrong note keeps shaping behavior after the session that wrote
it has ended. Microsoft's June 2026 guidance on agent memory safety calls persistent memory a
configuration layer for the system, because a memory saved today can change behavior later.

The worst case is memory poisoning: an attacker's instruction or a false fact saved into
memory on purpose. The OWASP GenAI Security Project lists it as ASI06, Memory & Context
Poisoning, in its Top 10 for Agentic Applications 2026, and 2026 papers showed text hidden in
an email or other external content getting agents such as OpenClaw and Claude Code to save an
attacker's instruction and act on it in a later session.

## Questions answered under this concept

- [Can one email change an agent's future behavior?](https://tessary.ai/answers/agent-memory/can-one-email-change-an-agents-future-behavior)
- [How do you find and fix a poisoned agent memory?](https://tessary.ai/answers/agent-memory/how-do-you-find-and-fix-a-poisoned-agent-memory)
- [How do you test an agent that has memory?](https://tessary.ai/answers/agent-memory/how-do-you-test-an-agent-that-has-memory)
- [Should an AI agent be allowed to write its own memory?](https://tessary.ai/answers/agent-memory/should-an-ai-agent-be-allowed-to-write-its-own-memory)
- [What is agent memory?](https://tessary.ai/answers/agent-memory/what-is-agent-memory)
- [What is agent memory poisoning?](https://tessary.ai/answers/agent-memory/what-is-agent-memory-poisoning)
- [What's the difference between agent memory and RAG?](https://tessary.ai/answers/agent-memory/whats-the-difference-between-agent-memory-and-rag)
- [What's the difference between short-term and long-term memory in an AI agent?](https://tessary.ai/answers/agent-memory/whats-the-difference-between-short-term-and-long-term-memory-in-an-ai-agent)

---

Source: https://tessary.ai/answers/agent-memory
All concepts: https://tessary.ai/answers
From Tessary, agent reliability for AI agents in production: https://tessary.ai
