--- id: braintrust version: "0.33.0" license: MIT license_treatment: permissive maintenance: active --- # braintrust — SDK for integrating Braintrust License: permissive · Maintenance: active · Downloads: 7.8M/mo ## 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 above — 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 pip install braintrust uv add braintrust 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_current - Install friction: low - Maintenance: active - Downloads: 7.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags AI application evaluation framework, LLM tracing and logging, model performance evaluation, AI experiment tracking, evaluation metrics for AI, LLM observability SDK, AI application monitoring, llm-evaluation, ai-observability, experiment-tracking [View on SkillFed](https://skillfed.io/packages/braintrust) · [View on PyPI](https://pypi.org/project/braintrust/)