# Vault

Vault lets your agent sign in to websites and fill forms in the browser with the logins and contacts you keep in **Settings → Vault**. Redbelt types the saved values itself, only on the sites they belong to; the agent never sees your passwords or one-time codes.

## Before you start

Open **Settings → Vault** to add what the agent may use:

* **Login**: a site address, username, password, and optionally an authenticator setup key so Redbelt can produce sign-in codes. One login can cover several addresses for the same service.
* **Contact**: your name, email, phone, and address for forms such as checkout or sign-up pages.

Open **Customize → Plugins** and make sure **Vault** is added and enabled for the agent or task. The agent works in the chat's computer, so the task also needs the browser.

Organization administrators can turn **Allow authenticator codes** off in **Settings → Vault**. When it is off, nobody can save authenticator setup keys and saved ones are not used.

## Sign in to a site

1. Save a login for the site in **Settings → Vault**.
2. Ask the agent to do something on that site, for example:

> Sign in to our billing portal and download last month's invoice.

3. The agent finds the matching login, opens the site, and Redbelt fills the sign-in form. The agent's browser remembers the sites you have signed in to, so your next chat starts signed in. To sign out of all of them, choose **Forget** under **Browser sign-ins** in **Settings → Vault**.
4. Watch the browser in the chat's computer if you want to follow along.

## Answer a secure form

When a page needs something you have not saved, such as a new password or a code sent to your phone, the agent adds a card such as **Sign in to Spotify** to the chat instead of asking you to type it in a message. Choose **Open**, fill in the form, and choose **Submit**; the card then shows **Submitted**. Closing the form keeps the card, so you can come back to it. If the form offers it, you can also save the values to your Vault from there.

Values you enter in a secure form go straight to the page on that site. They are never shown to the agent and never appear in the thread.

## Tool Reference

### Available Tools

| Tool            | Required Fields               | Thread | Workflow |
| --------------- | ----------------------------- | ------ | -------- |
| `vault.fill`    | No mandatory top-level fields | Yes    | No       |
| `vault.open`    | `item`                        | Yes    | No       |
| `vault.request` | `site`, `fields`              | Yes    | No       |
| `vault.search`  | No mandatory top-level fields | Yes    | No       |

Required fields above are the schema minimum. The target, selected operation, or account can impose additional requirements.

**`vault.fill`** — Type values from the Vault into the page in the visible browser.
Optional fields: `fields`, `form_id`, `item_id`, `submit`.

**`vault.open`** — Open the sign-in page of the saved login for a site in the visible browser tab.

**`vault.request`** — Ask the user for values you must not see, such as a password or code, in a secure form.
Optional fields: `continues_from`, `item_id`, `reason`.

**`vault.search`** — Find the user's saved logins and contact info.
Optional fields: `query`.

## Troubleshoot

If the agent says no login matches, check that the saved login's address matches the site the agent is on. Redbelt only fills a login on its own site. If a sign-in fails, update the password in **Settings → Vault** and ask the agent to try again.
