PaPoo
cover

What is an agent scratchpad?

An agent scratchpad is the temporary working area an AI agent uses to keep intermediate notes, steps, or partial results while it solves a task.

Why it matters

A scratchpad helps an agent “think through” a multi-step problem instead of trying to answer in one shot. It is useful when a task requires planning, tool use, multi-step reasoning, or keeping track of state across turns.

In practice, teams reach for a scratchpad when they want the agent to:

How it works

An agent scratchpad is usually just text attached to the agent’s current run or turn. The agent writes intermediate observations, plans, or sub-results into it as it goes.

In some systems, the scratchpad is part of the model prompt, so the model can see its own prior steps. In others, it is an external buffer managed by the orchestrating app: the app stores intermediate state, then feeds only the relevant parts back to the model.

A scratchpad is not necessarily meant for the end user. It is often an internal workspace, similar to a notebook margin, where the agent can keep track of:

One important caveat: “scratchpad” is a slightly overloaded term in agent literature and product docs. Sometimes it means hidden chain-of-thought-style reasoning; sometimes it means any intermediate working memory. The core idea is the same: temporary workspace for the agent, not the final response.

Tiny concrete example

Suppose an agent is asked:

“Find the cheapest flight option and summarize it.”

Its scratchpad might contain something like:

The user only sees the final recommendation, not necessarily the whole scratchpad.

Common pitfalls / when NOT to use it

Related terms

同じ著者の記事