Systems, agents, retrieval, infrastructure

Agent Memory, State, and Long-Horizon Planning

Agent memory is often oversold as chat history plus a vector database. In production, memory is a set of typed state stores with different lifetimes: conversation state, user preferences, task plans, tool observations, artifacts, durable records, and organization knowledge.

Deep dive summary

What this module actually teaches.

Passage 1Agent memory is often oversold as chat history plus a vector database. In production, memory is a set of typed state stores with different lifetimes: conversation state, user preferences, task plans, tool observations, artifacts, durable records, and organization knowledge.

Passage 2This module breaks down planning patterns such as ReAct, plan-and-execute, reflection, critique loops, hierarchical task decomposition, and supervisor-worker orchestration. Learners evaluate when planning improves outcomes and when it only burns tokens while hiding failure modes.

Passage 3The implementation focus is state discipline. Students learn to make agent plans inspectable, resumable, cancellable, and bounded by explicit budgets so long-horizon autonomy remains debuggable and safe.

Learning operating system

Module prerequisites, concepts, outcomes, and artifacts

Prerequisites

  • Tool calling
  • workflow design
  • basic retrieval concepts

Key concepts

  • typed memory stores
  • plan-and-execute loops
  • reflection patterns
  • task decomposition
  • budgeted autonomy
  • resumable state
  • agent cancellation

Target audience

  • Engineers building research agents, coding agents, operations copilots, or multi-step business automation.

Outcomes

  • Model agent state by lifetime and risk level
  • Choose planning patterns based on task complexity
  • Design controls for cancelling, resuming, and inspecting agent work

Artifacts

  • agent state inventory
  • long-horizon planning flowchart
  • read-only supervisor loop example

Code example

Real patterns, ready to copy into your editor.

A code reference card that frames this module's concepts in real syntax. Copy any example to study it or adapt it directly in your own editor.

Copy-ready snippets
curriculum/se-agent-memory-state-planning.tsts
1type ModuleBrief = {2  track: string;3  difficulty: string;4  keyConcepts: string[];5  reviewGate: 'human-review-required';6};7 8export const moduleBrief: ModuleBrief = {9  track: 'Software Engineers',10  difficulty: 'Advanced',11  keyConcepts: [12    'typed memory stores',13    'plan-and-execute loops',14    'reflection patterns',15    'task decomposition',16    'budgeted autonomy',17  ],18  reviewGate: 'human-review-required',19};