Skip to main content
Retention is configured per project. Set separate windows for logs, experiments, and datasets.
only available on the Enterprise plan.

Create retention policy

  1. Go to Settings > Data management.
  2. Click + Create automation.
  3. Select Data retention type.
  4. Configure settings:
    • Object type: Logs, Experiments, or Datasets.
    • Retention period: Days to keep data before deletion.
  5. Click Save.
Retention policies permanently delete data. Deleted logs, experiments, and dataset rows cannot be recovered.

How retention works

Logs: Individual logs are deleted when their creation timestamp exceeds the retention period. Experiments: Entire experiments (metadata and all rows) are deleted when the experiment creation timestamp exceeds the retention period. Datasets: Individual dataset rows are deleted when their creation timestamp exceeds the retention period. The dataset itself remains and can accept new rows.

Soft deletion

For self-hosted deployments (data plane v1.1.21+), data is soft-deleted by marking it unused. A background process purges unused files within 24 hours, providing a grace period to restore accidentally deleted data.
Configure a service token for your data plane to enable retention. See Data plane manager for details.

Cloud provider retention policies

For self-hosted deployments, review your cloud provider’s bucket retention policies at the project and organization level before configuring retention in Braintrust. Org-wide policies are common and can conflict with Braintrust retention settings or delete data independently of Braintrust. All Braintrust deletes are recorded in a delete log. If data goes missing, contact Braintrust support and Braintrust will audit these logs to determine whether the deletion was caused by a Braintrust retention policy or another process. Braintrust recommends enabling audit logging on your storage bucket to help trace the root cause of unexpected deletes.

Common retention patterns

Production logs: 90 days
Keep recent logs for debugging, delete older data to manage costs.
Development logs: 7 days
Keep short-term history for active development, clean up test data quickly.
Experiments: 180 days
Retain completed evaluations for half a year, then archive or delete.
Compliance: 30 days
Meet regulatory requirements by automatically deleting user data after 30 days.

Next steps