Silvanexumdocs
Concepts

Spend control

The primitives that keep agent spend under control — metered credits, daily caps, and bring-your-own-key with no token markup.

Visibility is table stakes; control is the point. Provider dashboards already show your tokens. Silvanexum gives you the levers to cap and govern what agents spend — so a looping or misfiring agent can't quietly burn the budget.

Metered credits, fail-closed

Spend runs through a prepaid credit balance on an append-only, double-entry ledger. A debit that would overdraw fails closed — the wallet can never go negative, so spend has a hard floor by construction.

Bring your own keys, no markup

You connect your own provider keys, so you pay OpenAI / Anthropic / Google directly at their rates. Silvanexum never marks up your tokens — we price the control plane, not the model usage.

A daily ceiling is just a budget

Want a hard daily limit? Create a budget with periodType: "daily" and enforcement: "block" — the same pre-flight 402 that governs every scope. (There's no separate per-wallet daily cap to configure.)

Budgets that cap and block

A budget is a spend cap over a scope (org, project, or agent) for a period — daily, weekly, monthly, rolling-30-day, or custom. With enforcement: "block", a run or mesh hop that would breach the cap is rejected server-side (402) before it spends — not just charted. "Spent" is computed from real run telemetry, so a budget and the cost attribution view never disagree.

await sx.budgets.create({
  name: "Support bot — monthly", scopeType: "agent", scopeId: agentId,
  periodType: "monthly", limitCredits: 5000, enforcement: "block",
});

See the TypeScript / Python SDK reference for the full sx.budgets + sx.spending surface.

Zero-code capture: the gateway

Point your OpenAI client's base URL at the Silvanexum gateway and use your Silvanexum API key — every call is metered on your own provider key (no markup) and counts toward your org budgets (the proxy has no per-agent scope), with no SDK rewrite:

import OpenAI from "openai";
const openai = new OpenAI({
  baseURL: sx.gateway.openaiBaseUrl(),                  // <api>/gateway/openai/v1
  apiKey: process.env.SILVANEXUM_API_KEY,
  defaultHeaders: { "x-silvanexum-trace": traceId },    // optional: stitch a multi-hop trace
});

Gateway v1 is OpenAI-compatible and non-streaming, and is enabled per deployment (GATEWAY_ENABLED). Streaming and Anthropic are on the roadmap.

Expanding. Finer-grained policies (per-tool / per-callee allow-lists and approval workflows for high-spend actions) build on top of budgets and are rolling out next. Budgets, caps, periods, and block-enforcement are live today.

On this page