@cogitator-ai/ai-sdk weekly downloads statistics
By cogitator-ai · npm · AI SDKs
Vercel AI SDK adapter for Cogitator - bidirectional compatibility
@cogitator-ai/ai-sdk has 510 recorded weekly downloads on npm.
About @cogitator-ai/ai-sdk
@cogitator-ai/ai-sdk
Vercel AI SDK adapter for Cogitator — bidirectional compatibility between Cogitator agents and the AI SDK, for AI SDK 4, 5, 6 and 7.
Full guide: cogitator.app/docs/integrations/ai-sdk
Installation
pnpm add @cogitator-ai/ai-sdk @cogitator-ai/core ai
ai is a peer dependency: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0.
Features
- Use Cogitator agents with the AI SDK —
generateText,streamText, structured output, any AI SDK major - Use AI SDK models in Cogitator — wrap any AI SDK provider model (
LanguageModelV1–LanguageModelV4) as a Cogitator backend - Tool conversion — convert tools in both directions; converted tools work with the
toolsoption of every AI SDK major
Compatibility
| AI SDK | Model specs it accepts | Default cogitatorModel() spec | fromAISDK() input |
|---|---|---|---|
ai@4 | v1 | v1 | LanguageModelV1 |
ai@5 | v2 | v2 | LanguageModelV2 |
ai@6 | v2, v3 | v3 | LanguageModelV3 |
ai@7 | v2, v3, v4 | v4 | LanguageModelV4 |
Specification auto-detection
When specificationVersion is omitted, cogitatorModel() and createCogitatorProvider() pick the spec of the installed ai package, so existing code keeps working on every major:
- Runtime:
ai/package.jsonis resolved fromprocess.cwd()(your app), then from this package — also for ESM-only installs whoseexportshidepackage.json. The result is cached per process. Ifaicannot be resolved (for example in runtimes withoutprocess.getBuiltinModule),'v2'is used, which ai@5 – ai@7 accept. - Types: the default return type is derived from the
LanguageModeltype of theaipackage your TypeScript resolves, with the same mapping, sogenerateText({ model: cogitatorModel(cog, agent) })type-checks on ai@4 – ai@7 without changes.
Pass specificationVersion to override the detection — for example when several ai majors are installed, or when the runtime and the type-level ai differ. AI SDK 6 and 7 run v2 models in a compatibility mode that logs a "Using v2 specification compatibility mode" warning per call; the detected v3 / v4 defaults avoid it.
Usage
Cogitator Agent as AI SDK Model
import { generateText, streamText } from 'ai';
import { Cogitator, Agent, tool } from '@cogitator-ai/core';
import { cogitatorModel } from '@cogitator-ai/ai-sdk';
import { z } from 'zod';
const cog = new Cogitator({
llm: { providers: { openai: { apiKey: process.env.OPENAI_API_KEY! } } },
});
const searchTool = tool({
name: 'search',
description: 'Search the web',
parameters: z.object({ query: z.string() }),
execute: async ({ query }) => ({ results: [`Result for: ${query}`] }),
});
const researcher = new Agent({
name: 'researcher',
model: 'openai/gpt-6.1-sol',
instructions: 'You are a research assistant.',
tools: [searchTool],
});
// spec detected from the installed ai package (ai@4 – ai@7)
const { text } = await generateText({
model: cogitatorModel(cog, researcher),
prompt: 'Research the latest AI developments',
});
// explicit override
const result = streamText({
model: cogitatorModel(cog, researcher, { specificationVersion: 'v2' }),
prompt: 'Write an article about TypeScript',
});
for await (const chunk of result.textStream) {
process.stdout.write(chunk);
}
With ai@4 the same call returns a LanguageModelV1; { specificationVersion: 'v1' } forces it explicitly.
How the agent maps to a model…
Description from the npm listing.
- ai
- sdk
- cogitator
- vercel
- ai-sdk
- llm
- adapter
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (1)Similar npm AI SDKs plugins
All 20 @cogitator-ai/ai-sdk alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@cogitator-ai/ai-sdk. First seen Nov 1, 2026; last successful collection Nov 2, 2026. See the methodology.