Memory: from context to vector stores
An agent's three memory layers: context (the current session), working notes (the task's plan and findings) and long-term memory (knowledge across sessions — a vector store, as in RAG). When each layer matters and what costs tokens.