> 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/ai-workbench-qore/core-concepts/guardrails-and-validation.md).

# Guardrails & Validation

Protect agent runs with PII masking, tool approval, and model policies.

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 **Agent Config → 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](/ai-workbench-qore/console/agent-builder/deploy/guardrails/pii-masking.md)       |
| Tool Execution Approval            | Pauses selected skill calls until the user allows or denies them    | [Tool execution](/ai-workbench-qore/console/agent-builder/deploy/guardrails/tool-execution.md) |
| Allowed LLM Families and Providers | Limits model requests to organization-approved models and providers | [AI Gateway](/ai-workbench-qore/control-center/ai-gateway.md)                                  |

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 **Agent Config → 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.

Unselected entities reach the model in clear text.

Tokenization requires a compatible executor version. See [PII masking](/ai-workbench-qore/console/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.

You can select individual skills, or turn on **Enable for all skills** to require approval for every current and future skill.

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

## Keep model use within policy

Every model request an agent makes passes through the AI Gateway: chat, reasoning, tool calls, document classification, summaries, conversation titles, and knowledge queries. 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.

## Stop an agent in an emergency

Guardrails act inside a run. To stop runs that are already in flight, use **Control Center → Govern → Agent Controls**. Stop one agent, or every agent at once. Stopping a system agent, such as the Operator, also stops every run and helper agent it started. See [Agent Controls](/ai-workbench-qore/control-center/govern/agent-controls.md).

#### Related

* [Guardrails](/ai-workbench-qore/console/agent-builder/deploy/guardrails.md) — configure per-agent controls
* [PII masking](/ai-workbench-qore/console/agent-builder/deploy/guardrails/pii-masking.md) — choose providers and masked entities
* [Tool execution](/ai-workbench-qore/console/agent-builder/deploy/guardrails/tool-execution.md) — require approval before skills run
* [AI Gateway](/ai-workbench-qore/control-center/ai-gateway.md) — the AI Gateway, where model policy is set
* [Agent Controls](/ai-workbench-qore/control-center/govern/agent-controls.md) — stop agents in an emergency

***

{% columns %}
{% column width="83.33333333333334%" %}

<p align="right"><em>Maintained by</em> <mark style="color:green;">Abhishek Paul</mark><br><code>AI-assisted, human-approved</code></p>
{% endcolumn %}

{% column width="16.666666666666664%" %}

<div align="left"><img src="https://1326225582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0qmgQjJ5aArDTj2ACFHG%2Fuploads%2Fgit-blob-d034645b4f8f8ee661985f5306b60ded3289653c%2Fmaintainer-abhishek-paul.png?alt=media" alt="" width="60"></div>
{% endcolumn %}
{% endcolumns %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/ai-workbench-qore/core-concepts/guardrails-and-validation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
