You give your agent context by adding sources to a mount. Each source is one `[sources.NAME]` table in the mount config. Stash shows it as a folder at `KIND/NAME/` below the mount point, and writes a page for it at `_sources/NAME.md`.

Any supported MCP server or plugin works as a source. The first-party sources, AgentCore Memory and the AgentCore Gateway connectors, add opinionated hydration, previews, and write-back. See [Overview](/docs/user-guide/stash/overview/index.md#any-source-and-more-from-first-party-sources).

This guide adds the sources of an ops agent, one at a time: past incidents from AgentCore Memory, runbooks from a Bedrock knowledge base, and a ticketing MCP server.

## Before you start

-   Install Stash, as the [quickstart](/docs/user-guide/stash/quickstart/index.md) shows.
-   Have AWS credentials for each AWS source. The daemon takes them from the shell that starts it.
-   Write the mount config to `stash.toml`. Start it with the mount point:

```toml
version = 1
mount_point = "/tmp/ops-context"
```

The mount point is an absolute path. If the folder exists, it must be empty.

## Choose a kind

| Kind | Use it for | Hydration | Search | Tools | Write-back |
| --- | --- | --- | --- | --- | --- |
| `agentcore-memory` | Long-term memory in AgentCore Memory | yes | yes |  | yes |
| `gateway.bedrock-knowledge-bases` | A Bedrock knowledge base through a Gateway |  | yes | yes |  |
| `gateway.web-search` | The web through a Gateway |  | yes | yes |  |
| `gateway.aws-context` | An AWS Context knowledge graph through a Gateway |  | yes | yes |  |
| `mcp` | The tools of any MCP server |  |  | yes |  |
| `plugin` | Any other store, through a plugin program | yes | yes |  | yes |

A mount holds up to 25 sources. Each mount also has a local store for notes, with no config. A source can’t be named `local`.

## Add AgentCore Memory

Add the memory that holds past incidents:

```toml
[sources.incidents]
kind = "agentcore-memory"
description = "Summaries of past incidents"
arn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:memory/ops-memory-0123456789"
auth = { sigv4 = {} }
namespaces = ["/summaries/*"]
```

The region comes from the ARN. `auth = { sigv4 = {} }` signs with the default AWS credential chain of the host. Name a profile with `auth = { sigv4 = { profile = "ops" } }`. A source with no `auth` sends no credential, and the Memory API refuses it.

`namespaces` limits what the mount can read, up to 5 entries. It defaults to `["/*"]`.

The credentials need `bedrock-agentcore:ListMemoryRecords`, `GetMemoryRecord`, and `RetrieveMemoryRecords`. To send sessions back, see [Feedback loops](/docs/user-guide/stash/capabilities/feedback-loops/index.md).

## Add a Bedrock knowledge base

A knowledge base reaches the mount through an AgentCore Gateway target:

```toml
[sources.runbooks]
kind = "gateway.bedrock-knowledge-bases"
description = "Service runbooks"
gateway_url = "https://ops-gateway-abc123.gateway.bedrock-agentcore.us-east-1.amazonaws.com/mcp"
target = "runbooks-kb"
auth = { sigv4 = {} }
```

`gateway_url` must have a path. An AgentCore Gateway serves MCP at `/mcp`. The target names the knowledge base and sets the number of results. With SigV4, the credentials need `bedrock-agentcore:InvokeGateway`.

Web search and AWS Context use the same Gateway keys:

```toml
[sources.web]
kind = "gateway.web-search"
gateway_url = "https://ops-gateway-abc123.gateway.bedrock-agentcore.us-east-1.amazonaws.com/mcp"
target = "web-search-tool"
auth = { sigv4 = {} }

[sources.graph]
kind = "gateway.aws-context"
gateway_url = "https://ops-gateway-abc123.gateway.bedrock-agentcore.us-east-1.amazonaws.com/mcp"
target = "context-connector"
auth = { sigv4 = {} }
context_graph_id = "REPLACE-ME"
```

`gateway.web-search` fetches each page that a hit cites and writes it as markdown. Set `fetch_pages = false` to keep only the passages.

## Add an MCP server

Add a remote server with `url`, or a local server with `command`:

```toml
[sources.ticketing]
kind = "mcp"
description = "Incident tickets"
url = "https://tickets.example.com/mcp"
auth = { bearer = { env = "TICKETING_MCP_TOKEN" } }

[sources.git]
kind = "mcp"
description = "The git history of the checkout service"
command = "uvx"
args = ["mcp-server-git", "--repository", "/home/me/checkout"]
```

Set exactly one of `url` and `command`. Copy `command` and `args` unchanged from the server’s README.

A local server gets only a small part of the daemon’s environment, such as `PATH` and `HOME`. Pass each other variable in `env`:

```toml
env = { GITHUB_PERSONAL_ACCESS_TOKEN = { file = "/home/me/.config/stash/gh-token" } }
```

An `mcp` source shows tools only. Each tool’s schema is a file at `mcp/NAME/_tools/TOOL.json`.

## Add a plugin

A plugin reads a store that Stash has no kind for:

```toml
[sources.notes]
kind = "plugin"
description = "The team's Markdown notes"
plugin = "notes"
command = ["python3", "/home/me/plugins/notes.py"]
settings = { root = "/home/me/notes" }
```

With no `command`, Stash runs `stash-source-<plugin>` from the daemon’s `PATH`. To write one, see [Write a plugin](/docs/user-guide/stash/sources/write-a-plugin/index.md).

## Create the mount and check it

Create the mount with the credentials that its sources need:

```bash
AWS_PROFILE=ops AWS_REGION=us-east-1 stash create ops --config stash.toml
stash status ops
```

`create` returns before the mount is ready. Run `stash status ops` until it shows `state: ready`. The output looks like this, shortened:

```text
Mount
  name: ops
  state: ready
  health: ok
  mount_point: /tmp/ops-context
Sources
  incidents (agentcore-memory): started
  runbooks (gateway.bedrock-knowledge-bases): started
  ticketing (mcp): started
```

`health: degraded` names each source that didn’t start. The mount still serves the others. Read the page of each source to see what it holds and how to search it:

```bash
cat /tmp/ops-context/_sources/*.md
stash tool list ops
```

## Change a source

`create` keeps a copy of the config, so a later edit of `stash.toml` doesn’t change the mount. To add, change, or remove a source, edit `stash.toml` and run `stash update`:

```bash
stash update ops --config stash.toml

# Typical output:
# mount ops:
#   + web              added
#   ~ runbooks         changed: its files stay
# mount ops is updated
```

`update` restarts only this mount, and prints each change with what it removes. A removed source takes its files with it. The notes stay. `update` can’t change `mount_point` or `cache_max_bytes`: for those, delete the mount with `--remove-data` and create it again.

## Next steps

-   [Attachment modes](/docs/user-guide/stash/guides/attachment-modes/index.md): choose how the agent reads the mount.
-   [Supported harnesses and frameworks](/docs/user-guide/stash/integrations/harnesses/index.md): connect Claude Code, Codex, Kiro, or Strands Agents.
-   [AgentCore Memory source](/docs/user-guide/stash/sources/agentcore-memory/index.md), [Gateway sources](/docs/user-guide/stash/sources/gateway/index.md), [MCP source](/docs/user-guide/stash/sources/mcp/index.md), and [Plugin source](/docs/user-guide/stash/sources/plugin/index.md): each key of each kind.
-   [Configuration reference](/docs/user-guide/stash/reference/configuration/index.md#sources): the whole config.