BD Brain Drip
💾
Module 04 4 concepts

State & Memory Across Steps

Working memory, structured state, context window management, and persistent memory.

01

Context Window Pressure

Every agent step consumes context window space, and when the window fills up, the agent must either summarize, prune, or fail — making token budgeting a core engineering concern for long-running agents.

02

Conversation as Working Memory

The message history in an agent loop functions as working memory, accumulating context that shapes every subsequent reasoning step and tool invocation.

03

Persistent Memory Across Sessions

Working memory vanishes when an agent session ends; persistent memory uses checkpointing, databases, and long-term stores to let agents remember information across separate invocations.

04

Structured State Management

When conversation history alone cannot reliably track complex agent state, typed state objects and explicit key-value stores give agents a structured, programmatically accessible memory that survives context window pressure.