An agent often needs more context than fits in one model request. Tool results, records, and pages can crowd out the conversation, while useful findings can disappear when the harness compacts or ends a session.
Strands Stash is a stateful workspace for agents. It mounts your context sources as one
directory of files: Amazon Bedrock AgentCore Memory, knowledge bases, web search, AWS
Context, MCP servers, and any store that a plugin serves. Your agent reads that directory
with tools it already knows, such as ls, cat, grep, and jq. Source files stay
outside the context window until the agent reads them. Stash sends steering, digests,
and compact result views through the integration.
What the agent sees
Section titled “What the agent sees”You give Stash a config that names your sources. Stash runs a small daemon next to the agent and writes hydrated records and retrieved results as Markdown and JSON files under one mount point. This is part of the mount for an ops agent that works on incidents:
Path under /tmp/ops-context/ | What it holds |
|---|---|
_sources/ | One page for each source, including how to read and search it |
agentcore-memory/incidents/ | Records of past incidents, grouped by namespace |
gateway/bedrock-knowledge-bases/runbooks/ | Knowledge-base passages that the agent found |
mcp/ticketing/_tools/ | One JSON schema file for each tool |
mcp/ticketing/_tools_results/get_ticket/ | Call metadata and each result file that fits the mount limits |
local/memories/ | Notes that the agent saved for later sessions |
Agents know files. They need no new tool, and no tool schema in the window, to run
cat _sources/*.md or grep -ril checkout agentcore-memory/. The sources keep the data,
and the mount is a view of it.
Capabilities
Section titled “Capabilities”| Capability | What it does for your agent |
|---|---|
| One interface | Every source is a folder and a _sources/ page. |
| Hydration | Each source picks what a session starts with. |
| Progressive disclosure | Compact views first. A full result file stays on disk when it fits the mount limits. |
| Managed workspace | Refresh, expiry, and compaction keep the mount bounded. |
| Local memory | Notes that outlast a compaction. |
| Feedback loops | Turns and notes go back to a writable source. |
Any source, and more from first-party sources
Section titled “Any source, and more from first-party sources”You can connect a supported MCP server by its URL or command. A plugin can add another store. Stash writes each result file that fits the result and cache limits, then shows the agent a compact view. A file that does not fit gets only a preview. Cached files stay until their expiry or the mount’s cache policy removes them.
First-party integrations add source-specific behavior for AgentCore Memory, and for Amazon Bedrock Knowledge Bases, web search, and AWS Context through Amazon Bedrock AgentCore Gateway:
| Capability | Configured MCP server or plugin | First-party sources |
|---|---|---|
| Hydration | Files come when the agent calls a tool. A plugin can plan what loads at start. | A memory loads recent records at start, and warms from the agent’s folder. |
| Progressive disclosure | Generic compaction: lossless JSON tables, and a preview of a large result. | A view for each source: a memory record’s gist, ranked knowledge-base passages, web pages as Markdown, and one file for each AWS Context answer. |
| Feedback loops | A plugin decides how to store each turn. | A memory turns each session into events, and its strategies make long-term records. |
| Managed workspace | A tool result stays until the cache needs the space, or until its configured expiry. | A memory record can refresh in place because Stash can fetch it again by its ID. |
| One interface | A _sources/ page lists the tools. | The web search and AWS Context pages also tell the agent how to search them well. |
What Stash changes
Section titled “What Stash changes”- Smaller context inputs. The window can hold previews and paths instead of every full result.
- Saved full results stay available while cached. The agent can read the needed
part with
grep,jq, or another file tool. - Easy access to data. One tree serves each source, so you don’t write a tool for each one.
- Reusable results. A follow-up about the same ticket can read a cached file while it remains in the mount.
- Continuity. Notes and writable memory sources can carry useful findings into a later session.
When Stash fits
Section titled “When Stash fits”Use Stash when your agent:
- works across several context sources;
- gets documents or tool results too large to keep in every model call;
- searches and comes back to earlier results during a long task;
- runs the same context workflow in more than one harness; or
- sends what it learned to durable memory.
For short tasks with small results, direct tools are the simpler path. Reading the
_sources/ pages adds overhead that those tasks might not need. To decide, run one task
with and without Stash. See
Observe and measure.
Where Stash runs
Section titled “Where Stash runs”Stash runs on single-tenant compute: a laptop, a container, an Amazon Bedrock AgentCore Runtime session, or a Strands Box sandbox. A local daemon can serve several mounts. Each Runtime session gets its own durable storage. One shared instance for many users isn’t supported. Stash supports Linux and macOS.
The same tree serves each supported harness. stash attach connects Claude Code, Codex,
and Kiro. Strands agents in Python and TypeScript use the StrandsStash memory manager.
Each harness reads the mount through the stash MCP server, or through its shell. See
Supported harnesses and frameworks and
Attachment modes.
Where to go next
Section titled “Where to go next”Start with the Quickstart: you create a mount, save a note, and ask Claude Code to read it, with no AWS account. Then read How Stash works for the parts and the lifecycle of a mount. When you are ready to add your own data, Connect sources has a config for each kind of source.