Let the Sazabi agent query Braintrust logs, evals and prompts
Last verified on Nov 8, 2026.
An evaluation score is a number someone chose to measure. When it falls in production, the next question is what changed. Often the answer is not in Braintrust: a retrieval service slowed down, a tool started returning empty results, a deploy shipped a different prompt. The score tells you something is wrong and the logs tell you where.
Sazabi, the AI-native observability and security platform, lets its agent read Braintrust during an investigation. Braintrust is a connector, not a log source, so the agent looks things up when a thread asks for them.
What the Sazabi agent can do with Braintrust
The MCP connector points at Braintrust's hosted server over Streamable HTTP: https://api.braintrust.dev/mcp for the US or https://api-eu.braintrust.dev/mcp for the EU. Your API key goes in the Authorization header as a Bearer credential. Through it the agent can:
- Query experiments, evals and their scores
- Browse datasets and logged traces
- Inspect prompts and project configuration
Writes follow the per-connection read-only toggle.
The sandbox CLI is the other route. bt is installed in the sandbox, and the connection stores BRAINTRUST_API_KEY. Braintrust's own docs describe the split this way: the MCP server suits an assistant reasoning across several connected actions, while the bt CLI suits repeatable commands, scripts and shell pipelines. Inside a Sazabi thread you get both, and the agent picks.
Braintrust's MCP server includes a sql_query tool. Its /btql endpoint runs SQL over logs, experiments and datasets, with functions such as project_logs() and experiment(), so a question about scores can be a precise query, not a scroll through a table.
Questions it answers
- Which production traces scored below our threshold since the last deploy?
- Did an experiment's scores change when the prompt changed?
- What input and output did the model see on the worst traces?
- Which dataset rows does a failing eval cover?
- Were our own services logging errors while those scores dropped?
A worked example: scores dropped after a deploy
Braintrust's query docs show logs read through project_logs('<project>', shape => 'traces') and filtered on a score by name, for example scores.accuracy. You have a project called support-bot with an accuracy scorer. At 15
Ask in a Sazabi thread:
Using Braintrust, query the support-bot project logs as traces from the last
three hours where scores.accuracy is below 0.6. Show id, input and output for the
five lowest. Then check our service logs for errors since 14:30.The agent runs the query through the connector and returns traces you can open by id. Then it pulls the service logs from Sazabi. If the worst traces all share an input shape, say long attachments, and the file service logged timeouts from 14
, you have a cause with a timestamp. If the low scores sit on one prompt revision, the prompt config the agent read is your lead. If the logs are clean, you have still ruled out infrastructure in one thread.One failure is worth knowing before you start. If sql_query returns no rows for a project that plainly has data in the Braintrust UI, Braintrust's docs say the client is connected to the wrong data plane. Reconnect with the other region's endpoint.
How it fits with other integrations
Braintrust sits with Langfuse, LangSmith and Respan in AI frameworks. Services that call the model send their own logs through OpenTelemetry, or through a platform source such as Vercel. The integrations index lists the rest. Pricing covers how volume counts.
Ways to connect
- Braintrust (MCP connector): Give the Sazabi agent tools to query your Braintrust experiments, datasets, prompts, and logs directly from agent conversations.
Frequently Asked Questions
Which Braintrust region should I choose?
The one your organization uses. Sazabi supports the US endpoint at api.braintrust.dev/mcp and the EU endpoint at api-eu.braintrust.dev/mcp. The wrong region can return empty results for projects that show data in the Braintrust UI.
How does Sazabi authenticate to Braintrust?
You supply a Braintrust API key from Settings > API keys. Sazabi sends it as a Bearer credential in the Authorization header. The server acts with the permissions of the account the key belongs to.
Can the agent change things in Braintrust?
It can query by default. Write operations are governed by the per-connection read-only toggle, so switch it on if you want investigation without changes.
What does the sandbox CLI add?
The bt CLI is installed in the sandbox, and connecting it stores BRAINTRUST_API_KEY. The agent can then run evaluations, experiments and trace logging against your Braintrust account.
Sources
- Braintrust connects through an MCP connector and a sandbox CLI, each configured separately (accessed Nov 8, 2026)
- The connector uses the US or EU MCP endpoint with an API key sent as a Bearer credential, queries experiments, evals, scores, datasets, logged traces, prompts and project configuration, and writes follow the read-only toggle (accessed Nov 8, 2026)
- The bt CLI in the sandbox uses BRAINTRUST_API_KEY and can run evaluations, experiments and trace logging (accessed Nov 8, 2026)
- Braintrust MCP endpoints per data plane region, sql_query returning no rows or a different data plane error when the region is wrong, and the choice between MCP and the bt CLI (accessed Nov 8, 2026)
- The /btql endpoint runs SQL over logs, experiments and datasets, with project_logs(...) and shape => traces and a scores.<name> filter (accessed Nov 8, 2026)