Overview
PII redaction removes personally identifiable information (PII) from agent session data before that data is stored in LiveKit Cloud. Each transcript is scanned by an LLM and PII is redacted from the transcript, audio, and telemetry.
Redaction is a project-level setting that applies to every session in the project once turned on. It's included with agent observability at no additional cost, with no separate plan requirement or metering, and is off by default for every project. When redaction is turned on, LiveKit Cloud detects PII and redacts it from the following:
- Session transcripts
- Session audio
- Dashboard transcript
- Telemetry
PII redaction is part of agent observability and is available only for LiveKit Cloud projects. It works for agents deployed to LiveKit Cloud and for self-hosted agents that connect to LiveKit Cloud media servers. It isn't supported with self-hosted media servers or fully self-hosted deployments.
How detection works
LiveKit Cloud scans each transcript with an LLM through the LiveKit inference gateway and redacts detected PII. The detection models run with zero data retention: providers don't retain or train on the transcript content sent for detection. It automatically falls back through a chain of alternate models if the primary model is unavailable. If all models fail, the session recording upload is rejected with a retryable error, and no unredacted content is stored for projects with redaction turned on.
Redaction runs during recording upload after the session ends and doesn't affect live sessions.
Model-based detection substantially reduces PII exposure but doesn't guarantee complete removal. Redaction is not a replacement for handling sensitive data carefully in your own app.
Turn on PII redaction
Turn on redaction per project in the PII redaction section of your Observability settings page.
After you set the switch to On for PII redaction, the default categories are automatically selected. You can customize the selections to redact more or fewer categories.
To stop redacting, set the PII redaction switch to Off rather than deselecting all categories.
If you turn off redaction after it's been turned on, the stored category selection is kept. When you turn redaction back on, it restores the previous selection.
Redaction is a project-level setting, but you can also turn it on for a single session without changing the project setting, using the record: { redaction: true } option on AgentSession.start(). This is useful for previewing redaction before you enable it project-wide. See Session recording options.
Redaction categories
LiveKit Cloud recognizes 41 PII categories across 10 groups. By default, 36 are turned on. The other five — date, language, organization, political_affiliation, and religion — are off by default and must be explicitly turned on. These categories are excluded by default because they generally pose less risk when retained, and redacting them can remove content you want to keep. For example, redacting organization masks your own company or brand name, and redacting date removes scheduling context such as appointment times, so these categories are left to your discretion.
Some categories include more specific subtypes. For example, name includes name_given and name_family, and location includes location_address, location_city, location_state, location_country, location_zip, and location_coordinate. The detection model might tag a span with either the parent category or one of its subtypes, so custom selections should include both the parent category and all of its subtypes.
| Group | Categories | In default set |
|---|---|---|
| Name | name, name_given, name_family | All |
| Contact | email_address, phone_number | All |
| Demographics | age, dob, education_level, occupation, origin, language, political_affiliation, religion | All except language, political_affiliation, religion |
| Credentials | username, password | All |
| Network | url, ip_address | All |
| Organization | organization | None |
| Financial | bank_account, routing_number, swift_code, credit_card, credit_card_expiration, cvv | All |
| Location | location, location_address, location_city, location_state, location_country, location_zip, location_coordinate | All |
| Date | date | None |
| Identifiers | account_number, driver_license, government_id, passport_number, ssn, license_plate, vehicle_id, healthcare_number, numerical_pii | All |
How redacted content is represented
Redaction changes how session data is stored, displayed in Agent insights, and exported through telemetry. The representation depends on the data path.
Session transcripts
Detected PII spans in the chat history are replaced with self-closing markers, <redaction type="..."/>, before the recording is saved to storage. The type is the detected PII category, for example, <redaction type="email_address"/>. In Agent insights, these markers appear as redaction bars labeled with the PII type rather than as raw markup.
If an assistant transcript contains expressive TTS markup (LiveKit's <expr> tags), redaction preserves the markup structure and removes only the PII in the spoken text.
Session audio
Audio segments replace redacted content with a beep tone. The waveform shown in the dashboard is generated from the redacted audio.
Dashboard transcript
Only the redacted version of the transcript is available in Agent insights. Raw transcript content is never displayed or stored for projects with redaction turned on.
Telemetry
OpenTelemetry (OTLP) logs and traces have two kinds of attributes removed: those tagged as PII (any attribute key with a pii segment, such as lk.pii.chat_ctx) and the GenAI content attributes that hold conversation text (content and tool_calls). Structural metadata such as token counts, durations, model names, and roles is kept.
Considerations
Keep the following behaviors and limitations in mind before you turn on PII redaction and rely on it.
Coverage and accuracy
Redaction reduces PII exposure, but it has limits on how accurate it is and on what it covers:
- Best-effort detection. Redaction is LLM-based and substantially reduces PII exposure, but it doesn't guarantee complete removal.
- English-only detection. Redaction detects PII in English-language transcripts only. Non-English transcripts aren't redacted.
- Redaction applies only to new sessions. Redaction affects only sessions recorded after you turn it on. Recordings already stored in LiveKit Cloud aren't redacted retroactively.
- Covered data paths. Redaction covers the session recording chat history and audio, the dashboard transcript, and OTLP log and trace attributes. In telemetry, PII-flagged and LLM message-content attributes (raw dialogue) are dropped entirely rather than redacted span by span.
- Only data stored in LiveKit Cloud is redacted. Redaction runs in LiveKit Cloud during recording upload, so it doesn't cover data your agent collects or exports on its own. Raw PII can still be present in data you collect locally (such as
session.historyor session reports), in OTLP traces you export directly to your own backend, and in LiveKit Egress recordings written to your own storage.
Redaction cleans transcript, audio, and telemetry content, but it doesn't sanitize identifiers such as participant identity and room name. These are recorded in logs and traces throughout LiveKit and aren't redacted. Do not put PII in these fields. For details, see Access tokens & grants.
Requirements
Some redaction behavior depends on session recording and your SDK version:
- Dashboard transcript requires session recording. For projects with redaction turned on, the dashboard transcript is generated from the redacted session recording. If session recording is turned off or the recording upload doesn't complete, no transcript is generated for that session.
- Audio redaction requires the transcript. Redacting audio depends on the session transcript to locate spoken PII. If a project has redaction turned on and a session records audio without the transcript, the client raises an error. Keep transcript recording enabled whenever you record audio.
- Audio redaction requires timing metadata. Muting redacted audio relies on speaking timestamps in the session recording, provided by Python SDK 1.3.1 or later and Node.js SDK 1.0.38 or later. On older versions, redacted turns have their text redacted but their audio left unchanged.
Performance and reliability
Redaction adds time to recording uploads and fails safe if detection can't complete:
- Added upload latency. Detection runs synchronously during recording upload and can add a few seconds to a few minutes, depending on the transcript length. Live sessions are unaffected.
- Fail-closed. If detection fails after all model fallbacks, the upload is rejected with a retryable error, and no unredacted content is stored.