Memory Stream

advanced
ArchitecturesLast updated: 2025-01-15

What is Memory Stream?


A memory stream is a chronological log of observations, experiences, and reflections that forms the foundation of an agent's long-term memory, popularized by the Generative Agents architecture. Each entry in the stream represents a discrete observation or experience, timestamped and stored in the order it occurred. The stream grows continuously as the agent interacts with its environment, creating a comprehensive record of the agent's experiential history.


Unlike traditional database storage, the memory stream emphasizes temporal ordering and treats each observation as a first-class memory object that can be retrieved, reflected upon, and used for reasoning. The stream supports multiple types of entries including direct observations (things the agent perceives), reflections (higher-level insights synthesized from multiple observations), and plans (intended future actions). Retrieval from the memory stream considers recency, importance, and relevance to surface the most salient memories for current decision-making.


Memory streams enable sophisticated agent behaviors by providing rich experiential context. Agents can retrieve relevant past experiences to inform current decisions, generate reflections that abstract patterns from multiple observations, and maintain coherent long-term behavior. The Generative Agents paper demonstrated how memory streams support believable agent behavior in simulated environments, with agents remembering past interactions, forming relationships, and exhibiting temporal consistency in their actions and knowledge.


Related Terms