Linking Braintrust as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

Alpha release

This source is currently in alpha. The interface and available tables may change.

The Braintrust connector syncs your LLM evaluation and observability data into PostHog's Data Warehouse, so you can analyze your AI projects, experiments, datasets, prompts, and functions alongside your product data.

Prerequisites

You need a Braintrust account with permission to create an API key. Give the key read access to the resources you want to sync.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

When linking Braintrust, you'll need:

  • API key – create one in your Braintrust organization settings. Give it read access to the selected resources.
  • API URL – your Braintrust API URL, found in Settings > Data plane. The default is https://api.braintrust.dev. Use your regional or self-hosted URL when applicable. The URL must use HTTPS.

Sync modes

All Braintrust tables use full refresh sync. The Braintrust API doesn't support server-side time filters, so incremental sync isn't available.

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

Configuration

OptionDescription
API key
Type: password
Required: True
API URL
Type: text
Required: True

Enter your API URL from Braintrust Settings > Data plane. Use your regional or self-hosted URL when applicable.

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
projects

Projects that organize experiments, datasets, prompts, and functions.

Full refresh——
experiments

Evaluation experiments with their dataset, code revision, and comparison references.

Full refresh——
datasets

Dataset definitions used for evaluations. These rows do not contain dataset records.

Full refresh——
prompts

Saved prompts with their configuration and version identifiers.

Full refresh——
functions

Saved functions with their definitions, types, and parameter schemas.

Full refresh——

Braintrust tables contain object definitions only. Experiment events, dataset records, and raw traces are outside this connector's scope.

Troubleshooting

  • If you see a 401 authentication error, Braintrust rejected the API key. Check the key in your organization settings, then reconnect.
  • If you see a 403 permissions error, the API key can't read the resource. Check its permissions and verify the API URL is correct, then reconnect.
  • If the API URL is rejected, make sure it uses HTTPS, doesn't include a path or query string, and resolves to a public IP address.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?