AI agents should load a short memory index at the start of each session and retrieve detailed knowledge only when needed.
An AI agent with a long history cannot fit every past experience into each new conversation. Anthropic describes four layers of persistent memory: searchable session records, notes about useful experiences, linked knowledge such as wikis, and a small amount of context loaded at startup. A short startup index tells the agent what knowledge exists and where to find it, while detailed notes stay available for on-demand retrieval. Claude Code illustrates this approach by loading only the first 200 lines or 25 KB of its MEMORY.md index.
