agentskit.js

piiDenyValidator

Auto-generated API reference for piiDenyValidator.

Function: piiDenyValidator()

piiDenyValidator(opts?): Validator

Defined in: pii-validator.ts:18

A Validator that FAILS when the agent's output still contains PII β€” the bridge between @agentskit/core/security's redactor and the createValidatorGuard chain. Use it as a deterministic last-line gate on agents that must not leak PII (redaction, summarization, anything exporting cross-tenant), instead of trusting the system prompt to do it.

import { createValidatorGuard, piiDenyValidator } from '@agentskit/runtime'
const guard = createValidatorGuard({ validators: [piiDenyValidator()] })

Default onFail: 'block' β€” a PII leak is not something to silently retry past.

#Parameters

#opts?

#name?

string

#onFail?

ValidatorAction

#rules?

PIIRule[]

#Returns

Validator

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page

Ask the docs

Ask anything about AgentsKit. Answers come from the docs corpus via OpenRouter free-tier models. Rate limited per IP.