Docs/Aigovernance/Data Privacy

Data Privacy

Prompts and responses are often the most sensitive data in ANTS Platform. These controls decide who can read them, whether they are shown at all, what is sent in the first place and how long it is kept.

Who can read prompt and response content

Reading the text of prompts and responses needs the PII / raw-prompt content permission (pii:read). It covers trace and session input and output, observation bodies, and the flagged content behind AI Violations. The server enforces it, and content follows the same rules in the console, in exports and in the public API:

  • Console: members who can see traces but do not hold the permission open traces, observations and sessions in a content-free view. Timings, cost, tokens, model and scores stay visible, and input, output and metadata show Content hidden.
  • Exports: exports of traces, observations, sessions, scores, dataset items and dataset run items by someone without the permission run with content left empty, and the export menu shows Content excluded. Downloading a completed export that includes content needs the permission: anyone without it sees the download as restricted, and the download itself is refused, including from the emailed link. Changing, enabling or running a blob storage export also needs the permission, even for a destination that only receives scores. See Data Exports.
  • Public API: callers without the permission get the same content-free view. The traces, observations and sessions endpoints also follow the Trace input and output setting below: when a project hides prompt content, they return null for input and output, as the console hides it.

Who holds it:

  • Built-in roles with this permission: Owner and Security & Compliance.
  • Exporting content needs both this permission and data export access. Owner is the only built-in role with both, so by default only Owners can export content. Security & Compliance can read content but has no data export access. Governance Owner, Project Admin and Cost Analyst have data export access but not this permission, so their exports leave content empty.
  • Other roles that can see traces, such as Governance Owner, Governance Viewer and Auditor, get the content-free view.
  • Organization Settings → Security → Content access has switches that show content to agent owners, Governance Owners or Budget AI Owners without the permission. All three are off by default. See Content switches.
  • Members who own an AI agent see their own agents' traces, sessions and violations in the content-free view, unless Agent owners can see prompts and responses is on. See Agent owners.
  • A custom role can grant or withhold it, but a custom role cannot hold both this permission and data export access (see separation of duties). Only an Owner can export content, and there is no organization setting that changes this.
  • Traces and sessions published with a public link stay readable through that link.

See The content permission.

People who hold the permission see content as it was stored. Sensitive values such as card numbers are not masked by default; to keep them out, mask them in the SDK before they are sent (below). Default masking in displayed content is on the roadmap.

Content view audit

When content view logging is on, ANTS Platform writes an audit log entry each time prompt and response content is shown: opening a trace or a session, opening the PII detections list, and reading traces, sessions or observations through the public API. The entry records who opened it, which item, the project, and when. Use it to answer "who read this person's prompts?" during an investigation.

ℹ

Logging is set per organization: Organization Settings → Security → Log when content is opened. Until it is set, it follows the deployment default, which is off. Changing it needs feature admin access (Owner and Security & Compliance among the built-in roles). Content views by a Super Admin are always logged.

  • One entry per window. Opening a trace makes several requests, and people reopen the same trace while they work, so ANTS Platform writes one entry per person per item in any 5 minutes.
  • Only when content is shown. No entry is written for the content-free view, when an anonymous visitor opens a publicly shared trace, or when the project hides trace input and output, because no content was shown.
  • Fails closed in the console. If the audit entry cannot be written, the trace or session does not open, so content is never shown without a record. Through the public API, the response is still returned and the failed write is logged on the server.
  • What is not recorded. The short input and output previews in list tables.

To review content access, go to the Audit Logs page in Organization Settings and turn on Content views only. The list keeps your usual project visibility rules, and an audit log export includes the same entries. See Audit Logs.

Hide trace input and output

An organization can hide prompt and response content for everyone, whatever their role.

ℹ

Go to Organization Settings → Features → Feature visibility and use the Trace input and output switch. It is on by default. Changing it needs tenantSecurity.features:admin (Owner and Security & Compliance among the built-in roles).

  • Off hides trace and observation input and output across the app, leaves it out of exports, and returns null input and output in public API responses for traces, observations and sessions.
  • While the switch is on, a list of projects appears under it (On in X of Y projects). Turn a project off to hide content in that project only.
  • The data is still stored. Hiding controls what people see, not what is collected. To stop content from being collected, mask it in the SDK.

Mask data before it is sent

The Python SDK accepts a mask function. It runs on the input, output and metadata of every span and generation before anything leaves your application. Whatever it returns is what ANTS Platform stores.

python
from ants_platform import AntsPlatform EMAIL = re.compile(r"[\w.+-]+@[\w-]+\.[\w.]+") def mask(data, **kwargs): if isinstance(data, str): return EMAIL.sub("[REDACTED_EMAIL]", data) return data ants = AntsPlatform(mask=mask)

To find or block sensitive data in traffic you already send, use PII Detection and Security Guardrails. For the Discover AI agents, see Discover AI: Data & Privacy.

Where guardrail checks send text

AI Guardrails checks run on the deployment's detection engine:

  • Self-hosted models (default): the text is checked by the detection services deployed for your ANTS Platform instance.
  • Cloud provider: the text is sent to AWS Comprehend in the AWS account and region of your deployment. A copy is then sent to an LLM judge, a Cloudflare Worker running Workers AI models, for PHI, Ethics & Bias, Safety, Denied Topics and Hallucination. Before that copy leaves, every value found by the rule-based detectors and Comprehend is masked, and for PHI the person's identifiers are masked. If masking cannot run, nothing is sent to the judge. Medical terms and the rest of the text stay readable, so the judge can assess them.

Rule-based detectors (Secrets & Credentials, Source Code, the card number and SSN rules) and custom detectors always run inside ANTS.

Encryption

  • Stored credentials are encrypted at rest with AES-256-GCM, using the deployment's ENCRYPTION_KEY. This covers LLM connection keys, SSO client secrets, integration credentials (Slack, Jira, Linear, PagerDuty, ServiceNow, PostHog, blob storage, webhooks), Budget AI provider secrets, and directory and connector credentials.
  • API key secrets are stored only as hashes. The full secret key is shown once, when the key is created.
  • Data in transit and trace data at rest are encrypted by the infrastructure the platform is deployed on (TLS at the load balancer, and the encryption settings of the databases and object storage).

Retention and deletion

Set how long data is kept under Organization Settings → Data Retention: an organization default, a period per category of data, and overrides per AI agent. A nightly job deletes, per category, traces, observations, scores, prompt and response payloads, media, Discover AI activity, guardrail decisions and other data older than its period. See Data Retention.

Where data is stored

Data is stored in the region and accounts where your ANTS Platform deployment runs. Residency is decided when the deployment is set up, not in the product. Contact your ANTS Platform team to confirm the region for your tenant, or self-host to keep data in your own cloud account.

Next steps

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