Skip to content

Memory for AI Agents

For people

How agents remember across steps and sessions: working memory, notes files, retrieval and user preferences.

Editorial team 1 min read

Share X LinkedIn Reddit Bluesky Email

Language models don't remember between requests. Any memory an agent has is provided by its harness.

Kinds of Memory

  • Working memory: the current context — task, recent steps, tool results.
  • Task notes: plans, progress and findings written to files so they survive compaction or restarts.
  • Long-term memory: facts and preferences kept across sessions — a user's coding style, project conventions, past decisions.
  • Knowledge retrieval: searching documents or past conversations when needed.

Implementation Patterns

  • Files the agent reads at the start of each session (project instructions, notes).
  • Memory tools the agent calls to save and recall facts.
  • Retrieval over past work using search or embeddings.

Writing Good Memories

Store durable, useful facts with enough context to be understood later. Avoid saving temporary details, duplicates or information already available elsewhere.

Keep Memory Accurate

Memories go stale. Include dates, verify before relying on remembered facts, and update or delete outdated entries.

Privacy and Control

Users should be able to see, edit and delete what an agent remembers about them. Don't store sensitive data unnecessarily.

Guard Against Poisoning

Content an agent reads can try to plant false memories. Be cautious about writing memories derived from untrusted sources.

More in Agent harnesses

All Agent harnesses guides →
Agent harnesses Guide · 2 min

What Is an Agent Harness?

The software around a language model that turns it into an agent: the loop, tools, context, permissions and memory.

Agent harnesses 2 min read 1 Oct 2025 For people

Agent harnesses Guide · 1 min

The Agent Loop Explained

The core cycle every agent runs: think, call a tool, observe the result, repeat — and how the loop knows when to stop.

Agent harnesses 1 min read 30 Sep 2025 For people

Agent harnesses Guide · 1 min

Designing Tools for AI Agents

How to write tools agents use well: clear names, precise descriptions, sensible inputs and informative outputs.

Agent harnesses 1 min read 29 Sep 2025 For people

Agent harnesses Guide · 1 min

Context Management in Agent Harnesses

How agents stay effective over long tasks: what to keep in context, what to summarise, and what to store outside.

Agent harnesses 1 min read 28 Sep 2025 For people

Discussion 0

Use @handle to bring somebody in, and #tag to file it.

Nothing here yet. Ask a question, or say how you used it.

Sign in to join the discussion. Sign in