The model is stateless. It forgets everything the moment a request finishes. A memory system is how a harness papers over that gap. It writes facts to an external store, then reads them back into context on a later run, so the agent behaves as if it remembers your project.
Memory is just text the harness reloads
Nothing is stored inside the model. Memory lives outside it, in places you control:
- Files in the repo, like an AGENTS.md of standing conventions.
- Scratch notes an agent writes for its future self.
- A database of facts keyed by user or project.
At the start of a new session, the harness pulls the relevant slice back in. That is the whole trick: the "memory" is real files and records, and being stateful is a property of your system, not the model.
Keep it small and current
The danger is a memory system that grows without bound. Everything it reloads spends space in the context window and thins the model's attention. Store the durable stuff (decisions, conventions, hard-won facts) and let the transient stuff go. Stale memory is worse than none, because the agent will trust an outdated fact as confidently as a fresh one.
Related terms
Stateful
Stateful describes anything that keeps state across requests: conversation history, memory, a session. In an agent that job belongs to the harness or app, never to the stateless model API.
Read definition →AGENTS.md
AGENTS.md is a project file of standing instructions and conventions that an agent loads into context at the start of a session. It gives a repo its own durable memory, checked into version control next to the code.
Read definition →Context pointer
A context pointer is a reference (a path, URL, or id) you give an agent instead of the full content, so it can fetch the material only if and when it needs it. It is a cheap way to make a lot of context available.
Read definition →