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.

![Where an agent's context lives. Without Stash, everything goes into the context window: the tool result, the document, and the memory records, each in full, and compaction drops earlier detail. All of it is sent again on every step. When the session ends, nothing is carried over, and the next session's context window starts empty. With Stash, the context window holds previews of the tool result, the document, and the memory records, with room to work. Each preview names its file in the mount, which holds the full tool result, the full document, the memory records, and the agent's notes as ordinary files in one folder. The next session starts from those files, with a digest of the mount.](https://raw.githubusercontent.com/strands-agents/stash/833198a2b91f6490291149d06b4daac8de0727c8/docs/user/images/stash-context-before-after.svg)

## 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

| Capability | What it does for your agent |
| --- | --- |
| [One interface](/docs/user-guide/stash/capabilities/one-interface/index.md) | Every source is a folder and a `_sources/` page. |
| [Hydration](/docs/user-guide/stash/capabilities/hydration/index.md) | Each source picks what a session starts with. |
| [Progressive disclosure](/docs/user-guide/stash/capabilities/progressive-disclosure/index.md) | Compact views first. A full result file stays on disk when it fits the mount limits. |
| [Managed workspace](/docs/user-guide/stash/capabilities/managed-workspace/index.md) | Refresh, expiry, and compaction keep the mount bounded. |
| [Local memory](/docs/user-guide/stash/capabilities/local-memory/index.md) | Notes that outlast a compaction. |
| [Feedback loops](/docs/user-guide/stash/capabilities/feedback-loops/index.md) | Turns and notes go back to a writable source. |

## 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

-   **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

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](/docs/user-guide/stash/guides/observe/index.md#measure-the-effect-on-your-agent).

## 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](/docs/user-guide/stash/integrations/harnesses/index.md) and [Attachment modes](/docs/user-guide/stash/guides/attachment-modes/index.md).

## Where to go next

Start with the [Quickstart](/docs/user-guide/stash/quickstart/index.md): you create a mount, save a note, and ask Claude Code to read it, with no AWS account. Then read [How Stash works](/docs/user-guide/stash/how-it-works/index.md) for the parts and the lifecycle of a mount. When you are ready to add your own data, [Connect sources](/docs/user-guide/stash/guides/connect-sources/index.md) has a config for each kind of source.