> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agntor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Redact

> Output filtering and redaction

# Redact

Use redaction policies to scrub PII or secrets from outputs.

```ts theme={null}
import { redact } from '@agntor/sdk';

const policy = {
  redactionPatterns: [
    { type: 'pii', pattern: /\b\d{3}-\d{2}-\d{4}\b/g },
  ],
};

const result = redact('ssn 123-45-6789', policy);
```
