
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@silvanexum/sdk
Advanced tools
Official TypeScript/JavaScript SDK for Silvanexum — the spend-control plane for AI agents. Meter, attribute, cap, and audit agent spend across a multi-agent mesh, on any model or rail. Types generated from the API's Zod contracts.
Official TypeScript/JavaScript SDK for Silvanexum — the spend-control plane for AI agents. Meter, attribute, cap, and audit what every agent spends across your whole agent-to-agent mesh, on any model or rail. Types are generated from the API's Zod contracts, so they never drift from the live API.
📚 Full docs: https://docs.silvanexum.com
npm install @silvanexum/sdk
# pnpm add @silvanexum/sdk · yarn add @silvanexum/sdk · bun add @silvanexum/sdk
Requires Node ≥ 20 (uses the built-in fetch). Ships dual ESM + CJS with
bundled types.
import { Silvanexum } from "@silvanexum/sdk";
const sx = new Silvanexum({ apiKey: process.env.SILVANEXUM_API_KEY });
// Cap runaway spend — a run or mesh hop that would breach the budget is
// rejected server-side (HTTP 402). "Spent" is computed from real run telemetry.
await sx.budgets.create({
name: "support-team",
scopeType: "agent",
scopeId: "agt_123",
periodType: "monthly",
limitCredits: 50_000,
enforcement: "block",
});
// Attribute cost across the mesh — which agent / project / model actually spent.
const rows = await sx.spending.summary({ groupBy: "agent" });
console.table(rows);
Point your OpenAI client's baseURL at the gateway and use your Silvanexum key.
Every call is metered on your own provider key and counts toward budgets — with
no change to your agent code:
import OpenAI from "openai";
const openai = new OpenAI({
baseURL: sx.gateway.openaiBaseUrl(),
apiKey: process.env.SILVANEXUM_API_KEY,
// pass a trace id to stitch a call into a multi-hop mesh graph:
defaultHeaders: { "x-silvanexum-trace": traceId },
});
| Resource | What it does |
|---|---|
sx.spending | Cost attribution — summary / trends / meshTrace (by agent, project, model, provider) |
sx.budgets | Spend caps with off / alert / block enforcement + live status |
sx.gateway | Zero-code OpenAI-compatible capture + usage |
sx.fleet | Cost, latency, drift, and alert observability |
sx.runs · sx.agents | Run agents; read signed, replayable traces |
sx.security | Hash-chained audit log + compliance export |
…plus marketplace, wallet, routing, connectors, team, and more. Full
reference: https://docs.silvanexum.com/docs/sdk-reference/typescript.
Every failure throws a typed SilvanexumError subclass:
import { RateLimitError, InsufficientCreditsError } from "@silvanexum/sdk";
try {
await sx.runs.create({ agentId: "agt_123", prompt: "…" });
} catch (err) {
if (err instanceof InsufficientCreditsError) {
// budget/credits exhausted (HTTP 402) — top up or raise the cap
} else if (err instanceof RateLimitError) {
// the client already retried with backoff; surface to the user
}
}
new Silvanexum({
apiKey: "sx_live_...", // or env SILVANEXUM_API_KEY
baseUrl: "https://api.silvanexum.com", // or env SILVANEXUM_BASE_URL
timeoutMs: 60_000,
maxRetries: 2, // retries 429 / 5xx / connection errors
});
Licensed Apache-2.0.
FAQs
Official TypeScript/JavaScript SDK for Silvanexum — the spend-control plane for AI agents. Meter, attribute, cap, and audit agent spend across a multi-agent mesh, on any model or rail. Types generated from the API's Zod contracts.
The npm package @silvanexum/sdk receives a total of 13 weekly downloads. As such, @silvanexum/sdk popularity was classified as not popular.
We found that @silvanexum/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.