Skip to content
PluginStats

@noburn/sdk weekly downloads statistics

By noburn · npm · AI SDKs

Hard LLM spend enforcement for Node.js — pre-call budget checks and per-user metering.

View on npm Outdated · Nov 23, 2026

@noburn/sdk has 419 recorded weekly downloads on npm, a decrease of 61.2% over the past 30 days, ranking #2304 of 3,247 tracked listings.

Weekly downloads
419
Official API · Dec 5, 2026
7-day growth
+90.5%
+199 weekly downloads
30-day growth
-61.2%
-661 weekly downloads
90-day growth
+13867%
+416 weekly downloads
Rank
#2304
▲ 49 in 7 days

About @noburn/sdk

@noburn/sdk

Hard LLM spend enforcement for Node.js — pre-call budget checks and per-user metering.

Check a planned LLM call against project-, per-user-, and per-run budget caps before you make it, then record what it actually cost.

Install

npm install @noburn/sdk

Requires Node.js ≥ 18 (uses the global fetch).

Quick start

import { NoburnGuard } from '@noburn/sdk';

const guard = new NoburnGuard({
  apiKey: process.env.NOBURN_API_KEY!,
  projectId: process.env.NOBURN_PROJECT_ID!,
  budgetCapUsd: 10,          // optional local fallback cap
  onError: 'allow',          // 'allow' (default, fail-open) | 'block' (fail-closed)
});

const decision = await guard.check({
  model: 'gpt-4o',
  estimatedTokensIn: 1000,
  estimatedTokensOut: 300,
  endUserId: 'user_123',     // optional — enforces that user's cap
});

if (decision.blocked) {
  throw new Error(`Blocked by noburn: ${decision.blockReason}`);
}

// ... make your LLM call ...

await guard.record({
  model: 'gpt-4o',
  tokensIn: 980,
  tokensOut: 290,
  costUsd: 0.005,
  wasBlocked: false,
  endUserId: 'user_123',
});

record() is fire-and-forget — it returns immediately and never throws, so it adds no latency to your call path.

Usage quotas

Give each plan an allowance ("free gets 20 requests a day") in the dashboard under Plan quotas, then pass the user's plan in context.plan:

const decision = await guard.check({
  model: 'gpt-4o',
  estimatedTokensIn: 1000,
  estimatedTokensOut: 300,
  endUserId: 'user_123',
  context: { plan: 'free' },
});

if (decision.blockReason === 'quota_exceeded' && decision.quota?.upgradeSuggested) {
  // show your upgrade prompt
}

// Show the allowance before the user tries anything:
const q = await guard.remaining({ endUserId: 'user_123', plan: 'free' });
if (q) console.log(`${q.remaining} of ${q.limit} left, resets ${q.resetsAt}`);

remaining() returns null when no quota applies or on any network error, and only throws NoburnAuthError. Windows are UTC (day 00:00, week Monday 00:00, month the 1st). A per-user cap set in the dashboard overrides the plan quota.

Per-customer budgets

Set each customer's cap from your backend: on signup, upgrade, top-up or cancel. Turn on Can manage budgets for the key first (project → SDK key).

await guard.setEndUserBudget({ endUserId: 'ws_123', limit: 20 });                  // $20 / month
await guard.setEndUserBudget({ endUserId: 'ws_123', limit: 5, window: 'total' });  // never resets
await guard.setEndUserBudget({ endUserId: 'ws_123', limit: 5, window: 'total', resetSpend: true }); // fresh pool
await guard.setEndUserBudgets([{ endUserId: 'ws_1', limit: 5 }, { endUserId: 'ws_2', limit: 20 }]); // up to 500
const b = await guard.getEndUserBudget('ws_123');   // { limit, used, remaining, ... } or null
await guard.deleteEndUserBudget('ws_123');

Unlike check(), these throw (NoburnApiError with status and code), so a cap you meant to set never silently goes missing. Changes apply on the customer's next check(). Docs: https://noburn.dev/docs/per-customer-budgets

Agent runs

Bound a single agent invocation with its own cap:

const run = await guard.startRun({ budgetCapUsd: 0.5 });

const decision = await guard.check({
  model: 'gpt-4o',
  estimatedTokensIn: 1000,
  estimatedTokensOut: 300,
  runId: run.runId,
});

await guard.record({ /* ... */, runId: run.runId });

const summary = await guard.endRun(run.runId); // { status, spendUsd, ... }
Stopping a run

Stop a runaway run from outside the agent: a supervisor, a spend.spike webhook handler, or the dashboard's Stop run button. Every later check() for that run returns { blocked: true, blockReason: 'run_stopped' }.

const stopped = await guard.stopRun(runId, { reason: 'spend spike' });
// { runId, status: 'stopped', stoppedNow, spendUsd, stoppedAt, stoppedReason, ... } | null

Stopping is idempotent (stoppedNow: false when it was already stopped). It returns null on a network error or an unknown run, and throws only NoburnAuthError. If this guard has seen a run stopped, check() keeps blocking it even while the noburn API is unreachable.

Profit per customer

Send what each end user pays you, and the project's Customers page shows revenue, AI cost and margin per customer, money-losing customers first. Use the exact endUserId you pass to check() / record() (it is not trimmed).

await guard.recordRevenue({
  endUserId: 'user_abc123',
  amountUsd: 49.0,             // negative for refunds
  occurredAt: '2026-10-01T09:30:00Z', // optional, defaults to now
  externalId: invoice.id,      // optional idempotency key (e.g. Stripe invoice id)
});

Like record(), it is fire-and-forget: queued and delivered in the background with retry. A repeated externalId is ignored server-side, so webhook retries never double-count. It never throws except NoburnAuthError, raised once a previous delivery was rejected for an invalid key. That error is thrown synchronously at the call, so void guard.recordRevenue(...) can't cause an unhandled rejection. Invalid input, and revenue the server rejects with a 4xx, are dropped and counted in droppedEventCount.

Before a short-lived process exits, call await guard.flush(), or await guard.flush({ timeoutMs: 5000 }) to cap the wait. With a timeout it returns without throwing, even if events are still queued. See the profit-per-customer guide for a Stripe invoice.paid webhook example.

Behavior…

Description from the npm listing.

  • llm
  • ai
  • budget
  • cost-control
  • openai
  • anthropic
  • langchain
  • vercel-ai-sdk
  • ai-sdk

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

@noburn/sdk weekly downloads on npm, last 90 days: 419 weekly downloads as of Dec 5, 2026, +13867% over 90 days.@noburn/sdkWeekly downloads on npm · Last 90 days419downloads / week+13867% over 90 days02004006008001K1.2K1.4K1.6KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@noburn/sdk weekly downloads on npm, last 90 days: 419 weekly downloads as of Dec 5, 2026, +13867% over 90 days.

7/30/90-day growth

@noburn/sdk weekly downloads growth on npm: +90.5% over 7 days, -61.2% over 30 days, +13867% over 90 days.@noburn/sdkWeekly downloads growth on npm419downloads / week now7-day growth+199 weekly downloads+90.5%30-day growth-661 weekly downloads-61.2%90-day growth+416 weekly downloads+13867%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@noburn/sdk weekly downloads growth on npm: +90.5% over 7 days, -61.2% over 30 days, +13867% over 90 days.

Ranking history

@noburn/sdk npm ranking history: currently #2304 (by weekly downloads).@noburn/sdknpm ranking · by weekly downloads · Last 90 days#2304current rank#1600#1800#2000#2200#2400#2600Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 11, 2026 – Dec 6, 2026 · 15 observations · Updated Dec 5, 2026pluginstats.com
@noburn/sdk npm ranking history: currently #2304 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 116, #4 (overall #2,304)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 14, #10 (overall #270)
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 (142)
Recent weekly downloads observations for @noburn/sdk
Date (UTC)Weekly downloadsChange vs. previous
419-12
431-36
467+16
451+52
399-18
417-3
420+200
220-37
257+41
216+3
213-2
215+70
145+33
112—

Similar npm AI SDKs plugins

All 20 @noburn/sdk 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/@noburn/sdk. First seen Nov 11, 2026; last successful collection Nov 23, 2026. See the methodology.