NORNR
Policy decisions, review and audit trail before agent spend moves.
PydanticAI / 8 minutes
Framework kitHow to add a governed budget lane to a PydanticAI agent.
Use NORNR when one typed tool path inside a PydanticAI agent can create paid usage, vendor behavior or another consequential external action.
1. What this pattern is for
This is not a full framework replacement. It is one control lane. The agent keeps its typed dependencies and tools, but the consequential path still asks NORNR whether it may clear under the active mandate.
2. Install what you need
pip install agentpay pydantic-ai
3. Create the wallet and typed dependencies
from agentpay import NornrDeps, NornrWallet, create_pydanticai_tools
wallet = NornrWallet.connect(
api_key="replace-with-nornr-api-key",
base_url="https://nornr.com",
)
deps = NornrDeps(wallet=wallet, default_budget_tags={"team": "research"})
tools = create_pydanticai_tools(wallet)
The kit keeps the PydanticAI surface typed, but routes spend control through the same NORNR packet model as every other framework lane.
4. What the lane should do
- ask NORNR before the consequential tool action runs
- continue immediately only when policy approves
- queue above threshold instead of improvising side-thread review
- leave one proof packet and finance-safe trail afterward
5. Why PydanticAI is a good fit
PydanticAI is strong when the team values typed dependencies, compact agent setup and explicit tool contracts. NORNR fits well there because the control decision also benefits from being explicit and typed rather than hidden inside a free-form chain.
6. What to open next
- Framework kits for the broader copy-paste kit surface
- Proof packet for the canonical governed output
- Finance close packet for the artifact finance should eventually receive