Docs/Aigovernance/Pii Detection

PII Detection

ANTS Platform finds sensitive data and harmful content in your agents' traces with Scheduled Detection. You set a detection policy for each agent. On every scheduled run, ANTS Platform scans the agent's new traces, records what it finds on each trace, and lists the results in AI Violations.

Scheduled Detection is one of the two modes of an AI Guardrails policy. The other mode, Real-time Enforcement, checks prompts and responses inline and can block or redact them. This page covers Scheduled Detection.

ℹ

Enterprise feature. Open it from Governance → AI Guardrails. It appears when AI Guardrails is turned on in Organization Settings → Features and the detection services are deployed for your instance. If it is missing, ask your ANTS Platform administrator.

What gets scanned

Detection runs on stored traces, not at ingestion and not inline. A trace belongs to an agent when its agent name matches the policy's agent. Traces with no agent name are matched by trace name.

  • The first run after you save a policy scans all of the agent's existing traces.
  • Later runs scan only traces that have not been scanned yet.
  • Each trace is scanned once per category group: PII, PCI and PHI together, Ethics & Bias, and Safety. Custom detectors, Secrets & Credentials and Source Code scan the input and output of each new trace once, together, and keep their own record of what they have scanned, so a problem with them never makes the other categories scan again.

Detection categories

CategoryLabelsDetected by
PII Detection (personally identifiable information)Person, email, phone number, social security number, date of birth, address, driver license, passport number, medical record, health insurance IDEntity recognition models
PCI Detection (payment card information)Credit card number, CVV, bank account number, routing number, IBAN, SWIFT codeEntity recognition models
PHI Detection (protected health information, HIPAA)Medical record number, health insurance ID, diagnosis, medication, prescription, lab result, treatment, clinical note, health condition, patient ID, hospital, doctor name, medical device, biometric identifier, health plan number, medical procedure, symptom, allergyEntity recognition models
Ethics & Bias Detection (harmful content and bias)Safety Categories S1 to S14: Violent Crimes, Non-Violent Crimes, Sex-Related Crimes, Child Sexual Exploitation, Defamation, Specialized Advice, Privacy Violations, Intellectual Property, Indiscriminate Weapons, Hate Speech, Suicide & Self-Harm, Sexual Content, Elections Misinformation, Code Interpreter Abuse. Bias Detection Categories: Gender, Racial, Age, Religious, Disability, Socioeconomic, Nationality and Sexual Orientation BiasLLM safety classifier
Safety Detection (jailbreak and prompt injection)C12: Jailbreak / Prompt InjectionLLM safety classifier
Secrets & CredentialsCloud Provider Keys, AI Provider Keys, Source Control Tokens, SaaS API Keys, JSON Web Tokens, Private Keys, Database Credentials, Passwords and Generic Secrets20 rules that run inside ANTS
Source CodePython, JavaScript / TypeScript, Java / Kotlin, C#, C / C++, Go, Rust, Ruby, PHP, SQL, Shell, Other codeHeuristic classifier that runs inside ANTS
Custom DetectorsYour own regular expression and keyword detectorsRun inside ANTS

What each Secrets & Credentials family and Source Code language covers is described in AI Guardrails.

In Scheduled Detection, card numbers and social security numbers are reported as the entity recognition models find them, without checksum or format validation. The switch Check card numbers and SSNs with rules applies to Real-time Enforcement only; see Card number and SSN checks.

Secrets & Credentials and Source Code run on the input and output of each new trace with the custom detectors, on the same schedule. They only report: nothing is blocked or changed. The Confidence Threshold does not apply to them. Their results are listed in AI Violations under the Secrets & Credentials and Source Code filters, with source Scheduled and the result Pass, and labels such as secrets.aws_access_key or sourceCode.python. The matched values are not stored. Secrets & Credentials results are also sent to policy violation webhooks and SIEM push with severity High; scheduled Source Code results are not sent. Each run scans up to 5,000 traces for them and the custom detectors, and continues from there on the next run.

Each category has its own switch, and every category starts off. When you turn a category on, all of its labels are selected; use Select All and Clear All, or pick labels one by one. The built-in labels are fixed lists.

For data specific to your organization, such as order numbers, customer IDs or project code names, add custom detectors built from a regular expression or a keyword list. Custom detectors switched on in an agent's policy run on every Scheduled Detection run for that agent. In Scheduled Detection they only report: a detector set to Block or Redact is recorded, but the stored trace is not changed. Turning a detector on in an existing policy covers traces received since the previous run, not older ones. Matches are listed in AI Violations under the Custom filter and are sent to policy violation webhooks and SIEM push with the category Custom and severity Low.

IP addresses are not a detection label.

Configure Scheduled Detection

Create the policy

In AI Guardrails, select Create Guardrail. Under Select Agent, pick an agent. Agents that already have a policy are not listed. You can also select Create New Agent to register an agent name and get its Agent ID.

Choose Scheduled Detection

Select the Scheduled Detection tab. Switching to the other tab turns Scheduled Detection off for this agent, because an agent's policy runs in one mode at a time.

Set the detection settings

  • Schedule Interval: Hourly, Daily (default) or Weekly. A policy is due again when its last run is older than the interval.
  • Confidence Threshold: 0% to 100% in steps of 5, default 50%. Detections below the threshold are ignored. Higher values reduce false positives but may miss some detections.

Choose categories and labels

Under Detection Categories, turn on the categories you need and select their labels. For Secrets & Credentials select the families, and for Source Code the languages. Under Custom Detectors, switch on any custom detectors for this agent.

Set up PagerDuty alerting (optional)

See PagerDuty alerting.

Save

Check the Summary panel (detection types, schedule, confidence, PagerDuty and Agent ID) and select Create. To change a policy later, open it from the list and select Update.

Approving an agent's governance evidence also creates or updates its Scheduled Detection policy, running daily, with labels chosen from the evidence. See What approval configures.

PagerDuty alerting

The PagerDuty Alerting section sends PagerDuty incidents for this agent's detections.

SettingDescription
Enable PagerDuty AlertingTurns alerting on for this agent. Available only when PagerDuty is connected.
PagerDuty ServiceAuto-select (use any synced service), or a specific synced agent service
Alert SeverityCritical, High (default), Low or Info
Auto-resolve AlertsSaved with the policy. ANTS Platform does not currently resolve PagerDuty incidents for you, so resolve them in PagerDuty.

If PagerDuty is not connected, the section shows Connect PagerDuty, which opens Project Settings → Integrations → PagerDuty. Incident creation must also be turned on in the PagerDuty integration. See PagerDuty. There is no per-category or threshold setting: alerting applies to the agent's detections as a whole.

ServiceNow incidents for detections are controlled in the ServiceNow integration, not in the policy.

Detection services

Detection runs on services deployed with your ANTS Platform instance:

ServiceWhat it runs
Entity recognition models (GLiNER and spaCy)PII, PCI and PHI labels
Self-hosted LLM safety classifier (Qwen2.5-14B)Ethics & Bias and Safety
Detection schedulerScheduled Detection runs, with the scanners scaling automatically to trace volume. It also runs the custom detectors, Secrets & Credentials and Source Code.
Guardrails APIReal-time Enforcement checks from the SDK and REST API

The detection services are switched on per deployment. In a self-hosted deployment, the safety classifier needs one GPU node, for example an AWS g5.xlarge with an NVIDIA A10G, and that node is part of your infrastructure cost.

The AI Guardrails list

The list page shows four cards: Active Guardrails, Compliant Agents, Violations (last 30 days, broken down by category) and Unprotected Agents (agents with no policy). The table shows each agent's selected labels per category, its violation count, Type (Scheduled or Real-time), Schedule and Status. Filter by type, status, violations and schedule, or search by agent name. View Detected Traces opens AI Violations.

Where results appear

  • AI Violations: every detection, with the matched labels and values, linked to the trace. When Detection review is turned on for your organization, analysts mark PII, PCI and PHI detections as false positives or real detections there, and the Detector accuracy report shows flagged traces and the false-positive rate per detector. See Review detections.
  • Risk Dashboard: detection rates drive each agent's likelihood, impact and dimension scores.
  • Drift Alerts and Runtime Validation: detection rates are compared with the agent's declared evidence.
  • AI Agent Center: detection counts per agent, a guardrail violation filter, and a button to send a detection summary to your integrations.

Who can configure detection

Viewing policies needs the AI Guardrails permission at Read. Saving them needs Read & Write, which Owner and Security & Compliance have. Department Admin and Auditor can view policies only. In the current release the Create Guardrail and edit pages open only for Owners. Every policy create, update and delete is written to the audit log. See Members & Roles.

Next steps

© 2026 ANTS Platform, Inc.Docs v1.0 · Last updated June 2026