Use cases

The agent ran it.
Who decided?

16 production scenarios where a runtime decision stands between an autonomous action and a consequence you cannot reverse.

How it works1 gate · 3 outcomes

One decision point, before the action

Your agent calls a tool. Before the tool runs, one gate answers one question. The same question for a $5,000 refund and for a five-cent retry.

01 · Your code

The agent, the tools it calls, the model it talks to. You keep all of it.

02 · NullRun

Checks the tool, the projected cost, the rate and the policy. Returns one answer.

Allow

The action runs.

Ask

A human signs off first.

Block

The action does not run.

Your provider sees

The prompt and the completion. You call it directly — NullRun is not in that path.

NullRun sees

The tool name, the projected cost, the business impact. Not the prompt, not the completion.

Find your case16 cases

Find the case that matches your week

Every entry is a production scenario. Open the one that sounds like your week — each shows the flow, the decision, and what you keep.

Group 01 irreversible5 cases

Stop irreversible actions before they happen

Authorizations bound to the action payload. Operator approval refuses a re-check if the payload changes.

Case 01Human approval

A $5,000 refund should ask before it runs

For: Operators · Finance · Approvers

support agentrefund($5,000)runtime decisionamount > thresholdASKOK
Without NullRun

Refunds, deletions, external sends — some actions should never be one autonomous click away from irreversible.

With NullRun

The gate returns require approval. Finance or an approver reviews and signs off before the action runs.

Outcome

The agent finishes the $5,000 refund — but only after finance clicks Approve.

Case 02Sensitive fail-closed

The policy service is offline. The charge still must not happen

For: Payments · Deletions · External messages · Infrastructure changes

@protect@sensitive(money_outflow(...))runtime decisionALLOWBLOCKfail-closed
Without NullRun

During a control-plane outage, the policy service is briefly unavailable — and the agent keeps acting. A charge, a delete, or an external send goes out anyway.

With NullRun

Sensitive actions fail closed by design. If the runtime cannot make a decision, the function body does not run.

Outcome

A control-plane outage does not become an unauthorized charge, deletion, or send.

Case 03Hard budget cap

My agent just charged me $500 in 20 minutes

For: Solo dev · CLI tooling · Batch jobs

agent callruntime decisionprojected spend > capBLOCK
Without NullRun

A misbehaving loop keeps calling the model. Nothing stops it until the invoice arrives — the cap is discovered after the bill, not before the call.

With NullRun

Every consequential call passes through one runtime policy decision point. When projected spend crosses the cap, the decision returns block.

Outcome

The cap holds. The invoice is predictable.

Case 04Soft overdraft

A hard cap killed a 50-step workflow halfway through

For: Long-running agents · Multi-step workflows · Batch jobs

multi-step agentruntime decisionover cap, within overdraftALLOWsoft
Without NullRun

A hard cap kills a long-running workflow mid-chain at an arbitrary step — no credit for the work already done.

With NullRun

A workflow policy can run inside a bounded overdraft. The agent keeps going instead of stopping mid-run. The overdraft is counted against the organization, not reset per run.

Outcome

A 50-step agent that overshoots by a small amount still finishes its work.

Case 05Tool permissions

My agent can call tools it should never touch

For: Tool-using agents · MCP servers · Shell · Database · Code execution

agent plans toolfile.read · shell.exec · db.dropruntime decisionper tool nameALLOWfile.readBLOCKdb.drop
Without NullRun

The agent can reach shell, the database, or external senders — the systems you never wanted an autonomous process to touch.

With NullRun

Every intended tool name passes through the same runtime decision. Allowed tools proceed; disallowed tools are blocked before they execute.

Outcome

The agent stays autonomous, without reaching the systems you did not explicitly allow.

Group 02 boundary4 cases

Keep the policy boundary intact

One runtime decision point, whichever provider or org role is in play. Fallback, baselines and integration patterns stay inside it.

Case 06Provider fallback

My fallback provider became a budget escape hatch

For: Multi-vendor agents · Fallback routing

primary unavailablefallback providerOpenAI · Anthropic · Mistral · Geminisame decision
Without NullRun

The primary provider is unavailable — the fallback kicks in — and a fresh budget route appears alongside the old one.

With NullRun

Per-provider usage is normalized into the same workflow counter and the same policy decision point.

Outcome

Fallback changes the route, not the policy boundary.

Case 07Most-restrictive-wins

My workflow policy must not weaken the organization policy

For: Solo builders · Multiple agents · Platform teams

organizationbudget $100 · block db.dropworkflow Abudget $500most-restrictive-wins$100 · block
Without NullRun

A workflow policy accidentally weakens the organization baseline — local configuration overrides the global leash.

With NullRun

Organization and workflow policies combine with most-restrictive-wins. A workflow can add restrictions, not remove the baseline.

Outcome

Each workflow can become more specific without bypassing the organization baseline.

Case 08Without rewriting

I already have an agent. I need controls without rewriting it

For: Teams with existing LangGraph · CrewAI · OpenAI Agents setups

one init stepcommon frameworksinstrumentedyour function@protect
Without NullRun

Adding governance means rewriting the existing graph, crew, or runner — engineering cost before any value shows up.

With NullRun

One initialization step. Common frameworks are instrumented automatically, and one decorator marks the function you want governed. The existing graph does not change.

Outcome

Runtime control for the agent you already run.

Case 09No proxy of prompts

I need governance without putting customer prompts through another proxy

For: Privacy-sensitive apps · Regulated data · Custom provider routing

your applicationNULLRUNpolicy · accountingLLM providerdirect call
Without NullRun

A new governance gateway appears in the prompt data path — customer conversations now live in one more place.

With NullRun

Your application keeps calling the provider directly. On LLM calls NULLRUN receives the model, the token estimate and the policy signals — never the prompt, never the completion. A protected tool sends its arguments too, with sensitive values masked.

Outcome

Add runtime governance without creating another store for customer prompts or completions.

Group 03 runtime5 cases

Keep runtime reliable

Release-time confidence and incident-time controls. The runtime decision holds through deploys, retry loops and alert piles.

Case 10Scoped kill

One agent misbehaves at 2 a.m. — the only lever is killing everything

For: Platform teams · Multiple workflows · On-call

operator dashboardruntime decisionhalt one workflowhalt AB, C run
Without NullRun

One agent misbehaves at 2 a.m. — and the only available lever is killing every agent you run.

With NullRun

Operators halt one workflow through the control plane. The other workflows keep running, still under the same organization budget.

Outcome

The bad agent stops; the other workflows keep running.

Case 11Retry-safe accounting

The provider timed out. Retrying must not charge me twice

For: Background jobs · Serverless workers · Unstable networks

LLM callnetwork timeoutreplay trackingprior result
Without NullRun

The provider timed out before the client saw the response. A retry goes out — and now the budget is charged twice for the same call.

With NullRun

A replay is recognized as the same execution. The earlier result is returned and the duplicate tracking event does not double-count.

Outcome

A retry does not become a duplicate charge.

Case 12Storm + loop control

My retry loop is turning into an outage

For: Webhook agents · High-throughput workers · Retry-heavy pipelines

agent retry loopcall · call · callruntime decisionrate capBLOCK
Without NullRun

A misconfigured agent retries the same call over and over — the loop hammers the provider, the dashboard, and the on-call.

With NullRun

A per-workflow rate cap blocks the call once the limit is reached. Repeating the same tool call in a short window also raises an operator alert.

Outcome

The retry storm is stopped at the gate, and the loop is flagged to the operator.

Case 13Alert storm control

My agent loop fired 500 alerts. I needed one incident

For: SRE · On-call engineers

500 repeated eventsone alert rowsame titleone messageper 15 mincalls still tracked
Without NullRun

One runaway workflow fires the same block event hundreds of times — five hundredpages, one real problem.

With NullRun

A repeated event updates the same alert record instead of adding another, and channel delivery is rate limited to one message per detector every 15 minutes. Nothing is dropped: every call is still tracked and costed.

Outcome

One incident in the alert list.

Case 14Policy as written

I changed a policy. Will production behave differently?

For: CI pipelines · Pre-production · Policy reviews

your policytool · rate · budgetthe gateno model, no promptallow · ask · blockone endpoint, in CI too
Without NullRun

A policy change sits in a pull request — but no one knows what the runtime will do differently in production.

With NullRun

Rules are evaluated, not language. A tool block, a rate cap, a budget cap and an approval rule are read exactly as written. No model is asked to interpret them, and nothing in the decision depends on a prompt.

Outcome

Your policy runs as written — and you can assert it in CI against the same endpoint production uses.

Group 04 evidence2 cases

Explain and prove decisions

After the action runs, the same runtime decision point leaves a record you can audit, reason about and export. Customer prompts stay out of it.

Case 15Decision history

What changed between two decisions on the same action?

For: Platform engineers · SRE · Compliance

yesterday's rowdigest Atoday's rowdigest A or Bsame digestpolicy heldnew digestpolicy moved
Without NullRun

The same agent, the same call, two different outcomes — yesterday and today. Was it the agent, or was it the policy?

With NullRun

A block or an approval writes an immutable, hash-chained audit row — and on Growth, Scale and Enterprise, so does an allowed call. Where a policy governed the decision, the row also carries the digest of that policy set — edit the policy and the digest changes, so two rows tell you which of the two moved.

Outcome

The same digest on both rows means the policy held, so the agent changed.

Case 16Decision evidence

I need decision evidence without exporting prompts

For: Compliance · Security review · Incident response

audit rowactor · action · outcomeexportCSV · JSONLno promptsnever stored
Without NullRun

Compliance asks for evidence of the decisions behind the agent's actions — and exporting the prompts isn't an option.

With NullRun

NullRun exports the audit trail as CSV or JSONL: decisions, actors, hashes and timestamps. Prompts and completions are not in it, because NullRun never stores them in the first place.

Outcome

Hand an auditor the decisions without handing over customer conversations.

Find out what your agent
spent last night.

One @protect decorator, one real API key, and the next LLM call goes through the decision point before it spends anything.

Step 1
Install the SDK
pip install nullrun
Step 2
Mint a key for your agent
NULLRUN_API_KEY=nr_live_…
Step 3
Wrap the function you want governed
@nullrun.protect
    Use cases — NullRun