AI Agent Architecture: Memory & Knowledge: State, RAG, and Knowledge Graphs by Design - Context Assembly, Episodic and Semantic Stores, a Measured ... ... (The AI Agent Architecture Series Book 3)
English | September 13, 2026 | ASIN: B0HJN6G4YV | 232 pages | Epub | 1.72 MB
The context window is a cache, not a store - and an agent that keeps its history in the prompt has confused the two.Atlas, Meridian Supply Co.'s customer-operations agent, learned to take many steps safely in Book 2. It still began every run empty. When Kestrel Labs asked any news on my earlier request?, Atlas answered a request it had no way of knowing about; when Lena put the previous replies in the prompt to fix it, Northgate Tooling's history overflowed the window in the second week - and before it overflowed, the model had quietly lost the one fact in the middle that the customer cared about. This book builds the memory subsystem that a many-step agent needs, one store at a time, each justified by an incident and proved by a test.Every chapter is a lab on the companion repository - one dependency, fully offline with a scripted mock, every listing printed from a verified line range, every command paired with its expected output. Five moves per chapter: Run the demo, Read the listing, Break it with the chapter's planted failure, Fix it with the design move, Prove it with a test that turns green. You will

raw the memory map - working, episodic, profile, semantic, procedural - from the run states Atlas actually produces, and measure the day the prompt overflowsTreat the context window as a budgeted cache with priorities, relevance, an order that survives to the prompt, and an eviction log - and draw the budget curve to its kneeHand-build a vector store - tokens, vectors, cosine, three chunkers - and show with a table that how a document is cut matters more than how it is searchedRebuild RAG as a pipeline with a metric at every stage and a grounding contract that refuses an invented sentence by name - and learn exactly what the contract cannot catchAdd a knowledge graph over the systems of record for the questions that are paths, not passages - and see the failure of graphs built from proseGate every write-back by source: episodes, stated preferences, and human verdicts kept; tool results and model prose refused - then remove the gate and watch the index grow sixteenfoldReproduce a lost update a hundred times and fix it with compare-and-set: one integer, one comparison, one loop, zero lostEvery chapter carries a research lineage (Atkinson-Shiffrin and Tulving, Lost in the Middle, case-based reasoning, BM25, RAG and the Cranfield tradition, GraphRAG, consolidation, data-protection retention, optimistic concurrency), a five-item failure catalog, an applied deep-dive, and exercises in three tiers. Ten figures, a hundred and thirty-three tests, twenty-six decision records, one running system that grew from Book 2's graph without removing a node of it.Who it's for: engineers designing what agents remember and know - anyone who has bolted a vector database onto a prompt and wants to know what should go in it, what should never, how to measure whether it helps, and how to forget on purpose. Assumes Book 2 or the equivalent; basic Python; no framework, no GPU.The AI Agent Architecture Series is the architect's track: one architectural layer per book, on one running system the reader refactors and grows by hand. This is Book 3, Memory & Knowledge - what the agent remembers, designed and measured.