C.W.K.
Stream
Lesson 01 of 05 · published

Working Memory: Scratchpads and Run State

~26 min · scratchpad, state

Level 0Observer
0 XP0/40 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

The agent needs a desk

Working memory is temporary state for the current task. It is where the agent keeps partial findings, assumptions, current plan, open questions, and tool handles that should not become permanent memory.

Do not confuse working memory with long-term memory. Working memory is the messy desk during the job; long-term memory is the filing cabinet after the job.

Make it visible

A visible scratchpad beats hidden hope. Store run state in structured fields so tools, policies, and logs can inspect it. The model can see a concise version; the executor can rely on the exact version.

This is especially important under context pressure. If the scratchpad is explicit, it can be compacted, summarized, or persisted without losing the job's spine.

Code

Run state scratchpad·json
{"task":"audit deployment","plan":["read config","check logs","summarize risk"],"findings":[],"open_questions":["which environment is prod?"],"tool_handles":[]}

External links

Exercise

Design a scratchpad schema for a research agent. Include plan, findings, sources, and open questions.
Hint
Keep it structured enough that code can inspect it.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.