Scratchpad
Working memory for intermediate reasoning steps
Mechanism
A designated working memory region where the agent can write intermediate calculations, partial results, and notes-to-self during multi-step reasoning. Unlike the main output, scratchpad content is explicitly for the agent's own use and may be hidden from the final response. Prevents context pollution while enabling complex reasoning. It provides the persistence layer for chain-of-thought, storing the intermediate states of the reasoning process.
Invariants
- Bounded by `max_size`, which every scratchpad declares.
- Persistence: contents survive across reasoning steps within a task.
- Separation: scratchpad content is distinct from final output.
Failure modes
- Scratchpad leak: internal working notes reach user-facing output.
- Bound reached mid-reasoning: content must be dropped or summarised to continue, so earlier working is lost while the reasoning that depended on it continues.
Where this came from
—
Used by
- Reflexion references
Identity
- Ref:
Scratchpad#626c - Hash: sema:Scratchpad#mh:SHA-256:626c5a0a716ab29b51e68429d41e99619201af48d17975d89636b55b8dc852f5
- Library: bootstrap 0.11.0, root a6a3d1ff0f98
- License: Not stated; check the repository