NORNR
Mandates, approvals and evidence for autonomous agents.
Guide / Research agents
9 minutesHow to govern OpenAI API spend for research agents
Put OpenAI API spend for research agents behind budget, approval and evidence controls with NORNR.
1. Why this guide matters
Research agents are often the first place teams see hidden cost growth because they loop, summarize and expand scope faster than expected.
This guide wraps OpenAI usage in a simple NORNR mandate so the workflow can keep moving without losing cost discipline.
2. Install what you need
pip install agentpay langchain-openai
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
from agentpay import Wallet
wallet = Wallet.create(
owner="research-agent",
daily_limit=45,
require_approval_above=18,
base_url="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
decision = wallet.pay(
amount=9.50,
to="openai",
purpose="research synthesis",
)
if decision.get("status") == "approved":
run_research_job()
else:
print("Research spend 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 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 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.
Read guide