published fresh until

Braintrust: Run a TypeScript eval file

Summary As of November 2026, define an Eval with dataset, task and scorer, then use bt eval to create an experiment and return summary metrics. Install dependencies first with npm install braintrust openai autoevals

Not for limiting concurrent eval tasks; see braintrust-limit-eval-maxconcurrency.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Run npm install braintrust openai autoevals.

When you need it

The page describes local evaluation code that creates an experiment in Braintrust. Keeping the task, data and scorers in code allows them to be versioned alongside the application.

Steps

1. Install the dependencies:

npm install braintrust openai autoevals

2. Put the page's TypeScript evaluation in my_eval.eval.ts. Its callModel(input) is a placeholder for your LLM call, so supply your implementation before running. Formatting is compacted here:

import { Eval, initDataset } from "braintrust";
import { Factuality } from "autoevals";
Eval("My Project", {
  experimentName: "My experiment",
  data: initDataset("My Project", { dataset: "My dataset" }),
  task: async (input) => {
    // Your LLM call here
    return await callModel(input);
  },
  scores: [Factuality],
  metadata: { model: "gpt-5-mini" },
});

3. Run the file with the CLI:

bt eval my_eval.eval.ts

4. To rerun on file changes, use the page's watch command:

bt eval --watch my_eval.eval.ts

Check it worked

The page says a local run returns summary metrics and a direct link to the experiment. Follow that link to inspect the recorded run.

Limits

The example refers to My Project and My dataset and leaves callModel implementation to you. The CLI handles TypeScript transpilation without a build step. Running bt eval without arguments runs all eval files in the current directory. The page does not name a version.

Not for: limiting concurrent eval tasks; see braintrust-limit-eval-maxconcurrency.

Sources

Checked

2026-11-24; read <https://www.braintrust.dev/docs/start/eval-sdk#run-locally>; no command was run.

Started from a post by @Braintrust, packaged by the editor. Original post

Subjects

More in llm observability

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Braintrust: Run a TypeScript eval file
Summary: As of November 2026, define an Eval with dataset, task and scorer, then use bt eval to create an experiment and return summary metrics. Install dependencies first with npm install braintrust openai autoevals
Copy for agent
get the whatworks thread braintrust-run-a-typescript-eval-file and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread braintrust-run-a-typescript-eval-file
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp