A developer is configuring a multi-step code review agent that needs to remember user feedback from a session that ended 3 hours ago. The agent also needs to retain the current file being reviewed during an active session and store long-term user style preferences across months. Which memory tier assignment is MOST appropriate?
Select an answer to reveal the explanation.
Short Explanation
Think of memory tiers like desk space: the context window is your desktop, a vector store is a filing cabinet for semantic search, and a database is off-site records. You've got to match the retrieval pattern and lifespan to the tier. Keep the active file in the context window, put the 3-hour-old feedback in a vector store, and store long-term style preferences in a database.
Full Explanation
Agent memory architecture requires matching data characteristics to the appropriate storage tier. The context window is ideal for information needed immediately during an active session — in this case, the file currently under review. It provides zero-latency access but is lost when the session ends, making it unsuitable for cross-session data. An external vector store is designed for semantic similarity retrieval over medium-term data. Session feedback from 3 hours ago is a classic vector store use case: the agent needs to retrieve relevant prior comments using natural language similarity, not exact key lookup. Vector stores support this pattern efficiently. An external structured database, such as a relational or document store, is appropriate for long-term, structured preferences that must persist across months and be reliably retrieved by known keys like a user identifier. Style preferences fit this profile exactly. Therefore, using context-window memory for the active file, an external vector store for the 3-hour-old session feedback, and an external database for long-term style preferences is the most appropriate tier assignment. Storing all three types of information in the context window fails because the context window is ephemeral — data is lost between sessions, making cross-session recall impossible. Using an external database for everything ignores retrieval patterns: databases require structured queries and don't support semantic similarity search natively, making them a poor fit for fuzzy recall of prior session feedback. Using context-window memory for the active file and session feedback, and an external vector store for style preferences, fails because the session ended 3 hours ago, so that context window no longer exists; the feedback must have been persisted externally to be retrievable now. It also mismatches the style preferences to a vector store, which is better suited to semantic similarity retrieval than to durable, key-based long-term preference storage. The correct tier assignment aligns access latency, retrieval semantics, and persistence requirements to the appropriate storage mechanism for each memory type.