Skip to content

You want the agent’s first turn to start with the right context already on disk, so it doesn’t spend turns asking the same question again. Hydration is how a mount fills itself before the agent asks. Each source picks what a session starts with. The starting set is not a limit: the agent searches for more whenever it needs to.

Hydration runs at three times.

When the mount starts. Each source runs its hydration plan. A memory lists recent records and runs its configured prefetch searches. A plugin can define its own plan. A source that only answers questions, such as web search, stays empty until the agent searches it.

When you attach a workspace, and when a session starts. Stash reads the top-level text files of the agent’s folder, such as README.md, and uses them to search each memory source. So a session about the checkout service starts with records about the checkout service. This text never goes to web search.

At the start of each session. The agent gets a short digest: each source, how many files it holds now, and keywords from recently used files. It knows what is on disk before it reads anything.

If a step fails, the mount still starts, and the daemon log names the step.

With first-party sources. A memory source loads its recent records at start, and is the source that the workspace warm-up searches. An MCP server has no records to load, so its files come when the agent calls a tool.

Create an Amazon Bedrock AgentCore Memory, then configure AWS credentials with its read permissions. Create stash.toml, and replace REPLACE-ME with your memory ID:

mount_point = "/tmp/ops-context"
harnesses = ["claude"]
[sources.incidents]
kind = "agentcore-memory"
description = "Summaries of past incidents"
arn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:memory/REPLACE-ME"
auth = { sigv4 = {} }

Create the mount:

Terminal window
stash create ops --config stash.toml --attach
stash status ops

Repeat stash status ops until it shows state: ready and the incidents source shows started. Then look at what hydration loaded:

Terminal window
ls /tmp/ops-context/agentcore-memory/incidents/

When the agent needs more than the starting set, it searches:

Terminal window
stash search ops "checkout latency after deploy" --path "/agentcore-memory/incidents/*"

To choose what a source loads at start, set its hydration keys. For example, a memory source takes a prefetch list. See AgentCore Memory source.