Sistava

What is Shared Scratchpad?

Also called shared workspace, scratchpad memory.

A shared scratchpad is a mutable working area that several agents, or several steps of one agent, can read and write during a task. It holds intermediate notes, partial results, and open questions that would otherwise be lost between steps, and it is normally discarded when the task ends rather than persisted as long term memory.

The scratchpad addresses a structural limit: a model's context window is finite, and everything not written down disappears once a step's output scrolls out of it. Externalizing intermediate work into a file, a database row, or a structured object lets an agent reread its own earlier findings later, and lets a second agent pick up work the first began.

Scratchpads differ from long term agent memory in lifetime and intent. Memory is meant to persist across tasks and be retrieved selectively later. A scratchpad is scoped to one task, is usually read in full rather than searched, and is expected to be deleted or archived on completion. Conflating the two fills memory stores with transient noise.

Structure matters more than capacity. An unstructured scratchpad that grows freely becomes an unreadable transcript, so useful designs impose sections, headings, or typed fields so an agent can read only the part it needs. Some designs require agents to rewrite and compress the scratchpad periodically rather than only appending to it.

With several writers, the same concurrency issues apply as in any shared state. Append only entries with clear authorship avoid lost updates, and stale reads are a genuine hazard when one agent acts on a section another has already superseded. Timestamps and explicit supersede markers are the usual mitigations.

Key points

In practice

A research agent writing a market summary keeps a scratchpad file with three sections: sources read, extracted claims with citations, and open questions. After twenty tool calls its context no longer contains the first pages it visited, but rereading the extracted claims section restores what mattered. A second agent later drafts the summary from that file without repeating any of the browsing.

Related terms

Back to the AI Glossary