# PII actions (/docs/pii-actions)



Tawa Guard finds five types of personally identifiable information (PII) in
the text it scans: email address, phone number, social security number, credit
card number and IP address. Each app chooses an action for every source and
type.

## Actions [#actions]

| Action | What Tawa Guard does                                                                                                                     |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Off    | The PII is still found. Nothing is done and the text is unchanged.                                                                       |
| Flag   | The PII is recorded as found. The text is unchanged.                                                                                     |
| Redact | The PII is replaced with a placeholder such as `[EMAIL]` in the text Tawa Guard returns for you to forward, and the removal is recorded. |
| Block  | The request is blocked.                                                                                                                  |

## Sources [#sources]

An app sets actions for each of these sources:

* User → LLM
* RAG chunk → LLM
* Assembled context → LLM
* Tool call → LLM
* Tool output → LLM

| Source                  | Flag            | Redact                                            | Block              |
| ----------------------- | --------------- | ------------------------------------------------- | ------------------ |
| User → LLM              | Records the PII | Returns `sanitised_text`                          | Blocks the request |
| RAG chunk → LLM         | Records the PII | Returns `sanitised_text`                          | Blocks the request |
| Assembled context → LLM | Records the PII | Acts as Flag                                      | Blocks the request |
| Tool call → LLM         | Records the PII | Acts as Flag                                      | Blocks the request |
| Tool output → LLM       | Records the PII | Returns `sanitised_text` in some cases, see below | Blocks the request |

## Where Redact changes the text [#where-redact-changes-the-text]

Redact changes the text that Tawa Guard returns, in the `sanitised_text` field
of the scan response. The field is present only when a redact applied, and it
contains only the types you chose to redact, each replaced by its placeholder.

Redact changes the text for:

* User → LLM
* RAG chunk
* Tool output scanned as plain text

Redact never changes the text for:

* Assembled context
* Tool call
* Tool output sent through the agent tool-output route

For these, Redact acts as Flag.

Redact also leaves the text unchanged, and `sanitised_text` is absent, when
the request is blocked, when the scan was split into chunks, or when the
result was served from the verdict cache.

To use the field, forward `sanitised_text` to your LLM in place of the
original text when it is present. When it is absent, forward your own text.

## Block covers a whole source [#block-covers-a-whole-source]

Block applies to a whole source. Choosing Block for one type blocks that
source for every type that is on. Moving any type away from Block stops
blocking that source, and its other types become Flag.

For example, an app has email, phone number and social security number
turned on for User → LLM. Setting email to Block on that source blocks every
User → LLM request that contains any of the three types. If you then change
the phone number to Redact, User → LLM stops blocking. Email and social
security number become Flag, and phone numbers are redacted.

## What Tawa Guard stores [#what-tawa-guard-stores]

Any copy of your text that Tawa Guard stores is redacted first, whatever
action you chose. See the
[privacy policy](https://tawaguard.com/legal/privacy) for how Tawa Guard
handles your data.

## What the job records [#what-the-job-records]

When a redact applies, the job record also stores:

* **PII removed**: a count by type. It holds no text.
* **`sanitised_passthrough`**: whether `sanitised_text` was returned to you.

Both are visible in the job detail.
