Memory

Scratchpad

Give the agent a writable scratch space for intermediate notes that informs later turns but does not pollute the response.

Problem

Without a dedicated scratchpad, the intermediate work has nowhere appropriate to live. Either it pollutes the user-visible response, so the user sees half-finished computations and the agent's running commentary, or it is held only in the conversation history and is lost the moment that history gets trimmed. Either way the agent loses the artifact that was supposed to support its own reasoning, and the user is forced to read through clutter that was never meant for them.

Solution

Provide a tool or convention for writing to a scratchpad (a section of the prompt, a tool call, a file). The agent reads from and writes to it across turns. The user-visible response is separate. The scratchpad is purged at task completion or expires with the session.

When to use

  • Long tasks benefit from intermediate notes that should not appear in user output.
  • The agent needs to carry computations or unresolved questions across turns.
  • A separate writable space (tool, file, prompt section) can be added.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related