Skip to content
All posts

Introducing Strands Stash: a workspace for your agent's context

Strands Stash gives agents a stateful workspace for tool results, memory, and connected sources, so each model request uses only the context it needs.

Every agent doing real work accumulates a working state: tool results, documents, search hits, past conversations, and the reports of its sub-agents. Today, many agent harnesses carry this state forward in the model’s context window with every request, even when the next step needs only a fraction of it.

This creates three specific problems. First, you pay for the same tokens repeatedly because the whole working state goes to the model again on each turn. Second, the model starts to miss relevant details buried among stale material as the context window grows. Third, compaction or the end of a session can force the agent to reconstruct prior work, including plans, decisions, and findings.

A bigger context window delays these problems but does not fix them. Every model call processes more tokens. The model can also take longer to find the relevant details.

So teams ration context by hand. They truncate tool results and hide what the agent needed. They trim the window in the middle of a session, which can reduce prompt cache reuse and erase some of the savings. They write a custom tool for each source, which grows the list of tools that the agent carries in every call. Each fix trades cost against quality.

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.

Today, we are releasing Strands Stash, an open-source tool that gives agents a stateful workspace on a filesystem that you control. Its CLI manages a local daemon that maintains the workspace in your environment.

Stash starts with local notes, so it works without an external source. When the agent searches a connected source or calls one of its tools, Stash saves supported results as files within configured limits. For a saved long result, it returns a bounded preview with a file path.

The agent and its harness choose what context to add to each model request. The rest remains available in the workspace for later steps.

The 0.1 release focuses on four use cases. It connects memory and knowledge sources, works with large structured data, and offloads results from local or remote MCP servers. It also carries useful state through long tasks and conversation compaction.

Where an agent's context lives, without Stash and with Stash

Figure 1: This comparison covers working context that the harness does not persist elsewhere. Stash keeps saved supported results as files within configured limits and starts the next session with a digest of the mount.

Agents know files

Agents already know how to work with files. Stash uses that familiar interface to organize context from different sources in one local workspace, called the Stash mount.

Here is a simplified Stash mount of an operations agent investigating incidents:

/tmp/ops-context/
_sources/ one page for each source: what it holds,
and how to read and search it
agentcore-memory/incidents/ summaries of past incidents
gateway/bedrock-knowledge-bases/runbooks/ runbook passages the agent found
mcp/issues/_tools/ one JSON schema file for each tool
mcp/issues/_tools_results/search_issues/ saved results from tool calls
local/memories/ notes the agent saved for later sessions

The pages under _sources/ tell the agent what each source contains, how to use it, and where results appear. The other directories hold the content and tool results the agent has collected.

The agent can inspect that state with tools it already knows: ls, cat, grep, and jq.

In CLI mode, it can search and call source tools without adding each source tool schema to every model request. In the default MCP mode, Stash exposes one tool for each source tool.

Because the interface is a filesystem, the same workspace pattern works across supported harnesses.

The connected source still owns the underlying data, permissions, retention, and deletion. Stash keeps a working copy for the agent.

Stash runs wherever the agent runs, on single-tenant compute: on a supported macOS or Linux computer, in a container, or in an Amazon Bedrock AgentCore Runtime session. It also integrates with Strands Box, which can isolate the agent and govern its actions while exposing the Stash mount.

Here is how the parts fit together:

  1. The agent reads the files of the mount with its own file tools before calling a source.
  2. If the needed information is missing, the agent asks Stash to search a source, call a tool, or save a note.
  3. Stash calls the source with the configured credentials, writes the supported result into the mount within configured limits, and returns a view or preview.
  4. If a source supports write-back and the customer enables it, Stash can send supported session content to the configured source for persistence, processing, and later retrieval.

How Strands Stash fits together

Figure 2: How Strands Stash fits together. The numbers match the steps above. Turn hooks provide write-back for supported harnesses; Strands Agents uses its memory manager integration.

What Stash does for each agent

This common file interface gives each agent six capabilities.

  • One interface across sources. Every source is a folder and a page under _sources/. You add a source with a few lines of config, or with a plugin. Sources follow the same file, search, and tool-result pattern.
  • Relevant agent state before the first turn. Stash places permitted records in the mount before the task begins and adds a short digest of what is available.
  • Progressive disclosure. Stash saves supported results within configured limits and gives the model a view or preview, plus a path and instructions when more content is available.
  • A managed workspace. Stash keeps source and freshness metadata when available, refreshes or expires content based on source settings, and removes less recently used cached source files when the mount reaches its size limit.
  • Local memory for reuse across steps. The agent saves structured notes, such as key facts, workflows, decisions, and diagnoses, as files that outlast a compaction. The agent can inspect a saved result again without repeating the source call.
  • Continuity across agent sessions. Local notes can survive compaction, and an optional memory integration can make selected records available to later sessions.

Let’s look at progressive disclosure on a real-sized result. Suppose an issue tracker returns 2,000 records, or 144 KiB of JSON, but the agent needs only five records about the payments service. For this result, Stash writes the complete result to the mount and returns a compact view similar to the following:

/tmp/ops-context/mcp/issues/_tools_results/search_issues/20261201T093005123Z-a1b2c3d4/
call_metadata.json content/1.json
[partial view, the whole answer is in the folder above:
content/1.json: 8% of 144 KiB; search .items with jq]
[table of the JSON, every value kept: ...]
items[2000]{number,title,state} same {"state":"open"}
...
... and 1840 more records of items

The preview tells the agent that it is partial, where the complete result lives, and how to inspect it. The agent can then run one local filter:

Terminal window
jq -c '.items[] | select(.title | test("payments"; "i"))' \
/tmp/ops-context/mcp/issues/_tools_results/search_issues/*/content/1.json

The initial preview already contributes selected rows to the context window. The filter adds only the five matching records; the complete result remains on disk.

One large tool result: a preview for the model, the full result on disk

Figure 3: The 2,000-record result. The model sees a compact table and a path. One filter adds the rows that the agent needs.

This pattern, called progressive disclosure, works especially well for tickets, pipeline records, and other large structured results. The agent knows when a preview is incomplete and where to find the rest.

These capabilities work with local context first and extend to connected sources when the task needs them.

Start local, connect more sources

Stash does not require an external source. It starts with local notes created during the task.

From there, you can connect compatible local or remote MCP servers. Stash stores their tool schemas and supported results as files within configured limits, then returns bounded previews for large results.

Memory providers connect through direct and plugin-based integrations. Amazon Bedrock AgentCore Memory connects directly and makes permitted durable memory available through the same workspace. Write-back is optional where the provider supports it.

Provider plugins can connect additional memory services, knowledge graphs, and stores. Each plugin defines how the agent searches the source and how results appear in the workspace.

Amazon Bedrock AgentCore Gateway adds source-specific behavior for supported targets. Stash saves retrieved passages from Amazon Bedrock Knowledge Bases for reuse. It saves cited pages from Web Search as Markdown beside the result. It also saves AWS Context answers with graph context and citations.

Sources remain authoritative for their data and access policies.

Where Stash fits, and where it doesn’t

Stash can keep saved state outside the context window. It avoids placing all reachable state in every request, subject to source and configured limits.

How much that helps depends on your work. Stash helps most when:

  • Results are large or structured: lists of tickets, pipelines, and records; build logs; large JSON payloads.
  • The work has many steps, or many sessions: the conversation gets compacted, or the task continues the next day on a mount that earlier sessions filled.
  • The sources are first-party: Amazon Bedrock AgentCore Memory, Amazon Bedrock Knowledge Bases, Web Search, and AWS Context, where Stash has an opinionated integration.
  • The agent works with sub-agents: when a harness gives the agent and its sub-agents the same Stash workspace, the agent’s fetch becomes a file its sub-agents can read. The Strands harness built-in sub-agent does not receive the mount in 0.1.

Expect less benefit in these cases:

  • A short, single-question task with a small result. The steering about the mount uses some context, and the agent reads a source page before its first search, which can add a turn. Call the source directly.
  • Long prose and code over a generic MCP server, such as research or code review. Text doesn’t compress much, and a document that the agent must read whole adds read-back calls.
  • You need capabilities outside the Stash 0.1 release. Stash runs beside one agent on single-tenant compute and does not manage OAuth credentials for remote MCP servers or support the SSE transport or Windows.

Measure it on your workload

Stash can reduce repeated source calls and unnecessary model input. The benefit depends on the task, model, harness, source routing, and how much saved content the agent reads back.

The clearest candidates are context-heavy, multi-step tasks with large structured results. Short tasks, prose-heavy results, and workflows that require extra calls to rediscover saved information may benefit less. Harnesses also differ in when they offload results and how consistently they use the workspace.

Evaluate Stash on your own workload. Run the same task with and without Stash, using the same model, prompt, source data, and success criteria. Compare task success first, then cost per successful task, tokens, turns, latency, and source calls.

Your data, your access

Stash uses the access you configure. Its trust boundaries are explicit:

  • Sources authorize each request. Stash uses the AWS credentials or supported source credentials you provide.
  • The mount is a working copy. Sources remain responsible for the underlying data, permissions, retention, and deletion.
  • The harness controls model input. Stash prepares files and previews; the agent and harness decide what enters the context window.
  • Write-back is opt-in. Only configured sources receive supported session content.
  • The mount must be protected. Anyone who can read the folder can read the content Stash has saved there.

On Amazon Bedrock AgentCore Runtime, each session gets its own Stash storage and mount. Stash signs supported AWS requests with the Runtime execution role. Use a configured memory provider for permitted state that should be available to later Runtime sessions.

Get started

The Quickstart takes you from install to a working mount in a few minutes, with no AWS account.

Stash is open source under the Apache License 2.0 and has no separate charge. You pay the standard charges for the services that your agent uses, such as model inference and Amazon Bedrock AgentCore.

Get it from GitHub. Attach it to one real project, run one real task with and without it, and tell us what you find in the repository’s issues.