AI Agent Architecture — ReAct, Memory, Planning and Multi-Agent Systems · Agent Memory — From Context Window to Vector Store
Long-term memory — embeddings, vector store and semantic retrieval
Agent Memory — From Context Window to Vector Store
Introduction
An agent's long-term memory is a library of memories the context window reaches through retrieval. The foundation is an embedding — a dense numerical vector representing the semantics of text. A vector store holds millions of such vectors and enables instant nearest-neighbor search. This lesson dissects: how embeddings work, why cosine similarity, how an index is built in a vector store, the key retrieval parameters, and common pitfalls.