Works with your stack
Works with AI SDK
Use eyeball's AI SDK tool export for a deterministic read-only agent loop.
The AI SDK export bundles each canonical definition with an execute callback.
ts
import { gateway, generateText, stepCountIs } from "ai";
import { Eyeball } from "@eyeball/sdk";
const eyeball = new Eyeball({
apiKey: process.env.EYEBALL_API_KEY!,
baseUrl: process.env.EYEBALL_EXECUTOR_URL!,
});
const bundle = await eyeball.tools.get({
toolkits: ["gmail"],
format: "ai-sdk",
userId: "demo_user",
});
const result = await generateText({
model: gateway(process.env.AI_GATEWAY_MODEL!),
prompt: "Summarize the latest reservation email.",
tools: bundle.tools,
stopWhen: stepCountIs(4),
});
console.log(result.text);The mocked mailbox path runs with zero third-party SaaS accounts. An AI Gateway credential is only needed for generateText; the direct SDK quickstart is account-free.