@paystage/ai-sdk weekly downloads statistics
Stop your agent paying a drainer: PayStage preflight as AI SDK tools, so the payment is checked inside the same loop that would sign it. pay / review / do_not_pay.
@paystage/ai-sdk has 903 recorded weekly downloads on npm, a change of -32.5% over the past 7 days, ranking #2099 of 3,247 tracked listings.
About @paystage/ai-sdk
@paystage/ai-sdk
PayStage preflight as AI SDK tools. Decide whether an x402 payment should be signed inside the same loop that would sign it, with the rules that fired.
npm install @paystage/ai-sdk ai zod
import { generateText, gateway } from "ai";
import { paystageTools } from "@paystage/ai-sdk";
const policy = {
version: 1,
max_amount: { value: "0.05", asset: "USDC", decimals: 6 },
allowed_assets: [{ symbol: "USDC", decimals: 6, address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", network: "eip155:8453" }],
allowed_networks: ["eip155:8453"],
unknown_payee: "deny",
};
const { text } = await generateText({
model: gateway("openai/gpt-5-mini"),
tools: { ...paystageTools({ policy }), ...yourPaymentTools },
prompt: "Buy the weather data, but not above 2 cents.",
});
The two tools
| tool | returns |
|---|---|
paystage_evaluate_payment | decision (pay / review / do_not_pay), reasons[], summary |
paystage_should_pay | allowed, decision, reasons[] — one-word form for when reasoning is noise |
What it will not do
Nothing here signs, holds a key, or moves money. That is not a limitation, it is the design: the tool that decides must not be the tool that spends. Your payment tool stays where it is; these tools only tell the model whether to call it.
Read-only also means the cost is predictable — evaluating a payment is a local computation, not a network call and not a paid request.
onReview
review means the policy found something worth a human's attention (an unknown payee, an unusual
amount) but did not refuse. onReview: "refuse" turns those into refusals; the default "pay" lets
them through with the reason attached.
Related
@paystage/x402-guard— the same policy, wrappingfetchso a refusal never reaches the signer@paystage/mcp— nine tools over MCP, for Claude, Cursor and anything else that speaks it- Hosted, no install:
https://api.paystage.xyz/mcp
Description from the npm listing.
- payment-safety
- x402
- agent-payments
- spend-limits
- drainer
- firewall
- allowlist
- blocklist
- scam-prevention
- usdc
- base
- mcp
- preflight
- ai-sdk
- vercel
- payments
- agents
- vercel-ai
- tools
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 (128)Similar npm AI SDKs plugins
All 20 @paystage/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/@paystage/ai-sdk. First seen Nov 24, 2026; last successful collection Dec 6, 2026. See the methodology.