Skip to main content
Retention controls how long Braintrust keeps your logs, experiments, and datasets before they’re deleted. Your plan sets a base retention window for logs and playground data (14-day retention on Starter and 30-day retention on Pro) that applies across your organization. From there, you can:
Retention windows and automations don’t apply to audit logs.

Extend the retention window

Pro and Enterprise plans can extend the base retention window to keep logs and playground data, including each row’s activity history, queryable for longer, for an additional storage charge.
  • Starter: 14-day retention window. Not extendable.
  • Pro: 30-day retention window. Extend up to 180-day retention in Settings > Billing, in 30-day increments.
  • Enterprise: Custom retention window, up to 365-day retention, configured with your account team.
Extending applies org-wide. To keep less data on specific projects, automate data deletion. Retention storage is billed on the highest amount retained during the billing month, so extending mid-month isn’t prorated. See Retention storage for how it’s measured. Increasing your retention window takes effect immediately. Decreasing it, or removing the extension, is scheduled for the end of the current billing period and can be canceled before then.

Automate data deletion

only available on the Enterprise plan.
A retention automation permanently deletes one object type once its data is older than a period you set. Use it to keep less data than your plan-level window, for example to meet a compliance requirement. Create a separate automation for each object type (logs, experiments, or datasets) you want to limit. You can set a policy for a single project or for the whole organization.
Retention automations only shorten retention. When more than one policy applies, the shortest retention period wins, so an automation can’t keep data longer than your organization’s retention window. To keep data longer, extend the retention window instead.

Set retention for one project

  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.

Set retention for all projects

An organization-level retention automation applies a retention period for one object type to every project in the organization, including projects created later. Use it to enforce a consistent policy without configuring each project.
  1. Go to Settings > Data management.
  2. Click Create policy. If another organization policy exists, click + Policy.
  3. Select a Retention target and enter the Retention period (days).
  4. Click Create.
A project-level policy can shorten retention further for a specific object type, but it can’t extend retention beyond the organization-level policy.
On self-hosted deployments, organization-level retention requires data plane v2.9.0 or later.
Retention policies permanently delete data. Deleted logs, experiments, and dataset rows cannot be recovered.

What gets deleted

  • Logs: Individual logs older than the retention period are deleted.
  • Experiments: The entire experiment (metadata and all rows) is deleted once its creation timestamp passes the retention period.
  • Datasets: Individual dataset rows older than the retention period are deleted. The dataset itself remains and can accept new rows.

Example policies

Delete data manually

To remove specific data before it ages out of your retention window, delete it directly. Manual deletion is available on all plans.
  • Traces and logs: Select traces in the log table and delete them. See Delete traces.
  • Dataset records: Select records in a dataset and delete them, or delete them programmatically. See Delete records.
  • Experiment rows: Select rows in an experiment table and delete them, or delete them through the API.

Self-hosted deployments

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 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.

Next steps