← Back to adopters
Adopter quickstart

Vercel AI SDK proof path

Private-beta path for adopting Imladri with Vercel AI SDK: initialize the adapter, wrap one risky capability, run the scanner or proof command from the repo, and review the same evidence in Profile.

Certification status

Certified

Certified

Certified against Vercel AI SDK tool execution in TypeScript, including direct tool.execute calls plus generateText and streamText tool loops.

2/2 lanes passed; real-package verification covers ai and zod with 3 allowed body calls, action-alias mapping, forwarded toolCallId metadata, and zero blocked-path body calls.

Runtimetypescript
Access modePrivate beta
Approved beta starter
cli
imladri init --framework vercel-ai --ci-provider vercel
Reference dependencies
dependencies
npm install @imladri/sdk
npm install ai zod
Minimal wrapper
typescript
import { generateText, stepCountIs, streamText, tool } from "ai";
import { z } from "zod";
import { ConstitutionalAgent, wrapVercelAITools } from "@imladri/sdk";

const agent = new ConstitutionalAgent({ agentId, apiKey, apiUrl, preflightUrl });

const aiTools = {
  sendEmail: tool({
    description: "Send a customer email after approval.",
    inputSchema: z.object({ to: z.string().email(), body: z.string() }),
    execute: async ({ to, body }, { toolCallId }) => ({ sent: to, toolCallId }),
  }),
  deployCloud: tool({
    description: "Deploy the approved cloud change.",
    inputSchema: z.object({ target: z.string() }),
    execute: async ({ target }) => ({ deployed: target }),
  }),
};

const guardedTools = wrapVercelAITools(agent, aiTools, {
  strictTools: ["email.send", "cloud.deploy"],
  actionAliases: {
    sendEmail: "email.send",
    deployCloud: "cloud.deploy",
  },
});

const textResult = await generateText({
  model,
  tools: guardedTools,
  stopWhen: stepCountIs(2),
  prompt: "Send the approved update to the customer.",
});

const streamResult = streamText({
  model,
  tools: guardedTools,
  stopWhen: stepCountIs(2),
  prompt: "Deploy the approved change and summarize it.",
});
Terminal proof evidence
terminal evidence
imladri sdk certify --real --target vercel-ai
imladri scan init-ci --provider vercel --output scripts/imladri-vercel-scan.sh
imladri proof export --format json --output imladri-proof.json