Watch how most multi-step agents pass state around and you'll see the same pattern: the output of step one gets pasted into the prompt of step two, which pastes it into step three, and everything accumulates in logs forever. Intermediate results, tool outputs, sometimes credentials a tool happened to return — all of it sitting in context windows and log files long after it was needed.

That is both a security problem and a cost problem. Secrets persist where they shouldn't, and every downstream call pays tokens to carry state that only one step actually needed.

I wanted a different primitive: storage that burns after it is read. So I built it as a tiny API.

Burn-after-read, as an API call

NULL Scratch is one endpoint:

curl -X POST https://api.nullpk.com/v1/scratch \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "data": { "plan": ["search", "extract", "summarise"], "source": "step-1" }, "max_reads": 1, "expires_in": 3600 }' 

You get back an object id and a read key (capability keys — whoever holds the read key can fetch the object, no account needed on the reading side). The next step in your pipeline fetches it exactly once. After that read, the object is gone: every further fetch returns 404, the same as if it had never existed. Anything unread still expires on its own — expires_in runs from 60 seconds to 24 hours, and payloads are capped at 32 KB, because this is a state hand-off, not a database.

max_reads is the interesting knob. Set it to 1 for a true burn-after-read hand-off. Set it higher for a fan-out where three workers each need the same briefing — then it burns after the third read instead of the first.

Why not just use Redis / a gist / a temp file?

You can, and for a single machine you should. The cases where this earns its keep:

  • Across trust boundaries. A cloud agent produces state; a tool running on your local machine consumes it. Neither should hold the other's credentials. The read key is the whole capability — scoped to one object, dead after use.
  • Across vendors. Agent A's framework and agent B's framework share nothing except HTTP. A URL plus a key is the lowest common denominator.
  • When the state is sensitive. A one-time secret, a session token, a user's document that the next step needs once. If it lives in a prompt, it lives in a log. If it lives in Scratch, it lives until the moment it's consumed — and then it doesn't.

When NOT to use it

  • You need an audit trail. Burned means burned; there is no recovery and no history.
  • You need durable memory across sessions. This is the opposite of that — use a real store and accept the persistence.
  • Your reader might retry. A burned read plus a crashed consumer means the state is gone. Design the producer to be able to re-issue, or set max_reads to cover your retry budget.

Ephemerality is a trade, and it is the wrong trade for a lot of jobs. But for agent hand-offs it is usually the right default, and the current default — everything persists everywhere — is how secrets end up in logs.

The rest of the toolbox

Scratch is one of five small deterministic APIs I run under NullPK Tools, all sharing one account and one credit wallet, all exposed as REST and as MCP tools:

  • NULL Trim — compresses bloated JSON, logs, and documents before they enter your context window, deterministically (typically 50–85% fewer tokens), with before/after token counts on every call
  • NULL Read — a URL in, clean Markdown out, with SSRF protections so agents can fetch pages without opening your network
  • NULL Bridge — lets a cloud agent invoke tools on your local machine over an outbound-only encrypted relay. No port forwarding, nothing listening on your box
  • NULL Lab — conformance evals for agents: scripted scenarios (a 429→503 failure storm, a destructive tool call the agent must refuse) that grade how your agent actually behaves

For MCP clients (Claude Desktop, Cursor, Windsurf), there is a hosted endpoint — one URL, https://api.nullpk.com/mcp, with your API key as a Bearer token — or a local stdio server via npx @nullpk/mcp-server.

The free tier is 1,000 credits (a Scratch write is 1 credit, a Read extraction is 2), and failed calls auto-refund, so poking at it costs nothing: tools.nullpk.com

I'd genuinely like the harsh feedback: is burn-after-read a primitive you'd use, or is the retry problem a dealbreaker? And if you run agents across machines, how are you passing state today?