API Reference
Scratchpad
Defined in: tools/builtin/scratchpad.ts:37
The scratchpad seam — a single slot of free-form text the agent reads and overwrites.
Remarks
Swap the shipped InMemoryScratchpad for a file/DB-backed implementation if you want the notes to outlive the process or be shared across sessions.
Methods
read()
read(): string;Defined in: tools/builtin/scratchpad.ts:39
Return the current contents (an implementation decides how "empty" reads).
Returns
string
write()
write(content): string;Defined in: tools/builtin/scratchpad.ts:41
Replace the contents wholesale, returning what was stored.
Parameters
| Parameter | Type |
|---|---|
content | string |
Returns
string