Observe and measure
You watch Stash to answer three questions: does the mount serve, what does the agent ask of it, and what does it keep out of the agent’s context. Stash answers each one with a command, a local file, or an OpenTelemetry export.
Check that the mount serves
Section titled “Check that the mount serves”stash lsstash status opsstash daemon statusstash lslists each mount with its mount point, state, and uptime.stash status opsshows the state, the health, the use of the cache, the start result of each source, and the attached workspaces.stash daemon statusshows the data root, the control socket, the daemon version, whether usage analytics is on, and each mount.
health | Means |
|---|---|
ok | The mount is ready, and each source started. |
degraded | The mount is ready, and at least one source didn’t start. The line names it. |
waiting | The mount is starting, or waits for stash bind. |
failed | The mount is failed. stash status shows the error. |
health checks only the start of each source. A ready mount can still have an
expired credential.
Read the logs
Section titled “Read the logs”The daemon writes one log for each day under logs/daemon/ in the data root, ~/.stash
by default. A source
that fails to load its first files writes one WARN line with the whole error:
agentcore-memory/incidents: hydration listing /summaries/* failed: access denied (AccessDeniedException: User is not authorized to perform: bedrock-agentcore:ListMemoryRecords)Each search adds one line to a daily log under ~/.stash/mounts/ops/logs/search/: the paths, the
--top-k, the number of hits, and the query. Only you can read it. Stash keeps
fourteen days of it.
The daemon takes its log level from the command that starts it. To log more, stop
the daemon and start it with --log-level:
stash daemon stopstash --log-level debug daemon startRead the metrics
Section titled “Read the metrics”Each mount writes its metrics to ~/.stash/mounts/ops/metrics/metrics.jsonl, as OTLP JSON
lines. You need no collector for this file.
| Metric | Counts |
|---|---|
stash.operation.requests and stash.operation.duration | Searches and tool calls, and how long they took. |
stash.backend.requests and stash.backend.duration | Requests to each source, by API. |
stash.content.retrieved | The bytes that a source returned. |
stash.content.surfaced | The bytes of each answer that the agent saw. |
stash.content.estimated_tokens_deferred | An upper bound of the tokens that each answer left in the mount. It isn’t a measured saving. |
stash.content.agent_read | The bytes of the mount’s files that the agent read later, estimated. |
Stash writes a line about once a minute. Wait for the next line before you read the file, or before you delete the mount.
Compare retrieved with surfaced to see what stayed on disk. agent_read shows
what the agent opened afterward. Stash finds reads from the tool calls in the
agent’s transcript, so it can miss a read or count one that didn’t happen.
Send metrics and traces to a collector
Section titled “Send metrics and traces to a collector”Add [telemetry.export] to the config to send the same metrics, and a trace for
each search and tool call, to an OTLP/HTTP collector:
[telemetry.export]endpoint = "https://collector.example.com:4318"auth = { bearer = { env = "OTLP_TOKEN" } }signals = ["metrics", "traces"]endpoint uses https, or http on the loopback. Stash posts to
{endpoint}/v1/metrics and {endpoint}/v1/traces. A span holds the mount, the
operation, the source, and the outcome. It holds no query and no content.
Measure the effect on your agent
Section titled “Measure the effect on your agent”Run one task from your own work with and without Stash, and compare the tokens, the cost, the turns, and the result. Keep the comparison fair:
- Use the same model, harness, prompt, and data in both runs.
- Start each run in a new session, with a new mount.
- Repeat each run two or three times.
- Compare the result first, then the cost. If the runs differ more from each other than from the baseline, report no clear difference.
Stash helps most when results are large or used again in later sessions. When each result is small, Stash can add a turn, because the agent reads the index of sources first.
Next steps
Section titled “Next steps”- Troubleshoot: fix a mount that is
failedordegraded. - Usage analytics: what the anonymous ping sends, and how to turn it off.
- Configuration reference: each key of
[telemetry.export].