@cloro-dev/ai-sdk npm package wraps cloro’s sync monitor endpoints as Vercel AI SDK tools. Each tool is a factory that returns an AI SDK tool() with a Zod input schema and a typed output. The source lives in the cloro-ai-sdk repository.
Prerequisites
ai6 or 7, andzod3.25.76 or later- A cloro API key from the dashboard (see Authentication)
Install the package
CLORO_API_KEY from the environment when they run. You can also pass it to each tool: webSearch({ apiKey: "YOUR_API_KEY" }).
Use with an agent
ai 6, use stepCountIs in place of isStepCount.
Available tools
Both tools accept
apiKey and country (ISO 3166-1 alpha-2, defaults to "US"). webSearch also takes maxResults (1 to 10) and includeAiOverview (defaults to true; false saves 2 credits). aiAnswer takes engine: "chatgpt" (default), "gemini", "google-ai-mode" or "bing-ai-mode". To give the model more than one engine, make one tool for each engine.
Every call is a sync request, so it costs the provider rate plus the sync surcharge: 7 credits for webSearch with the AI Overview.