# Guardrails

> Protect your agent from spam and abuse, and choose where and to whom it can appear.

Source: https://askmavis.co/help/guardrails  
Collection: Your AI agent  
Last updated: 2026-12-05

Guardrails protect your AI agent and your credits from abuse. Open your agent and go to **Guardrails**. Make your changes, then click **Save changes**. Changes here go live as soon as you save them, without **Publish**.

![The Guardrails tab of an AI agent.](https://askmavis.co/help-media/guardrails/overview.webp)

## Allowed domains

The websites that may show this agent's widget. Type a domain such as `example.com` under **Add a domain** and click **Add**. You need at least one before you can enable the widget, and if you save with no domains, the widget goes offline.

## Country blocking

Visitors from these countries can't open the widget or the chat page. Click **Block a country**, search by name and pick it. To unblock one, remove it from the list. With no countries listed, every country is allowed.

## Rate limit

Limits how many messages one visitor can send in a short time. Set **Messages allowed** (1 to 20), **In this many seconds** (60 to 86,400, which is 24 hours), and the message visitors see when they hit the limit. Only messages visitors send in a chat count.

## Spam detection

Checks a chat after the visitor's 2nd, 4th, 8th and 16th message. When a chat breaks your rule, the AI is paused in that chat, and a teammate can resume it from **Activity**.

- Turn on **Detect spam** and describe what counts as spam for this agent, or click **Reset to default**.
- Start with the default. A very broad rule can pause real customers who are just frustrated.
- It runs on the widget, the chat page and the help center, not on email. Checks don't use message credits.

## Rules the agent must always follow

To give the agent hard rules about what it says, such as "Never promise a refund", use the guardrail rules on the **Playground** page. See [Write instructions and pick a model](https://askmavis.co/help/instructions-and-model).

## Related

- [Review chats in Activity](https://askmavis.co/help/agent-activity)
- [Add the messenger to your website](https://askmavis.co/help/add-the-messenger-to-your-website)
