only available on the Enterprise plan.
Create retention policy
- Go to Settings > Data management.
- Click + Create automation.
- Select Data retention type.
- Configure settings:
- Object type: Logs, Experiments, or Datasets.
- Retention period: Days to keep data before deletion.
- Click Save.
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 daysNext steps
- Export to cloud storage for long-term archival
- Set up alerts to monitor data quality
- Self-hosting advanced for data plane configuration