Agents and Memory

Environment + tools + a model that plans: how to build one, break it and measure it.

Reference · Chapter 6 (Agents, Memory)

Shape

Tools

KindExamples
Knowledge augmentation (read)Retrievers, SQL, internal APIs, web search
Capability extension (read)Calculator, converters, code interpreter, image generator, OCR
Write actionsSend email, update DB, payments, merge code: gate with human approval

Plan → validate → execute → reflect

Failure modes → what to measure

FailureExample
Planning: invalid toolbing_search when only web_search exists
Planning: invalid parameterssend_email(attachment=…), no such argument
Planning: wrong parameter valueslbs_to_kg(lbs=100) for 120 lb
Planning: goal failureTrip plan over the $5,000 budget; finished after the deadline
Planning: reflection error40 of 50 people roomed, “Done!”
Tool failureSQL generator writes the wrong year; missing a tool the task needs
EfficiencyCorrect, but too many steps, too much cost or time

Metrics: % valid plans, plans needed per valid plan, % valid tool calls, rate of each failure, steps / cost / time per task vs. a baseline.

Memory

MechanismIsFor
Internal knowledgeWeightsNeeded by every task (change via finetuning)
Short-termContext windowThis task, right now
Long-termExternal store + retrievalRare or cross-session information

← Lesson 7RAGGlossary

Related ideas