Setup
Install Braintrust alongside Harbor. Requiresharbor>=0.16.0 and Python 3.12 or later. Docker must be running for Harbor to execute tasks.1
Install packages
2
Set environment variables
.env
Run evaluations
Pass--plugin braintrust to harbor run to enable the Braintrust plugin. The plugin is discovered automatically through Harbor’s braintrust entry point after installation.The Harbor integration is activated through the
--plugin braintrust flag in the harbor run CLI, not through auto_instrument(). No import or patching is required in your task code.Harbor. After the run completes, the plugin creates a sync manifest at jobs/my-eval/braintrust-sync.json.Configure with environment variables
SetHARBOR_BRAINTRUST_PROJECT to override the default project name on every run:.env
--plugin-kwarg project_name=my-project directly:Verifier output
In the defaultattachments=all mode, the score and verification spans include Harbor’s captured test-stdout.txt, optional test-stderr.txt, and ctrf.json output when present. To capture only structured CTRF output without raw logs, pass attachments=structured. To disable verifier and reward attachments entirely, pass attachments=none..env
--plugin-kwarg 'redact_patterns=["regex"]' to harbor run, or set HARBOR_BRAINTRUST_REDACT_PATTERNS to a JSON array of regex patterns, to redact matching strings from raw log output.Backfill a past job
To re-sync a completed Harbor job without re-running the evaluation, usebackfill_job:backfill.py
project_name to override the project:What Braintrust receives
After each Harbor evaluation run, Braintrust receives:- A managed dataset with the task cases used in the evaluation.
- An experiment row for each trial, with the agent’s final output as the experiment output and the Harbor task’s reference answer as the expected output.
- Scores derived from Harbor verifier rewards, mapped to Braintrust score fields, with verifier output files (
test-stdout.txt,test-stderr.txt, andctrf.jsonwhen present) attached to each score span inattachments=allmode (the default). - Agent traces (when trajectory tracing is enabled), showing the agent’s tool calls and model turns using Harbor’s ATIF format.