SDK

Two lines. Every call, instrumented.

Wrap your model with foglamp(). Every generateText and streamText call is then traced, costed, and scored, with no prompt changes and no new infrastructure.

model.ts
import { foglamp } from "@foglamp/ai-sdk";import { openai } from "@ai-sdk/openai";// Wrap any model — every call is now traced, costed, and scored.const model = foglamp(openai("gpt-4o"));
Drop-in

Built for the code you already wrote.

Foglamp wraps the model object you already pass to generateText and streamText. Your prompts, tools, and control flow stay exactly as they are. You just get telemetry for free.

  • Works with generateText, streamText, and tools
  • No prompt or business-logic changes
  • TypeScript-first, fully typed
Install
npm i @foglamp/ai-sdk
Zero overhead

Telemetry that stays out of the hot path.

Spans are batched and flushed asynchronously, so instrumentation never blocks a response. Set one environment variable and you're streaming traces to your dashboard.

  • Async, batched span export, no added latency
  • Single FOGLAMP_API_KEY to authenticate
  • Open standards under the hood
Captured per call
100%
calls traced
0ms
added latency
2
lines to add

Your agents are running in the fog.

What they cost, when they break, what they say. You can't see any of it. One prompt turns the light on.

Start free