AWS's Strands Stash turns agent context into plain files

AWS open-sourced Strands Stash: a local filesystem mount where agents park large tool results and read back only what they need. The interesting part is not the token saving, it is that your context layer stops belonging to one harness.

AWS's Strands Stash turns agent context into plain files

AWS's Strands Stash turns agent context into plain files

A support agent asks an issue tracker for anything on the payments service and gets 2,000 records — 144 KiB of JSON — because the tool cannot tell which five matter. All of it then sits in the context window for the rest of the session, billed on every turn, competing with the reasoning.

That is the failure AWS is targeting with Strands Stash, released this week as an Apache 2.0 tool. The premise is unglamorous: give the agent a directory, put its tool results there as Markdown and JSON, and hand the model a short preview plus a path. The model then uses ls, cat, grep and jq — tools it already knows — to fetch only the rows it needs.

What it actually does

Stash runs as a local daemon next to the agent and maintains a workspace called a mount. Each connected source gets a subfolder, and each subfolder gets a page under _sources/ describing what it holds and how to read and search it. A simplified incident-response mount looks like this:

/tmp/ops-context/
  _sources/
  agentcore-memory/incidents/            summaries of past incidents
  gateway/bedrock-knowledge-bases/runbooks/
  mcp/issues/_tools/
  mcp/issues/_tools_results/search_issues/
  local/memories/                        notes saved for later sessions

When a tool result is large but within configured storage limits, Stash writes it to the mount and returns a bounded preview saying it is partial, where the full answer lives, and how to query it. In the 2,000-record case the agent gets a compact table plus the instruction to search .items; one jq filter adds five records while 1,995 stay on disk.

Stash integrates with Claude Code, Codex, Kiro and Strands Agents, connects to Bedrock AgentCore Memory, Bedrock Knowledge Bases, Web Search and MCP servers, installs via npm or pipx, and is in preview on Linux and Apple silicon.

The real argument is harness portability

Saving tool output to disk is not new — agents have scribbled scratchpads since the first ReAct loops. What AWS is arguing, and what is worth taking seriously, is that today's workarounds have a structural flaw: they bind agent state to the harness that produced it.

Truncating results hides context the agent may need later. Trimming the window mid-session can destroy prompt-cache reuse. Writing a bespoke tool per data source makes every source schema ride along in every request. AWS's own summary of the problem: "These workarounds still leave agent state tied to its harness. A harness's own compaction and memory stay inside that harness, so teams rebuild the context layer when they change harnesses."

That sentence matters more than the tool. Most shops now run two or three coding agents plus an in-house one, and switching harnesses means rebuilding the retrieval and memory layer each time. A plain folder of files is the least fashionable interface available — and the only one every harness supports.

Where the costs actually move

Stash does not make context free; it relocates the cost:

Turns. Progressive disclosure costs a turn. The agent reads a source page, searches, reads a preview, then filters. On a short single-question task with a small result, AWS concedes that this overhead "may outweigh the benefits" and recommends calling the source directly.

Read-back. Text does not compress. A long document or a code file that must be read whole gains nothing from being written to disk and read again. AWS is explicit that research and code-review workloads over generic MCP servers see less benefit.

Mounts also accumulate: Stash expires content on source settings and evicts least-recently-used files at the size limit, but the defaults are yours.

The security question nobody wants to ask

The mount is a working copy of whatever the agent touched — customer records, post-mortems, knowledge-base passages — as plain files on disk. AWS is blunt: anyone who can read the folder can read what Stash saved there.

For a team in India shipping under the DPDP Act, that is a compliance artefact, not an implementation detail. A cache of personal data at rest needs a defined retention period, a deletion path, and access controls at least as strict as the source's. If the source deletes a record, the cached copy does not necessarily vanish on the same schedule. Treat local/memories/ as production storage: mode 700, one mount per agent, never inside a repo that gets pushed.

Three 0.1 caveats decide timing: no OAuth credential management for remote MCP servers, no SSE transport, no Windows, and the Strands harness's built-in sub-agent does not receive the mount.

A checklist before you adopt it

Run this on one real project, not a demo.

  1. Baseline first. Same model, same prompt, same data, same success criteria — once with Stash, once without. Compare task success before cost, then cost per successful task, tokens, turns and source calls.
  2. Pick a workload with shape. Ticket lists, pipeline records, build logs, large JSON. Not prose.
  3. Set the size limits deliberately. Small enough that a runaway result cannot fill the disk; large enough that your 90th-percentile result lands intact.
  4. Write down freshness. How long may a cached record be stale before the agent behaves wrongly?
  5. Test deletion. Delete a record at the source and confirm the mount stops serving it.
  6. Lock the mount. Ownership, mode 700, encryption at rest, and no backups unless the source's retention allows it.
  7. Check harness portability for real. Run the same task under a second harness on the same mount. If it works, you bought what AWS is selling.

Stash is not the interesting part. The industry is converging on the filesystem as the neutral interface between an agent and its own memory; the durable investment is a context layout you own and can move, not a harness feature.

At NetPy we build and run agent systems for clients through our engineering practice and host the infrastructure under them on NetPyCloud — where a decision about where an agent's working copy lives stops being academic.


Header image: a shell directory listing — the interface Strands Stash borrows for agent context. Screenshot of GNOME Terminal 3.43 by The GNOME Team, GPLv3, via Wikimedia Commons.