This library provides tools for evaluating and tracing AI applications in Braintrust. Use it to:
- Evaluate your AI models with custom test cases and scoring functions
- Trace LLM calls and monitor AI application performance with OpenTelemetry
- Integrate seamlessly with OpenAI, Anthropic, and other LLM providers
This SDK is currently in BETA status and APIs may change.
The SDK is split into packages by LLM provider integration. Install the core package plus any provider integrations you need.
dotnet add package Braintrust.Sdkdotnet add package Braintrust.Sdk.OpenAIdotnet add package Braintrust.Sdk.Anthropic<ItemGroup>
<PackageReference Include="Braintrust.Sdk" Version="version goes here" />
<PackageReference Include="Braintrust.Sdk.OpenAI" Version="version goes here" /> <!-- optional -->
<PackageReference Include="Braintrust.Sdk.Anthropic" Version="version goes here" /> <!-- optional -->
</ItemGroup>Install the dotnet 8 framework
- Macos:
brew install dotnet-sdk@8 - Linux: Follow these instructions
- Windows: Follow these instructions
ls -l examples/
# >>> outputs
EvalExample/
OpenAIInstrumentation/
SimpleOpenTelemetry/
... # rest of the examplesdotnet run --project examples/SimpleOpenTelemetry