Data Retention lets organization owners and admins on Enterprise plans control two things:
- Retention periods — how long execution logs, soft-deleted resources, and Chat data are kept before they are permanently deleted.
- PII redaction — masking personally identifiable information out of your workflow data at up to three points: workflow input, block outputs, and logs.
Both are configured once at the organization level and apply to every workspace, with optional per-workspace overrides for workspaces that need different rules.
Setup
Go to Settings → Enterprise → Data Retention in your workspace.
The page shows your retention policies as a list:
- The Organization row (tagged Default) holds the settings that apply to every workspace without its own override.
- Each workspace override row below it applies to one or more specific workspaces.
Open a row to edit it, or click Add override to create a workspace override. Each policy has a Retention section, and — when PII redaction is enabled — a PII redaction section.
Retention periods
Each policy has three independent retention settings, each with the same set of options: 1 day, 3 days, 7 days, 14 days, 30 days, 60 days, 90 days, 180 days, 1 year, 5 years, or Forever.
Setting a period to Forever means that category of data is never automatically deleted. On a workspace override, each field can also be set to Inherit from organization to fall back to the organization default for just that field.
Log retention
Controls how long execution logs are kept.
When the retention period expires, log records are permanently deleted, along with any files associated with those executions in cloud storage. This covers:
- Workflow execution logs
- Background job logs (deployed APIs, schedules, and webhooks)
Soft deletion cleanup
Controls how long soft-deleted resources remain recoverable before permanent removal.
When you delete a workflow, folder, knowledge base, table, or file, it is initially soft-deleted and can be recovered from Recently Deleted. Once the soft deletion cleanup period expires, those resources are permanently removed and cannot be recovered.
Resources covered:
- Workflows
- Workflow folders
- Knowledge bases (and their documents)
- Tables
- Files
- MCP server configurations
- Agent memory
- Chat conversations
Task cleanup
Controls how long Chat data is kept, including:
- Chat conversations and run history
- Run checkpoints and async tool calls
- Inbox tasks
Each setting is independent. You can configure a short log retention period alongside a long soft deletion cleanup period, or any combination that fits your compliance requirements.
PII redaction
When PII redaction is enabled for your organization, each policy gains a PII redaction section that masks personally identifiable information — names, emails, phone numbers, credit-card numbers, national IDs, and more — from your workflow data. Sim detects and masks PII with Microsoft Presidio; each match is replaced with a placeholder token such as <EMAIL_ADDRESS>.
Redaction is configured per stage — the point in a run where masking is applied. Select a stage, then choose which entity types and custom patterns to redact for it:
| Stage | What it does |
|---|---|
| Logs | Redacts workflow logs when they are persisted. Observability-only — the workflow still runs on the original data. |
| Workflow input | Redacts the workflow input before execution. The workflow runs on the masked data, which may change its output. |
| Block outputs | Masks every block output before the next block reads it. Runs in-flight and may change output and execution performance. |
The Workflow input and Block outputs stages alter what the workflow computes on, not just what is stored. Redacted data is masked during the run and may affect workflow output. Enable them only where that trade-off is acceptable.
Entity types and language
For each stage, choose the entity types to redact from the searchable grid. They are grouped as:
- Common — person name, email, phone, credit card, IP address, URL, IBAN, crypto wallet, medical license, VIN
- United States — SSN, passport, driver's license, bank account, ITIN
- United Kingdom — NHS number, National Insurance number
- Other regions — Singapore, Australian, and Indian identifiers
The Block outputs stage is restricted to regex- and checksum-based recognizers, so it can run in-flight over large payloads without a performance penalty. Types that need name-model detection — person name, location, date or time — are not offered for that stage.
Detection is language-aware: pick the language whose recognizers should apply. English, Spanish, Italian, Polish, and Finnish are supported, and the grid filters to the identifiers available for the selected language.
Some recognizers match loosely and over-redact — US Social Security Number, US bank account number, and Date or time have no checksum and match aggressively. Enable these only where false positives are acceptable.
Custom patterns
Beyond the built-in entity types, each stage can redact anything a regular expression matches — employee IDs, internal URLs, ticket numbers. Give each pattern a name, a regex, and a replacement token; every match is replaced with the replacement text wrapped in angle brackets (e.g. EMPLOYEE_ID → <EMPLOYEE_ID>).
Per-workspace overrides
Retention and PII redaction are configured at the organization level and apply to every workspace by default. When a workspace needs different rules, add a workspace override.
- An override targets one or more workspaces (a workspace can belong to only one override).
- Each retention field either sets its own period or inherits the organization value.
- PII redaction on an override is either Inherit (use the organization's redaction) or Override (workspace-specific). Choosing Override replaces the organization's redaction rules entirely for that workspace — it is not merged stage-by-stage.
Removing an override returns its workspaces to the organization defaults.
Defaults
By default, retention settings are unconfigured — no data is automatically deleted in any category, and no PII is redacted, until you configure it. Setting a retention period to Forever has the same effect as leaving it unconfigured, but makes the intent explicit and lets you change it later without configuring from scratch.
Common Questions
Self-hosted setup
Retention periods
NEXT_PUBLIC_DATA_RETENTION_ENABLED=true
DATA_RETENTION_ENABLED=trueOnce enabled, retention settings are configurable through Settings → Enterprise → Data Retention the same way as Sim Cloud.
PII redaction
PII redaction runs against a standalone Presidio service. Deploy it (see apps/pii) and point Sim at it, then enable the redaction surfaces:
# The Presidio service exposing /analyze and /anonymize
PII_URL=http://localhost:5001
# Expose the log-redaction stage and the Data Retention PII section
PII_REDACTION=true
# Additionally expose the execution-altering stages (Workflow input, Block outputs)
PII_GRANULAR_REDACTION=truePII_GRANULAR_REDACTION layers on top of PII_REDACTION — with only PII_REDACTION enabled, just the Logs stage is configurable.