
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
@braintrust/browser
Advanced tools
Braintrust SDK for browser environments with AsyncLocalStorage polyfill
Official browser-only SDK for Braintrust.
This is an integration package that provides browser-optimized builds of the Braintrust SDK with AsyncLocalStorage polyfill support for standard browsers.
This package supports limited functionality in the browser. There is a known CORS limitation when used outside the braintrust.dev domain. If you need this for your own domain, contact support@braintrust.dev.
npm install @braintrust/browser braintrust
# or
pnpm add @braintrust/browser braintrust
# or
yarn add @braintrust/browser braintrust
Note: Install both packages so your browser integration and main SDK stay on compatible versions.
braintrust (installed alongside @braintrust/browser)zod (^3.25.34 || ^4.0)import * as braintrust from "@braintrust/browser";
const experiment = await braintrust.init("BrowserExperiment", {
apiKey: "YOUR_API_KEY",
});
// Use tracing in browser
const result = await braintrust.traced(
async () => {
// Your code here
return "result";
},
{ name: "myOperation" },
);
Use @braintrust/browser when:
Use braintrust directly when:
Browser-compatible features include:
For full documentation, visit https://www.braintrust.dev/docs
Apache-2.0
FAQs
Braintrust SDK for browser environments with AsyncLocalStorage polyfill
We found that @braintrust/browser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.