# Data storage and retention

What Amiril keeps from your traces, rule decisions and tool calls. Set how long each environment keeps data before it is deleted, or stop storing message text.

Amiril stores every trace you send. It also stores the runs it builds from them and the signals it finds in each run. You choose how long each environment keeps this data. You can also stop storing message text, or hash phone numbers and email addresses. Message text and hashing apply only to data that arrives after you change them.

## Where your data is stored [#where-your-data-is-stored]

Amiril stores your data on Google Cloud, in the us-central1 region in the United States.

## Data retention [#data-retention]

Traces, runs and the SDK's rule decisions each belong to one environment. Each environment keeps them for its own retention period. Your [plan](/workspace/billing) sets the most any environment can keep. You can save a longer period, but Amiril still deletes data at the plan's limit.

| Environment | Default retention |
| --- | --- |
| Production | As long as your plan allows, which is 14 days on Free and 90 days on Team |
| Any other | 30 days |

To change the period, open **Environments** in **Settings** and choose **Change retention** from the environment's menu. Amiril checks every hour and deletes the traces, runs and rule decisions older than the period. When you shorten it, the dialog warns you and its button reads **Save and delete older data**.

To remove an environment and its data, choose **Archive** from its menu. Its API keys stop working at once. Amiril deletes its data one retention period later, and you can unarchive it until then.

## Stop storing message text [#stop-storing-message-text]

**Message text** is what was said in a run. That is the request your agent received, its conversation with the model and its answer. Amiril shows message text in the trace view. The **Grounding check**, one of the run's [signals](/monitor/signals), reads it to test that an answer matches what the agent did. [Run topics and turn topics](/monitor/topics) group runs and turns by these words too.

Say a payments agent calls `issue_payment`. With message text off, Amiril still keeps the run's steps and that call with its arguments and result. It drops the customer's request, the conversation and the answer. The trace view, the Grounding check and topics no longer have them.

To turn it off, open **Message text** in **Settings** and turn off **Store message text**. The setting covers every environment.

## Hash phone numbers and email addresses [#hash-phone-numbers-and-email-addresses]

Sometimes an agent states a phone number or email address that no tool result or earlier message contains. The Grounding check flags that as a signal. It keeps the value so it can spot the same one in other runs.

You can keep a hash of that value instead. Open **Phone numbers and email addresses** in **Settings** and turn on **Store phone numbers and email addresses as hashes**. Amiril then stores an HMAC-SHA256 under a key it derives for your workspace. The same value gives the same hash, so the check still finds repeats.

The hash replaces only the value the check keeps. Message text still keeps the number as written, so turn message text off as well to drop it.

This setting applies only to the environment you are in, which shows at the top of every page. Switch environments there and turn it on again for each one you want hashed.

## What the SDK sends about rule decisions [#what-the-sdk-sends-about-rule-decisions]

The [SDK](/sdk) checks each tool call against your rules inside your own process. It sends Amiril a record of each call a rule blocks, with the values the rule used. A rule in **Shadow** blocks nothing and only records what it would have done. The SDK sends that record too.

A rule can also [flag](/rules) a call, which lets it run and marks it for review. For flagged calls and allowed calls, the SDK sends only a count per rule. To remove or mask values before anything leaves your process, pass a function as the [`redact` option](/reference/sdk-config).

## What the gateway records about tool calls [#what-the-gateway-records-about-tool-calls]

The [gateway](/access) sits between your agents and your tool servers and passes on only the tools you granted. For each call, Amiril records the tool and whether the gateway let it through. It also records how long the call took and how it ended, such as a tool error, a timeout or a server it could not reach. It does not store the arguments, the results or the headers.

## Credentials and keys [#credentials-and-keys]

Amiril encrypts the credentials for your [tool servers](/tool-servers) with AES-256-GCM before it stores them. No page or API route shows them again. The gateway decrypts a credential only to call its tool server, and an agent never receives it.

Amiril stores API keys and gateway tokens as hashes, so it shows each one only once, when you create it.

WorkOS handles sign-in, so Amiril never stores a password.

## Next steps

- [Members and roles](https://docs.amiril.ai/workspace/members.md): Invite people to your Amiril workspace, pick their role and remove them. See what someone with the Admin role or the Member role can do.
- [Plans and billing](https://docs.amiril.ai/workspace/billing.md): Compare the Free and Team plans and see what counts as an event or uses a credit. Upgrade to Team, set a spend cap for extra credits or cancel.
- [Audit agent access](https://docs.amiril.ai/agents/access-log.md): The access log lists every grant and revoke, every tool call the gateway refused and each change to tool servers, gateway tokens and agents.
- [Add a tool server](https://docs.amiril.ai/tool-servers.md): Register the MCP server where your agents' tools live and choose how Amiril signs in to it. Then grant its tools to agents on their Access tab.
- [Set up environments and API keys](https://docs.amiril.ai/traces/environments-and-keys.md): Create an environment such as Staging and an API key that sends to it, so test runs stay out of production. Then put the key where each service runs.

## More detail

- [Limits and defaults](https://docs.amiril.ai/assistant/limits.md): Every limit and default a customer can hit in Amiril, with its number: plan amounts, ingest sizes and rates, imports, rules, backtests, API and MCP rates, page sizes, retention, name lengths.
- [Plans, limits and billing](https://docs.amiril.ai/assistant/plans-and-billing.md): Amiril's plans and what each includes, what counts as an event, every plan limit and what answers at it, the AI spend cap, history kept, past-due payments, and the billing routes and errors.
- [SDK behaviour in detail](https://docs.amiril.ai/assistant/sdk.md): The Amiril SDK past the setup guides: per-framework gaps, run ids and sessions, hook order and its errors, restarts, shutdown, offline behaviour, model messages, tested versions.
- [HTTP API: environments](https://docs.amiril.ai/assistant/api/environments.md): The environments routes of Amiril's HTTP API: 6 operations, each with its parameters, request body, responses and token access.
- [HTTP API: workspace](https://docs.amiril.ai/assistant/api/workspace.md): The workspace routes of Amiril's HTTP API: 28 operations, each with its parameters, request body, responses and token access.
