Skip to content
PluginStats

@grantex/vercel-ai weekly downloads statistics

By grantex · npm · AI SDKs

Vercel AI SDK integration for the Grantex delegated authorization protocol

View on npm Stale · Oct 18, 2026

@grantex/vercel-ai has 110 recorded weekly downloads on npm, a decrease of 52.0% over the past 30 days.

Weekly downloads
110
Official API · Oct 18, 2026
7-day growth
-51.1%
-115 weekly downloads
30-day growth
-52.0%
-119 weekly downloads
90-day growth
+23.6%
+21 weekly downloads
Rank
—
Among tracked npm listings

About @grantex/vercel-ai

@grantex/vercel-ai

Vercel AI SDK integration for the Grantex delegated authorization protocol.

Adds scope-enforced tools and audit logging to any Vercel AI SDK agent.

Homepage | Docs | Sign Up Free | GitHub

Install

npm install @grantex/vercel-ai@0.1.7 @grantex/sdk ai zod

Quick Start

Scope-Enforced Tools

Create Vercel AI SDK tools with Grantex authorization. Before each execution, the wrapper verifies the token against JWKS and checks the verified scope. Invalid or insufficient tokens fail before your tool implementation runs:

import { createGrantexTool } from '@grantex/vercel-ai';
import { z } from 'zod';

const readCalendar = createGrantexTool({
  name: 'read_calendar',
  description: 'Read upcoming calendar events',
  parameters: z.object({
    date: z.string().describe('Date in YYYY-MM-DD format'),
  }),
  grantToken,                     // JWT from Grantex token exchange
  requiredScope: 'calendar:read', // verified before execution
  execute: async (args) => {
    return await getCalendarEvents(args.date);
  },
});

// Use with generateText, streamText, etc.
import { generateText } from 'ai';

const { text } = await generateText({
  model: openai('gpt-4'),
  tools: { read_calendar: readCalendar },
  prompt: 'What meetings do I have today?',
});
Inspect Grant Scopes

Use getGrantScopes to check what scopes a token has before creating tools:

import { getGrantScopes } from '@grantex/vercel-ai';

const scopes = getGrantScopes(grantToken);
// → ['calendar:read', 'email:send']
Audit Logging

Wrap tools with withAuditLogging to log every invocation to the Grantex audit trail:

import { Grantex } from '@grantex/sdk';
import { createGrantexTool, withAuditLogging } from '@grantex/vercel-ai';

const client = new Grantex({ apiKey: process.env.GRANTEX_API_KEY });

const audited = withAuditLogging(readCalendar, client, {
  agentId: 'ag_01ABC...',
  agentDid: 'did:key:z6Mk...',
  grantId: 'grnt_01XYZ...',
  principalId: 'user_01ABC...',
});

// Use audited in place of readCalendar — logs success/failure automatically

API Reference

createGrantexTool(options)

Creates a Vercel AI SDK tool with Grantex scope enforcement.

OptionTypeDescription
namestringTool name
descriptionstringTool description
parametersz.ZodTypeAnyZod schema for tool arguments
grantTokenstringGrantex JWT from token exchange
jwksUristring?JWKS URL; defaults to the Grantex production JWKS
issuer, issuerDid, audiencestring?Optional JWT claim validation settings
clockTolerancenumber?Clock tolerance in seconds
requiredScopestringScope required — checked against verified claims before execution
execute(args, options) => Promise<Result>Tool implementation

Throws GrantexScopeError during execution if the verified scope is missing; token verification failures also reject execution.

getGrantScopes(grantToken)

Returns the unverified string[] from the token's scp claim for diagnostics only. Do not use this helper to authorize a call.

withAuditLogging(tool, client, options)

Wraps a Grantex tool with audit logging.

OptionTypeDescription
agentIdstringAgent ID for audit attribution
agentDidstringAgent DID for audit attribution
grantIdstringGrant ID for the session
principalIdstringPrincipal that authorized the agent
toolNamestring?Override tool name in audit entries
GrantexScopeError

Error thrown when a grant token is missing the required scope.

PropertyTypeDescription
requiredScopestringThe scope that was required
grantedScopesstring[]The scopes the token actually has

Requirements

  • Node.js 18+
  • @grantex/sdk >= 0.3.11
  • ai >= 4.0.0 (Vercel AI SDK)
  • zod >= 3.0.0

Links

Grantex Ecosystem

This package is part of the Grantex ecosystem. See also:

License

Apache 2.0

Ownership

Grantex is owned by Orchestrum Technologies LLP. Inventor and owner: Sanjeev Kumar. Ownership contact: sanjeev@orchestrum.in or mishra.sanjeev@gmail.com.

Authority hardening requires TypeScript SDK 0.8.1 (currentAuthority), not just a valid JWT signature. Bind the audience and trusted human/agent identities, and check the issuer before every execution. This does not create human consent or automatically consume action decisions/spend caps. Existing offline defaults remain offline. Verify registry availability before installation. See the SDK execution authority guide.

Description from the npm listing.

  • grantex
  • vercel-ai
  • ai-sdk
  • ai-agents
  • authorization
  • oauth
  • jwt
  • agent-tools
  • scope-enforcement
  • delegated-auth
  • agent-permissions

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

@grantex/vercel-ai weekly downloads on npm, last 90 days: 110 weekly downloads as of Oct 18, 2026, +23.6% over 90 days.@grantex/vercel-aiWeekly downloads on npm · Last 90 days110downloads / week+23.6% over 90 days02004006008001K1.2K1.4KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 24, 2026 – Oct 18, 2026 · 87 observations · Updated Oc…pluginstats.com
@grantex/vercel-ai weekly downloads on npm, last 90 days: 110 weekly downloads as of Oct 18, 2026, +23.6% over 90 days.

7/30/90-day growth

@grantex/vercel-ai weekly downloads growth on npm: -51.1% over 7 days, -52.0% over 30 days, +23.6% over 90 days.@grantex/vercel-aiWeekly downloads growth on npm110downloads / week now7-day growth-115 weekly downloads-51.1%30-day growth-119 weekly downloads-52.0%90-day growth+21 weekly downloads+23.6%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
@grantex/vercel-ai weekly downloads growth on npm: -51.1% over 7 days, -52.0% over 30 days, +23.6% over 90 days.

Ranking history

@grantex/vercel-ai npm ranking history: currently #1768 (by weekly downloads).@grantex/vercel-ainpm ranking · by weekly downloads · Last 90 days#1768current rank#1640#1660#1680#1700#1720#1740#1760#1780Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 18, 2026 – Oct 21, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
@grantex/vercel-ai npm ranking history: currently #1768 (by weekly downloads).

Listing placement

All npm2,422 listings · 122 pages · 1,213 shown · page 92, #6 (overall #1,826)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs270 listings · 14 pages · page 13, #10 (overall #250)
AI SDKs: every listing in weekly downloads order

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 (122)
Recent weekly downloads observations for @grantex/vercel-ai
Date (UTC)Weekly downloadsChange vs. previous
110-1
111-41
152-48
200-2
202-3
2050
205-20
225-18
243+22
221-62
283-58
341-87
428-362
790—

Similar npm AI SDKs plugins

All 20 @grantex/vercel-ai alternatives

Data 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/@grantex/vercel-ai. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.