new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

braintrust/setup

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Braintrust setup with Next.js using @vercel/otel

To integrate Braintrust with Next.js, register telemetry using LegacyOpenTelemetry and BraintrustExporter. In an instrumentation file, call registerTelemetry(new LegacyOpenTelemetry()) and then registerOTel() with a serviceName and traceExporter set to BraintrustExporter. The BraintrustExporter accepts a parent field (format: 'project_name:your-project-name') and filterAISpans option (boolean, default true to send only AI-related spans).

Braintrust setup with Node.js using BraintrustSpanProcessor

For Node.js without a framework, configure the NodeSDK directly with BraintrustSpanProcessor in the spanProcessors array. The BraintrustSpanProcessor accepts a parent field (format: 'project_name:your-project-name') and filterAISpans option (boolean). Call sdk.start() after creating the NodeSDK instance, then registerTelemetry(new LegacyOpenTelemetry()). Call sdk.shutdown() when done.

Node.js Braintrust setup example with tools and context

Example showing Node.js Braintrust integration with generateText, tools defined via tool(), context option for custom metadata, telemetry option with functionId, and stopWhen option using isStepCount().

Node.js Braintrust dependencies

Required npm packages for Node.js Braintrust integration: ai, @ai-sdk/openai, @ai-sdk/otel, braintrust, @opentelemetry/sdk-node, @opentelemetry/sdk-trace-base, zod.

Give your agent this brain