liveBook · Manning

Working memory

As explained in Build a Multi-Agent System (from Scratch)

Working memory is transient memory that retains an agent's progress during its current task execution.

During a multi-step task, an LLM agent needs to know what it has already done before choosing its next action. Working memory retains that progress for one task execution; it is transient and limited by the LLM’s context window. section 7.1.2

In a stepwise agent loop, the TaskHandler’s rollout carries prior progress into each step’s system message. After the step completes, its experience is appended to the rollout for the next step. The state is not retained after the task ends. section 7.1.2

Boundary of memory
Artifact
Derived from LLM agent experience?
Working or Episodic Memory
Input and output of a task execution
Yes
Episodic
Lesson extracted from task execution
Yes
Episodic
Rollout injected into system message
Yes
Working
User preference
No
N/A
Skill
No
N/A
LLM’s parametric weights
No
N/A
RAG over Wikipedia
No
N/A

Compare the task rollout classified as working memory with episodic records and artifacts that are not memory. section 7.1.2

In multi-agent systems, a coordinator may discard subagents’ rollouts to avoid filling its context window, while those subagents retain separate long-term memory. section 7.6

How Build a Multi-Agent System (from Scratch) covers it

How deep it goes
Defines context-window-limited state and traces rollout injection and appending across stepwise chat interactions.
Examples
Injects prior-step rollout into a system message, then appends the completed step’s experience.
What you can do after
Operate a stepwise agent loop by carrying its rollout between interactions and discarding it when task execution ends.
How it connects
Connects to LLM agents, context windows, rollouts, and episodic memory.

Also explained in

Compare how 11 books explain working memory →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Multi-Agent System (from Scratch). The section links point to the parts of the book it draws on.