# Braintrust

<div style={{maxWidth: '720px'}}>
![The Braintrust connector in Workspace Settings, for querying logs and experiments, writing scorers and prompts, and running evals, with a Connect button](</docs/_next/static/media/braintrust-connector.05llq_mtonh6w.jpg>)
</div>

The [Braintrust MCP server](https://www.braintrust.dev/docs/integrations/developer-tools/mcp) lets agents read and write your Braintrust data, so they can dig into production traces, find what's going wrong, and check a fix with an eval.

For use cases and example prompts, see [Braintrust for AI coding agents](/integrations/braintrust).

## What is Braintrust? [#what-is-braintrust]

[Braintrust](https://www.braintrust.dev) is an observability and evaluation platform for AI products. It records traces from your LLM calls and agents, and lets you score them and run evals against datasets.

## What agents can do [#what-agents-can-do]

Once you connect Braintrust, agents can:

- Query logs, experiments, and datasets with SQL, and summarize experiment results
- Find projects, experiments, and datasets by name, and share links to them
- Find and manage recurring patterns in your traces
- Create prompts and scorers, test scorers on real traces, and set up online scoring
- Add rows to datasets and run evals
- Set up alerts and automations

Agents can only do what the connected Braintrust account, API key, or service token can do.

<Callout>
Superconductor connects to Braintrust's US endpoint at `api.braintrust.dev`. If your organization uses the EU data plane or a self-hosted deployment, add its MCP URL as a [custom MCP server](/docs/integrations/connectors/custom-mcp-servers) instead.
</Callout>

## Setup [#setup]

Go to **Workspace Settings → Connectors** (or a project's **Connectors** page). Click **Add**, search for Braintrust, and select it. You can also click **Connect** on the Braintrust card, or **Connect another** to add another account.

### Step 1: who the connection is for [#step-1-who-the-connection-is-for]

Choose **Me** or **Workspace** as the owner, then choose which agents can use the connection. The default is **Me**, with **My personal assistants** selected. From a project's **Connectors** page, only **In this project** is selected instead. Enable **Team assistants** or **Agents in projects** separately. Anyone in the workspace can use the connection through the team assistants you pick, and anyone with access to the projects you pick can use it, including in sessions they launch themselves. See [connection options](/docs/integrations/connectors#fill-in-the-connection-details) for what each choice means.

Click **Continue**.

### Step 2: how agents reach Braintrust [#step-2-how-agents-reach-braintrust]

The second screen has two tabs: **Braintrust account** and **Access token**. Pick one.

#### Braintrust account [#braintrust-account]

This tab is selected by default, and it's the easiest way in — there's no key to create.

Click **Continue to Braintrust** and sign in if Braintrust asks. On Braintrust's **Authorization request** page, check that the redirect URL is your Superconductor address, then click **Yes, I trust this URL**. You land back on the Connectors page with **Braintrust connected**.

Agents then act in Braintrust as whoever signed in. If you enable **In projects**, anyone with access to those projects can use that account — so sign in with an account whose permissions you're happy to share.

#### Access token [#access-token]

Create an API key in Braintrust under **Settings → [API keys](https://www.braintrust.dev/app/~/configuration/api-keys)**, or a service token under **Settings → [Service tokens](https://www.braintrust.dev/app/~/configuration/service-tokens)**. Paste it into the **Braintrust API Key or Service Token** field and click **Connect Braintrust**.

## Reconnecting and disconnecting [#reconnecting-and-disconnecting]

If an account connection stops working, the Connectors page shows a **Reconnect needed** badge on it, and agents run without Braintrust.

To fix it, click **Manage** next to the connection, then **Reconnect Braintrust**, and sign in again. You can only reconnect a personal connection you own; for someone else's, Superconductor tells you who to ask.

**Disconnect** removes the connection from Superconductor. For an access token, also delete the API key or service token in Braintrust's settings.

## When to use it [#when-to-use-it]

Ask agents to use Braintrust when a ticket involves how your AI features behave in production, or when a change to a prompt or model needs an eval. Agents can create scorers, alerts, and dataset rows, so tell them when they should only look. For example:

```text
Our support bot started giving wrong refund answers this week. Use Braintrust to find example traces and tell me what they have in common.
```

```text
Write a Braintrust scorer that flags answers which mention a competitor, test it on a few recent traces, and share a link.
```

```text
After this prompt change, run an eval in Braintrust on our "checkout-questions" dataset with our saved scorers, and compare the results with the last experiment.
```

```text
Which Braintrust scorers dropped the most between last week's experiments and this week's? List the worst traces for each.
```