Apply a scratchpad change from the LLM response. Handles both notes and task list changes in one call.
Reset the scratchpad to empty state.
Enforce the maximum task limit by pruning completed tasks (oldest first). Returns the number of tasks pruned.
Return individual non-empty note lines from the scratchpad notes.
Get the current notes content.
Return counts per status.
Return the current task list.
Return tasks filtered by status.
Returns a compact one-line summary of task progress. E.g., "3 of 7 tasks complete, 1 blocked"
Returns true if the scratchpad has any content (notes or tasks).
Enforce a maximum number of note lines in the scratchpad by pruning the oldest low-priority note lines first, then the oldest remaining lines if still over the limit.
High-priority notes are lines marked with [HIGH], [IMPORTANT], [PINNED],
PRIORITY: HIGH, ❗, or ⚠️ (case-insensitive). All other non-empty lines are
treated as normal/low priority and are pruned oldest-first before any high-priority
notes are removed.
Maximum number of note lines to retain (must be >= 0)
Number of note lines pruned
Remove tasks by ID.
Replace the current notes content.
Returns a plain object snapshot for persisting in step InputData/OutputData.
Generates a compact markdown representation for prompt injection. More token-efficient than raw JSON dump.
Add new tasks or update existing ones (matched by id). If a task with the same id exists, it is replaced entirely.
Manages the agent's ephemeral scratchpad (notes + task list) during a single run.
The scratchpad is:
Example