> For the complete documentation index, see [llms.txt](https://docs.sail.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sail.money/sailor/guides/configure-a-template.md).

# Configure a shared template

Sailor can register a [shared template](/protocol/permissions/shared-templates.md) — a permission deployed once and configured per account — instead of authoring a permission from scratch.

{% hint style="info" %}
**Templates are examples, not the protocol.** The shipped `Shared*` templates and the standalone clone templates are reference implementations that demonstrate the [`IPermission`](/protocol/permissions/ipermission.md) pattern. They are illustrative, not a fixed part of the trusted core — anyone can deploy their own. You are responsible for the correctness of any permission you register (see [permission correctness is the author's responsibility](/protocol/security/limitations.md)). Treat them as starting points to read, adapt, and **verify and test before any production use** — not audited, drop-in contracts.
{% endhint %}

## The seven shared templates

Sail Protocol's **seven shared permission templates are deployed today** — multi-tenant singletons at the **same CREATE2 address on all 12 supported chains**, registered as `knownTemplates` in the SDK deployment registry. You don't deploy them; you **register** one on your SMA and **configure** your own bounds:

| Template                        | Bounds                                                                           |
| ------------------------------- | -------------------------------------------------------------------------------- |
| `SwapPermission`                | DEX swaps: router + token allowlists, per-tx cap, mandatory oracle slippage band |
| `SwapPermissionNoOracle`        | Swaps for tokens without an oracle: allowlists + cap + live-pool sanity band     |
| `BorrowPermission`              | Borrowing: protocol + asset allowlist, cap, on-chain LTV check                   |
| `DepositPermission`             | Deposits into ERC-4626 vaults / Aave: target + token bounds, cap                 |
| `WithdrawPermission`            | Withdrawals to one fixed recipient (the SMA / owner Safe)                        |
| `TransferPermission`            | ERC-20 transfers: token + recipient allowlists, per-transfer caps                |
| `ApproveAndCallBatchPermission` | Atomic approve → call → reset-to-zero batches                                    |

See what's live on your chain:

```bash
sailor mandate templates           # deployed template addresses + how to author your own
sailor capabilities                # chains, kernel model, mandate templates, strategy primitives (read-only)
```

Their addresses are in the [Protocol → Deployment addresses](/protocol/reference/addresses.md), and each template has a dedicated [skill](/sailor/skills.md) that carries its exact parameter schema and the safe order of operations.

## Register, then configure

`sailor mandate register` only **registers** a template — you must also **configure** the per-account bounds:

```bash
# 1. Register (owner signs an EIP-712 RegisterPermission in the browser):
sailor mandate register --address <templateAddress> --sma <yourSMA>

# 2. Configure your bounds (tokens, caps, venues) for that template:
sailor mandate configure --address <templateAddress> \
  --template SwapPermission --args-file swap-config.json
```

The `sailor-template-*` skills drive this conversationally with the correct schema per template. `--simulate-only` on `configure` gives a gas-free preflight.

{% hint style="info" %}
**`sailor mandate deploy-clone` is currently unavailable** — no clone templates are deployed. For a single-account, bespoke permission, author your own `IPermission` and use `sailor mandate deploy --contract <Name> --attach` (see [Build & register a mandate](/sailor/guides/build-a-mandate.md)).
{% endhint %}

## Always simulate first

Prove the configured template accepts and rejects the right calls before authorizing:

```bash
sailor mandate simulate --address <templateAddress> --sma <yourSMA> --calls ./samples.json
```

See [Simulate before going live](/sailor/guides/simulate.md). Then register/confirm exactly as in [Build & register a mandate](/sailor/guides/build-a-mandate.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sail.money/sailor/guides/configure-a-template.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
