NORNR
Mandates, approvals and evidence for autonomous agents.
Guide / Compute spend
9 minutesHow to govern compute spend in agent workflows
Govern compute spend in agent workflows so expensive jobs do not launch without budget and review rules.
1. Why this guide matters
Compute is one of the easiest places for an agent to create large cost swings fast. Spinning up a job looks simple from code and expensive from finance.
NORNR gives you a simple pre-launch decision gate before the compute job starts.
2. Install what you need
npm install @nornr/sdk
This guide uses the hosted NORNR path at https://nornr.com, so you can validate the decision flow without standing up the full local stack first.
3. Create the governed wallet
import { Wallet } from "@nornr/sdk";
const wallet = await Wallet.create({
owner: "compute-agent",
dailyLimit: 200,
requireApprovalAbove: 75,
baseUrl: "https://nornr.com",
});
This wallet is the mandate. It sets the budget and review threshold before the framework-specific workflow is allowed to continue.
4. Apply it in the workflow
const decision = await wallet.pay({
amount: 95,
to: "compute-cluster",
purpose: "launch training job",
});
if (decision.status === "approved") {
await launchComputeJob();
} else {
console.log("Compute launch held by policy.", decision);
}
The key pattern stays the same across frameworks: ask NORNR for a decision first, then let the expensive or externally billable step run only if policy says yes.
5. What to expect
- approved means the workflow can continue immediately inside its mandate.
- queued means the request crossed an approval threshold and should wait for review.
- rejected means policy did not allow the action to proceed.
That three-way split is what makes the pattern useful: low-risk work stays fast, higher-risk work becomes reviewable, and clearly out-of-policy work never leaves the workflow.
6. Where to go next
Related guides
Keep going from the same control problem.
These are the closest follow-up guides in the same part of the library.
How to govern OpenAI API spend for research agents
Put OpenAI API spend for research agents behind budget, approval and evidence controls with NORNR.
Read guide Procurement / 10 minutesHow to add budget controls to a procurement agent
Add budget controls to a procurement agent so vendor actions stay inside a defined mandate.
Read guide Multi-agent ops / 10 minutesHow to add approvals to a multi-agent ops workflow
Add approvals to a multi-agent ops workflow so coordinator agents can pause expensive or risky actions cleanly.
Read guide