Skip to main content
Scratchpad tools give agents a shared workspace for collecting notes, drafting content, and coordinating findings before taking action. Instead of writing a comment or review immediately, agents can accumulate results in a scratchpad and publish only when ready.

Available tools

Naming rules

Names support letters, numbers, hyphens, and underscores only. No slashes or spaces. Examples: findings, review-summary, security_notes, chunk-1

Collecting results before publishing

Agents often need to gather information across multiple files, tests, or analysis steps before producing a final output. Scratchpads act as a staging area: agents write findings as they go, then read the scratchpad to compose a polished comment, review, or ticket update.
This pattern avoids scattered, incremental comments. The agent builds up a complete picture first, then publishes once.

Multi-agent collaboration

In an agent.session, multiple agents share the same scratchpads. Each agent can append its findings independently, and the coordinator can read everything to produce a consolidated result. Use append_scratchpad when multiple agents contribute: it prevents agents from overwriting each other’s work.

Passing context between workflow steps

Scratchpads persist across steps within a workflow run. An agent in one step can write a scratchpad that agents in later steps read, without relying on {{outputs}} templates. This is useful when:
  • The data is too large or structured for step output templates
  • Multiple steps need to build up a shared document incrementally
  • You want a later step to consume structured content directly

Content format

Scratchpads store plain text, but you control the format by instructing the agent what to write. You can use Markdown, JSON, JSONL, or any other text format that fits your workflow. For example, instruct an agent to append one JSON line per finding to make it easy for a later step to parse, or use Markdown for a human-readable draft.

When to use scratchpads vs step outputs