skillfed

braintrust

SDK for integrating Braintrust

braintrust v0.33.0 7.8M downloads/30d#1,695 on PyPI16
Permissive license MIT Active released

What it is and what it does

Braintrust is an SDK that integrates AI applications with a hosted evaluation and tracing platform. It lets you define evaluation tasks with input data, a task function, and scoring functions, then run those evaluations against the Braintrust backend to log results, trace execution, and compare model outputs against expected behavior. The core workflow involves wrapping your AI task in an Eval object, defining how to score correctness, and running the evaluation via CLI or programmatically.

The package depends on 10 runtime libraries including requests for HTTP communication, jsonschema for validation, tqdm for progress display, and sseclient-py for streaming responses. It supports optional integrations for OpenAI agents, OpenTelemetry, and Temporal workflows via extras. The SDK requires Python 3.10 and an API key to authenticate with the Braintrust service.

Use it for:

  • Run automated evaluations of LLM outputs against expected results and custom scoring functions.
  • Trace execution paths and log intermediate steps of AI applications for debugging and analysis.
  • Compare multiple model versions or prompts by running the same evaluation suite against each.
  • Monitor AI application behavior in production by instrumenting with Braintrust logging.
  • Integrate evaluation workflows into CI/CD pipelines using the CLI or programmatic API.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Braintrust is a Python SDK for logging, tracing, and evaluating AI applications, providing tools to instrument and assess model behavior against defined metrics.

Yes, if you are building or evaluating AI applications and want structured logging and evaluation infrastructure. The package is actively maintained, has low install friction, uses a permissive license, and carries no known vulnerabilities. The main constraint is the requirement for Python 3.10+ and a Braintrust API key; if you don't need hosted evaluation or tracing, a lighter alternative may suffice.

Install

braintrust on PyPI

pip

pip install braintrust

uv

uv add braintrust

poetry

poetry add braintrust

Installing braintrust

Before you install

Low friction install with a pure-wheel distribution. Active maintenance with a release 3 days old and commits current as of 2026-08-14. Requires Python 3.10 or later.

License in practice

MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.

Quickstart

pip install braintrust

from braintrust import Eval

def is_equal(expected, output):
    return expected == output

Eval(
    "Say Hi Bot",
    data=lambda: [{"input": "Foo", "expected": "Hi Foo"}],
    task=lambda input: "Hi " + input,
    scores=[is_equal],
)

Requires Python 3.10 or later. Requires BRAINTRUST_API_KEY environment variable to connect to the Braintrust service.

Verify before relying

  • Whether the 10 runtime dependencies (requests, chevron, tqdm, etc.) introduce any transitive vulnerabilities or breaking changes.
  • Performance characteristics and scalability limits for large-scale evaluation runs.
  • Whether optional extras (cli, openai-agents, otel, temporal) are stable or experimental.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10.0)
Install friction low — pure-Python wheel
Runtime dependencies 10 — requests, chevron, tqdm, exceptiongroup, jsonschema, packaging, sseclient-py, python-slugify, typing_extensions, wrapt
Maintenance actively maintained — 3 days since the last release
Last repo commit
First released
Downloads 7,783,477/month — #1,695 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: braintrust-0.33.0-py3-none-any.whl

Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10

Tags

AI application evaluation frameworkLLM tracing and loggingmodel performance evaluationAI experiment trackingevaluation metrics for AILLM observability SDKAI application monitoring
llm-evaluationai-observabilityexperiment-tracking

More Artificial Intelligence packages

Further reading