Audit logging is only available on the Enterprise plan.
Grant access
Members of the Owners permission group can read organization audit logs by default. To let anyone else read them, grant the organization-level Read audit logs permission in Settings > Permissions.The Read audit logs permission grants read access to audit log entries for the organization. It does not grant access to modify the audited resources.
View the audit log
To view recent organization activity, go to Settings > Audit log. The table lists actions performed by members of your organization, with the most recent events first. Use the controls above the table to customize the view:- Time range: Select Last 24 hours, Last 7 days, or Last 30 days. The default is Last 7 days.
- Filters: Narrow results by fields such as actor, event type, or resource.
- Columns: Show or hide columns. ID, details, and before and after change columns are hidden by default.
Query the audit log
Users with the Read audit logs permission can query audit logs with SQL using theaudit_logs() data source, identified by your organization’s ID (for example, audit_logs('my-org-id')). No additional configuration is required to query them.
Run a query from the Query page, the bt sql CLI, or the API.
Examples:
Recent activity across the organization
All actions taken by a specific member
Permission and access control changes in the last 30 days
What gets logged
Each audit log entry records a single event: what happened, who performed it, and what changed.Fields
Each organization audit log entry includes:
For create events,
before_changes is null. For delete events, after_changes is null. For update events, both fields contain the changed resource values. Readonly events contain neither.
Events
Braintrust records organization audit log events for these resource categories:
Some operations emit multiple audit log entries. For example, inviting a user can create an organization member entry, permission group membership entries, access grants, and an API key entry. Bulk operations create one audit log entry per changed resource.
Audit logs can take a few minutes to show up after an action occurs.
Sensitive values
Braintrust excludes or redacts sensitive values in audit logs:- API key hashes and raw keys are not included. Audit entries include the API key preview name when available.
- AI provider secrets are redacted. Audit entries include a secret preview and omit encrypted secret material and key names.
- Webhook action URLs (
config.action.url) in project automation configurations are redacted. When a webhook URL changes,event_details.redacted_fields_changedlistsconfig.action.url. - String values in
query.readqueries are masked. See Recorded queries. - Resource IDs, organization IDs, project IDs, creation timestamps, update timestamps, and deletion timestamps are omitted from
before_changesandafter_changeswhen they would add noise to the change diff.
Audit data reads and modifications
Administrative actions and data reads are logged automatically with no setup.query.read events cover both SQL queries run manually and ones run implicitly by the Braintrust UI when you browse logs, experiments, and traces. These events count toward your processed data usage. Only organization owners can turn read auditing off or on with Audit data reads in Settings > Audit log.
Braintrust records the following events for data rows:
Recorded queries
Eachquery.read event records the parsed query in event_details.query, with string values masked:
- Letters and digits in string values are replaced by
*, so'secret123'becomes'*********'. This includes strings inside arrays and objects, and object keys. Numbers aren’t masked. - Object IDs passed to table functions such as
project_logs('<project-id>')stay visible. - Queries that can’t be parsed are recorded as
<Failed to parse query>. - Parts of the parsed query nested 64 or more levels deep are replaced with
<Truncated: maximum audit query depth exceeded>. Each condition adds levels to the parsed query, so a long chain ofORconditions can reach this limit even without parentheses. The event still records the rest of the query, andquery_hashis computed from the full original query.
event_details.query_hash is a SHA-256 hash of the original query, so you can match repeated runs of the same query.
Async queries and applied scorers
Row-level audit logging also records changes to async queries and to scorers applied to an experiment with Apply scorers. These events use theproject_automation and project_score event types:
- Submitting an async query records
project_automation.created, with a SHA-256 hash of the query inevent_details.query_hash. Canceling an async query recordsproject_automation.updated, withconfig.statuschanging topaused. - Fetching async query results records
query.readwithquery_sourceset toasync_query. Itsquery_hashmatches the one inproject_automation.created, so you can link result downloads to the query that produced them. - Applying scorers to an experiment records
project_score.created, with the scorers and scope inafter_changes.config.online. Pausing or resuming them recordsproject_score.updated, with the previous and new status inconfig.online.status.
Retention
Audit logs are retained indefinitely for the lifetime of your organization’s Enterprise subscription, giving you a permanent record of administrative activity for compliance and regulatory requirements. Unlike logs, experiments, and datasets, they aren’t subject to your plan’s retention window or to retention automations. If your organization leaves the Enterprise plan, Braintrust stops recording new audit log events.Next steps
- Access control to learn how organization permissions work.
- Manage permissions to grant Read audit logs to a permission group.
- SQL reference to learn about how to query audit logs with SQL.