State and Memory
38%
Lesson 3 of 8

State and Memory

State is what the agent needs for the current task; memory is information intentionally carried across steps or sessions.

Active reading
State

Current task facts.

Memory

Selected information retained.

Scope

How long should it persist?

Do not remember everything by default

Agents often need temporary state such as the current objective, tool results and remaining steps. Long-term memory should be deliberate and limited.

Store only information that improves future performance and is appropriate to retain.

Example
Current state: query, three retrieved sources, draft. Memory: a user-approved writing preference—not every raw interaction.
Quick check

Explain this lesson back in one sentence before continuing. If you cannot, reread the example and key takeaway.

Common mistake

Unbounded memory increases privacy risk and can contaminate later tasks with irrelevant context.

Key takeaway

Separate short-lived task state from intentional, minimal long-term memory.

Next lesson

Observation

Continue to the next lesson.

Continue →