---
order: 40
---

# Understanding Agent Memory

Agent Memory stores context that will continue to affect collaboration later.

It is not a chat archive, and it is not better just because it is longer. Good Memory helps an agent avoid repeated questions without being misled by stale information.

## What Memory Is For

Memory is useful for stable, long-lived information such as:

- project goals and lasting constraints
- user or team preferences
- collaboration conventions
- ongoing task state
- confirmed decisions

If this information only exists in one conversation, the agent may need you to explain it again next time. Organizing it as Memory helps the agent pick up the context later.

## What Memory Should Not Store

Do not save every chat message as Memory.

These usually should not go into Memory:

- one-off input for the current task
- unconfirmed guesses
- short-lived temporary plans
- long unprocessed chat excerpts
- project status that is already stale

Memory should be selected long-term context, not a pile of raw history.

## Memory Versus Roles And Skills

The easiest distinction is:

- Role says what the agent is responsible for.
- Skill says how a repeatable kind of work should be done.
- Memory preserves what the agent should continue to reference later.

For example, "you are the release coordinator" belongs to Role; "check releases with this checklist" belongs to Skill; "this project ships every Wednesday and the current risk is mobile compatibility" belongs to Memory.

## Maintaining Memory

Memory needs maintenance. When project state, decisions, or conventions change, update it.

If old information would mislead the agent, do not just append a new note. Replace or remove the old content. Completed temporary items, invalid assumptions, and stale preferences should also be cleaned up.

Avoid saving the same fact in several different ways. If Memory contains conflicts, the agent may not know which one to trust.

## Next

- [Agent Team](./agent-teams.md)
- [Operating Agents](./operate-agents.md)
