Skip to main content
Automations trigger actions based on events in Braintrust. Stay informed about production issues, export data to external systems, and manage data retention automatically.

Automation types

Braintrust supports three automation types:

Alerts

Send notifications when conditions are met on production logs:
  • Webhooks: POST JSON payloads to custom endpoints
  • Slack: Send messages to Slack channels
Use alerts to catch errors, track quality degradation, or monitor usage patterns.

S3 export

Periodically export data to AWS S3 buckets:
  • Logs: Export traces or spans in JSON Lines or Parquet format
  • Custom queries: Use SQL to define exactly what data to export
Use exports for archiving, offline analysis, or feeding data warehouses like Snowflake or Databricks.

Data retention

Automatically delete old data based on time-based policies:
  • Logs: Remove logs older than a specified period
  • Experiments: Delete completed experiments after retention window
  • Datasets: Remove dataset rows past their retention date
Use retention policies to manage storage costs and comply with data privacy regulations.

Configure automations

Navigate to Configuration > Automations in your project to create and manage automations. Each automation requires:
  • Name: Identify the automation’s purpose
  • Description: Optional context about what it does
  • Type: Alert, S3 export, or data retention
  • Configuration: Type-specific settings

Test automations

Before saving, test automations to verify configuration:
  • Alerts: Sends a test payload to your webhook or Slack channel
  • S3 exports: Writes and deletes a test file to your S3 bucket
  • Data retention: Previews which data would be deleted
Testing ensures automations work correctly before they run in production.

Monitor automation runs

View execution history and status:
  1. Navigate to Configuration > Automations
  2. Click the status icon next to an automation
  3. View run history, timing, and any errors
For S3 exports, you can also:
  • Manually trigger exports with Run once
  • Reset automation state to re-export all data

Next steps