Roadmap
Vercel AI SDK
Coming soon — not yet available.This page previews the intended design. The package below doesn't exist yet; treat the snippets as a preview, not working code. See the roadmap.
Wrap any Vercel AI SDK model with one import. Every generation and tool call records itself — replayable, auditable, and stored in a project you own.
Install
pnpm add @kraterion/ai-sdkWrap the model
Pass your model through withKraterion. It uses the SDK's middleware hooks, so the rest of your code is unchanged.
import { openai } from "@ai-sdk/openai";
import { withKraterion } from "@kraterion/ai-sdk";
export const model = withKraterion(openai("gpt-4o"), {
project: "support",
});Run and replay
Use the wrapped model anywhere you would use the original. Each run returns a receipt you can replay later.
import { generateText } from "ai";
import { model } from "./model";
const { text } = await generateText({
model,
prompt: "What is our refund policy?",
});
// run recorded · receipt 3f4d…aeTools and memory
Tool calls are captured at the orchestration layer, so they show up in the run record and the lineage graph. Turn on memory to add memory.remember and memory.recall as tools the model can call.
export const model = withKraterion(openai("gpt-4o"), {
project: "support",
memory: true,
});