# Agentic Ai Engineering
All Agentic Ai Engineering notes →1. Why Agents Need Memory
Frames the stateless-by-default nature of LLM inference and why an agent operating across multiple tool calls, sessions, or users needs an explicit memory subsystem rather than relying on the context window alone.
2. Context Windows
Covers context window mechanics -- token budgets, attention cost scaling, and the tradeoffs between stuffing history into the prompt versus offloading it to external memory as conversations grow beyond a model's context limit.
3. Working Memory
Covers the agent's working memory -- the mutable scratchpad of current task state, intermediate reasoning, and tool outputs that lives only for the duration of a single execution loop.
4. Short-Term Memory
Covers short-term memory as bounded, session-scoped conversation history -- sliding windows, summarization-on-overflow, and the tradeoffs of truncation versus compression when a session outlives the context budget.
5. Long-Term Memory
Covers persistent long-term memory that survives across sessions and restarts -- durable storage backends, write/consolidation policies, and how an agent decides what's worth remembering permanently versus discarding.
6. Semantic Memory
Covers semantic memory as structured factual and conceptual knowledge decoupled from any specific conversation, and how agents store and query general world/domain knowledge distinct from episodic event history.
7. Episodic Memory
Covers episodic memory as a log of specific past events and interactions -- what happened, when, and in what context -- and how agents use it for recall of prior incidents, user preferences, and precedent-based reasoning.
8. Memory Storage Architectures
Compares the storage architectures underpinning agent memory -- relational stores, key-value stores, document stores, and hybrid designs -- and the read/write access patterns that should drive the choice for a given memory type.
9. Vector Databases
Covers vector database fundamentals for agent memory -- embedding generation, ANN indexing such as HNSW and IVF, similarity metrics, and the recall/latency/cost tradeoffs relevant to a MAANG-level system design conversation.
10. Knowledge Graphs
Covers knowledge graphs as a structured alternative to vector similarity search -- entity-relationship modeling, graph traversal for multi-hop reasoning, and when graph-based retrieval outperforms embedding-based retrieval for agent memory.
11. Memory Retrieval
Covers retrieval strategies for pulling relevant memory back into an agent's context -- similarity search, recency/relevance/importance scoring, hybrid retrieval, and re-ranking before injection into the prompt.
12. Memory Compression
Covers techniques for compressing accumulated memory before it consumes context budget -- summarization hierarchies, reflection-based consolidation, and lossy versus lossless tradeoffs as an agent's history grows unbounded.
13. Memory Versioning
Covers versioning and conflict resolution for agent memory that changes over time -- handling contradictory updates, temporal validity windows, and rollback when a memory write turns out to be wrong.