Metadata-Version: 2.4
Name: strands-stash
Version: 0.1.0
Classifier: Programming Language :: Rust
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
License-File: LICENSE
License-File: NOTICE
License-File: THIRD_PARTY_LICENSES
Summary: The stash CLI: memory, knowledge bases, and MCP tools as files for coding agents
License-Expression: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/strands-agents/stash
Project-URL: Issues, https://github.com/strands-agents/stash/issues
Project-URL: Repository, https://github.com/strands-agents/stash

<div align="center">
  <div>
    <a href="https://strandsagents.com">
      <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://strandsagents.com/latest/assets/wordmark-github-dark.svg">
        <img src="https://strandsagents.com/latest/assets/wordmark-github-light.svg" alt="Strands" width="320">
      </picture>
    </a>
  </div>

  <h1>Strands Stash</h1>

  <h2>Give your agent its context as files: memory, knowledge bases, and MCP tools in one directory.</h2>

  <div align="center">
    <a href="https://github.com/strands-agents/stash/graphs/commit-activity"><img src="https://img.shields.io/github/commit-activity/m/strands-agents/stash" alt="Commit Activity"></a>
    <a href="https://github.com/strands-agents/stash/issues"><img src="https://img.shields.io/github/issues/strands-agents/stash" alt="Open Issues"></a>
    <a href="https://github.com/strands-agents/stash/pulls"><img src="https://img.shields.io/github/issues-pr/strands-agents/stash" alt="Open PRs"></a>
    <a href="#license"><img src="https://img.shields.io/badge/License-Apache_2.0-blue" alt="License"></a>
    <a href="https://discord.gg/strands"><img src="https://img.shields.io/badge/Discord-Strands-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
  </div>

  <p>
    <a href="docs/user/overview.md">Documentation</a>
    ◆ <a href="docs/user/quickstart.md">Quickstart</a>
    ◆ <a href="docs/user/commands.md">Commands</a>
    ◆ <a href="docs/user/configuration.md">Configuration</a>
  </p>
</div>

<hr>

## Overview

An agent's context window is its only state. Every tool result and every record
it has seen sits there, you pay for it on each model call, and it is gone when
the session ends.

Stash mounts your context sources as one directory of files: AgentCore Memory,
Bedrock knowledge bases, web search, AWS Context, any MCP server, and any store
that a plugin serves. Your agent reads that directory with the tools it already
knows (`ls`, `cat`, `grep`, `jq`), so only what it reads enters the window. Stash
can also write each session back to memory, so the next session starts with what
the last one learned.

Stash works with Claude Code, Codex, Kiro, and Strands agents. It is in preview,
and it runs on Linux (x86-64 and arm64) and on macOS with Apple silicon.

## Install

```sh
npm install -g @strands-agents/stash
```

Or, without Node:

```sh
curl -fsSL https://github.com/strands-agents/stash/releases/latest/download/install.sh | sh
```

Run `stash --version` to check that it worked. Install with npm globally (`-g`),
not with `npx`: `stash attach` writes the path of the binary into your hooks, so
it must not move. For other ways to install, see the
[quickstart](docs/user/quickstart.md).

## Mount your first source

`stash configure` asks for each value and writes the config. Or write it
yourself:

```toml
# stash.toml
mount_point = "/tmp/stash"
harnesses = ["claude"]

[sources.team-memory]
kind = "agentcore-memory"
arn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:memory/REPLACE-ME"
auth = { sigv4 = {} }
```

Create the mount, attach the current folder, and read it:

```sh
stash create team-memory --config stash.toml --attach
stash ls                                   # wait until the mount is ready
cat /tmp/stash/_sources/*.md               # what each source holds, and how to read it
stash search team-memory "deployment process" --path "/agentcore-memory/team-memory/*"
```

Then start Claude Code in the same folder. No AWS account? Leave out the
sources: each mount has a local store for the agent's notes. For the full
walkthrough, see the [quickstart](docs/user/quickstart.md).

## How Stash works

![How Strands Stash fits together. The agent reads the mount with ls, grep, cat, and jq, and asks the daemon to search, call a tool, or save a note. The daemon returns a preview, writes the full results to the mount, and reaches the sources: AgentCore Memory, AgentCore Gateway, MCP servers, and plugins.](docs/user/images/stash-how-it-fits.svg)

```text
/tmp/stash/
├─ _sources/                       one page for each source: what it holds, how to search it
├─ agentcore-memory/team-memory/   memory records, by namespace
├─ mcp/tickets/_tools/             one JSON schema file for each tool
├─ mcp/tickets/_tools_results/     the full result of each tool call
└─ local/memories/                 notes the agent saved for later sessions
```

A small daemon runs next to the agent and owns each mount. When a mount starts,
the daemon fills the tree with recent records and the searches that earlier
sessions made. The agent reads files for what is there, and runs `stash search`
or `stash tool call` (or the same tools through the `stash` MCP server) for what
is not. Each result lands as files, and the agent sees a short preview.

`stash attach` adds a short block of instructions to the agent's `CLAUDE.md`,
`AGENTS.md`, or Kiro steering file, and a hook that queues each turn on disk.
With write-back on, the daemon sends those turns to AgentCore Memory, which makes
long-term records from them. The sources keep the data; the mount is a view.

Read [How Stash works](docs/user/how-it-works.md) for the details.

## Learn more

- [Overview](docs/user/overview.md): what Stash does, and when to use it.
- [Connect sources](docs/user/guides/connect-sources.md): memory, Gateway,
  MCP servers, and plugins.
- [Integrations](docs/user/integrations/harnesses.md): Claude Code, Codex, Kiro,
  Strands, and AgentCore Runtime.
- [Security](docs/user/guides/security.md): what Stash reads and sends, and
  where to put a mount.
- [Usage analytics](docs/user/guides/usage-analytics.md): the anonymous ping
  that Stash sends, and how to turn it off with `stash usage-analytics disable`.
- [Troubleshoot](docs/user/guides/troubleshoot.md): what an error means, and
  how to recover.
- [Agent skills](skills/README.md): skills that set up Stash, import your MCP
  servers, diagnose a folder, and compare a task with and without Stash.
- [Command reference](docs/user/commands.md) and
  [configuration reference](docs/user/configuration.md).
- [Design](docs/design/product.md): what Stash is for, and
  [why it is built the way it is](docs/design/decisions.md).

## Build from source

You need [rustup](https://rustup.rs/). `rust-toolchain.toml` selects the
toolchain.

```sh
git clone https://github.com/strands-agents/stash.git
cd stash
make build        # lint, then a debug build linked from ~/.cargo/bin/stash
make test-unit    # the unit suite
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for the other gates and how to send a
change.

## Reporting a problem

Open an [issue](https://github.com/strands-agents/stash/issues) with the command
you ran, what you expected, what happened, and the output of `stash --version`.
If you think you found a security problem, read [SECURITY.md](SECURITY.md)
first, and do not open a public issue.

## License

This project is licensed under the Apache License 2.0. See [LICENSE](LICENSE).

