> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/core-concepts/guardrails-and-validation.md).

# Guardrails & Validation

Instructions guide an agent’s decisions. Guardrails enforce controls around its execution.

Guardrails protect sensitive data before model requests. They can also pause selected skills for user approval. Organization-level policies restrict approved model families and providers.

Open **Manage Agent → Guardrails** to manage the controls for an agent.

{% hint style="info" %}
**Preview.** Guardrails is a Preview feature. Controls and labels may change.
{% endhint %}

## What guardrails protect

| Guardrail                          | Protection                                                          | Configuration                                                                |
| ---------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| Sensitive Data Masking             | Replaces detected PII with opaque tokens before it reaches a model  | [PII masking](/agent-builder/deploy/guardrails/pii-masking.md)               |
| Tool Execution Approval            | Pauses selected skill calls until the user allows or denies them    | [Tool execution](/agent-builder/deploy/guardrails/tool-execution.md)         |
| Allowed LLM Families and Providers | Limits model requests to organization-approved models and providers | [AI Gateway](https://docs.uptiq.ai/governance/controls-and-audit#ai-gateway) |

Sensitive Data Masking and Tool Execution Approval are toggleable per agent. Model policy guardrails are always enforced by the AI Gateway.

## Configure guardrails

1. Open **Manage Agent → Guardrails**.
2. Turn on **Sensitive Data Masking** or **Tool Execution Approval**.
3. Select the **gear** in that row to define its coverage.

The Guardrails page lists each guardrail’s **Name**, **Type**, and **Status**. A toggle controls per-agent guardrails. An **Always enforced** badge marks organization-level model policies.

## Mask PII before model requests

PII masking detects selected entities and tokenizes their values. The original value stays in a secure vault. A permitted downstream step can restore it when needed.

Choose a provider, then define the entity rule:

* A **Deny list** masks only selected entity types.
* An **Allow list** masks every type except selected entities.

Enable masking whenever the agent handles PII. Unselected entities reach the model in clear text.

Tokenization requires a compatible executor version. See [PII masking](/agent-builder/deploy/guardrails/pii-masking.md) for providers, entity types, and tokenization details.

## Require approval before skill calls

Tool Execution Approval pauses an agent before it runs selected skills. The user can allow the call or deny it. When denied, the agent continues without that call.

Require approval for skills that access sensitive data or take external actions. You can select individual skills or require approval for every current and future skill.

See [Tool execution](/agent-builder/deploy/guardrails/tool-execution.md) for approval settings and the user experience.

## Keep model use within policy

The AI Gateway enforces the approved LLM families and providers for every model request. These guardrails are set by your organization. You can’t disable them per agent.

#### Related

* [Guardrails](/agent-builder/deploy/guardrails.md) — configure per-agent controls
* [PII masking](/agent-builder/deploy/guardrails/pii-masking.md) — choose providers and masked entities
* [Tool execution](/agent-builder/deploy/guardrails/tool-execution.md) — require approval before skills run


---

# 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.uptiq.ai/core-concepts/guardrails-and-validation.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.
