# What is the store toolkit, and how does it work?

**A store is cloud storage for documents with search built in. Fill it from a folder on your computer, attach it to an agent you build, and that agent can answer from your documents from anywhere, even with your computer off. Search finds passages by meaning, then reranks them. Agents you deploy can read the store and add to it, but they can never delete it.**

---

## What makes it different

| what it does | the primitive behind it | what that buys you |
|---|---|---|
| **Destructive actions don't exist for a deployed agent** | A store attaches **bound** to an agent. The bound tool has only `search`, `read`, `list` and `write`: no delete, no create | On a public agent, an approval prompt would land on a stranger's screen, or nowhere at all on a trigger or chat app. So the dangerous action isn't gated, it's absent |
| **The agent can only reach what you attached** | The store ids are fixed when you attach; the agent picks among them with `which`, and a store you didn't attach can't be named at all | Prompt tricks can't point it at another store |
| **Read-only stays read-only** | Attach as `store:<id>:read` and the write key never leaves your computer | A public Q&A agent physically can't change your documents |
| **Each end user gets their own slice** | A `multitenant` store gives every signed-in user of your agent a private part; any call that doesn't name a user is refused | Customers can upload their own files without seeing each other's |
| **Search that reads properly** | Meaning-based search over-fetches 30 passages, then a reranker picks the best | Answers come from the right paragraph, with its heading path |
| **Indexing is included** | Embeddings run inside the store's own server, so adding documents uses your plan's storage quota, not your usage | Filling a store costs nothing per document |

---

## How it works

### Two ways in

| you are… | you get | actions |
|---|---|---|
| **the owner** (you, through Irene or the Agent Builder) | the full `store` tool | `create` · `list` · `status` · `add` · `sync` · `search` · `embedders` · `delete` |
| **a deployed agent** | the bound tool, scoped to the stores you attached | `search` · `read` · `list` · `write` (or only the first three if every attached store is read-only) |

**Why two tools:** you can be asked before a delete; a deployed agent's visitor can't. So the deployed agent never gets the delete at all.

### Creating and filling a store

1. **Create** it with a name and an access mode:

| access | who can read |
|---|---|
| `auth` (default) | one shared collection, read with the store's key |
| `open` | anyone may read |
| `multitenant` | each signed-in end user gets a private slice |

2. **Choose the embedder** (the model that turns text into searchable meaning) when you create the store. It's fixed after that. The default is a small multilingual model that handles about 100 languages. English-only and larger options exist (`embedders` lists them).
3. **Sync** a folder or files from your computer. Files are named by their place in the folder, so two files with the same name stay two documents. Up to 500 files per sync; split bigger folders.
4. **Re-syncing** a document replaces its old passages, so search never returns a stale copy.

### Searching

A question is matched against every passage by meaning, the top 30 are reranked, and the best `k` (5 by default) come back with their source and heading path. Small stores are searched exhaustively; once a store passes 5,000 passages, a fast index is built.

### When a deployed agent writes

A bound `write` saves the file **and** indexes it. **Why:** a file the agent saves has to be findable by search later. Saving it raw left it unsearchable.

### Your keys stay safe

When an agent is deployed with a store, the store's keys travel on the encrypted secrets channel, never inside the downloadable bundle. When the agent's server starts, the keys move into its private records and are removed from the environment, so no script, shell command or helper the agent runs can read them.

---

## How agents are told to use it

- The Agent Builder's recipe for "answer from my documents" is: attach a store, create it, sync your folder, attach it to the agent. Never build a separate vector database for this.
- Attaching the local document search (`rag`) to an agent you plan to deploy gets a warning, because it can never leave your computer. A store is the cloud version of the same job.

---

## Approvals

| action | in auto mode |
|---|---|
| `list` · `status` · `search` · `embedders` · `read` | runs (a read) |
| `create` · `add` · `sync` · `write` | treated as sending (data leaves your computer) |
| `delete` | treated as deleting |

On a deployed agent, delete doesn't exist, and reads never wait for approval.

→ [Approvals & auto mode](https://mycelen.com/manual/how-it-works/approvals-and-auto-mode)

---

## Where you see it

- **The Agent Builder** creates, syncs and attaches stores for you.
- **On a deployed agent,** store calls show as ordinary tool cards.
- **Your Data:** when a multitenant store is attached, your agent's account menu offers end users a **Your Data** upload, which goes into their private slice.
- Your stores are recorded on your computer in `~/.irene/host_studio/stores.json`.

---

## Limits

**Per store, by plan:**

| plan | passages | size |
|---|---|---|
| Free | 25,000 | 200 MB |
| Starter | 150,000 | 2 GB |
| Pro | 1,000,000 | 20 GB |
| Power | 5,000,000 | 100 GB |
| Ultra | 20,000,000 | 500 GB |

- **Over the passage cap,** a sync keeps what fit and says it reached the limit. Nothing already stored is lost.
- **Over the size cap,** a sync is refused before anything is added.
- **Multitenant:** the cap applies to each end user's slice.
- **The embedder can't be changed** after a store is created.
- **Up to 500 files per sync.**
- **Search returns passages with sources,** not a written answer. The agent writes the answer.

---

## What it costs

- **Indexing and searching** use no plan usage. The limit is your plan's storage quota (above).
- **Holding more stores than your plan includes** costs $1 a month each, as held-resource rent.
- **The deployed agent's own model usage** is billed as normal, at what we pay + 20%.

→ [Plans, usage & shared usage](https://mycelen.com/manual/start-here/plans-and-usage)

---

## Related

- [rag (local document search)](https://mycelen.com/manual/reference/toolkits/rag): the same job, on your computer only
- [database](https://mycelen.com/manual/reference/toolkits/database) · [agent_memory](https://mycelen.com/manual/reference/toolkits/agent-memory): the other kits for deployed agents
- [Agent Builder](https://mycelen.com/manual/reference/builders/agent-builder) · [Deploy to the cloud](https://mycelen.com/manual/reference/builders/cloud-deploy)

[Ask Irene about this]
