Skip to main content

Setup

In your project directory, give this prompt to your coding agent:
This sets up access to Braintrust, then uses a coding agent to inspect your project, install the Braintrust SDK, and configure tracing.No coding agent installed? Install and instrument manually.

Verify tracing

Run your app and make an AI call. A trace will show up in your Logs within seconds. Click into any trace to see the complete input and output, token counts, latency, cost, model configuration, and metadata.
If traces appear in Braintrust, you’ve successfully set up tracing.
If your traces don’t appear in Braintrust, see Troubleshoot below.

Troubleshoot

  • Verify BRAINTRUST_API_KEY is set and starts with sk- (echo $BRAINTRUST_API_KEY).
  • Check that the project name in your code matches the project in the UI.
  • Check your console for errors. Common causes are an invalid API key, network connectivity, or a firewall blocking api.braintrust.dev.
See the troubleshooting guide for your SDK: Python, TypeScript, Go, Java, Ruby, or C#.

Next steps