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

laminar/setup

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

Laminar with @sentry/node integration

Laminar can work alongside @sentry/node for AI SDK tracing. Initialize Laminar **after** Sentry.init(). Sentry-instrumented traces go to Sentry backend, while AI SDK and other LLM traces are sent via Laminar.

Node.js Laminar initialization code example

import { registerTelemetry } from 'ai'; import { LaminarAiSdkTelemetry } from '@lmnr-ai/lmnr'; registerTelemetry(new LaminarAiSdkTelemetry()); This must be done once in your application, as early as possible, but after other tracing libraries like @sentry/node are initialized.

Laminar is open-source OTel-native observability platform

Laminar is an open-source, OTel-native observability platform purpose-built for AI agents. It is available at https://laminar.sh and on GitHub at https://github.com/lmnr-ai/lmnr.

Install Laminar package

Install the @lmnr-ai/lmnr package to use Laminar with the AI SDK.

Laminar setup with CLI

Run `npx lmnr-cli@latest setup` to authenticate your device with Laminar, create a new project API key and save it to .env as `LMNR_PROJECT_API_KEY`, and install the Laminar skill for your coding agent.

Next.js instrumentation file for Laminar

In Next.js, Laminar initialization and AI SDK telemetry integration should be done in `instrumentation.{ts,js}` file using an async register() function that checks if process.env.NEXT_RUNTIME === 'nodejs' before initializing.

Next.js instrumentation code example

export async function register() { if (process.env.NEXT_RUNTIME === 'nodejs') { const { registerTelemetry } = await import('ai'); const { LaminarAiSdkTelemetry } = await import('@lmnr-ai/lmnr'); registerTelemetry(new LaminarAiSdkTelemetry()); } }

Add @lmnr-ai/lmnr to Next.js serverExternalPackages

In next.config.js (or .ts/.mjs), add @lmnr-ai/lmnr to serverExternalPackages because Laminar depends on OpenTelemetry which uses Node.js-specific functionality. Configuration: serverExternalPackages: ['@lmnr-ai/lmnr']

Next.js older version instrumentation hook

For Next.js versions 13.4 ≤ Next.js < 15, enable the experimental instrumentation hook in next.config.js by adding: experimental: { instrumentationHook: true }

Laminar with @vercel/otel integration

Laminar can coexist with @vercel/otel. Regular Next.js traces are sent via @vercel/otel to your Telemetry backend configured with Vercel, while AI SDK and other LLM traces are sent via Laminar. Use initializeLaminarInstrumentations() with registerOTel() for advanced configuration.

Give your agent this brain