OpenAI's guardrails don't control costs. Here's the gap.
OpenAI shipped guardrails in the Agents SDK last month. They validate behavior. They do not enforce spend. Here is the gap and how to close it.
TL;DR
- OpenAI shipped input, output, and tool-call guardrails in the Agents SDK. They inspect what goes in and out at runtime. They answer whether the agent did the right thing. That is not the question that generates a $47,000 AWS invoice.
- There is no budget_usd parameter. No on_exceed hook. No token accumulation across a task. No cost ceiling per agent function. That is out of scope. OpenAI is building orchestration and quality control. Budget enforcement is a different layer.
- Your pipeline can pass every guardrail check, keep clean output and approved tool calls, and still make 400 API calls because a retry loop hit an edge case at 2 AM.
- agentguard47 sits below the framework layer. One decorator per agent function, for example @guard(budget_usd=2.00, on_exceed=raise). Guardrails passed is not the same as budget intact.
OpenAI shipped guardrails in the Agents SDK last month.
Input guardrails. Output guardrails. Tool call guardrails. The API is clean. The docs are good. A lot of builders are excited.
I want to be clear: these are real. They solve real problems.
They just don't solve the one that costs you money.
What OpenAI's guardrails actually do
OpenAI's guardrails are validators. They inspect what goes into and out of your agents at runtime.
Input guardrail: run logic before the agent processes a message. Block it, redirect it, log it.
Output guardrail: run logic after the agent produces a response. Flag it, filter it, hold it.
Tool call guardrail: intercept a tool invocation before it fires. Approve or reject based on your rules.
These are behavior controls. They answer the question "did my agent do the right thing?"
That question matters. But it is not the question that generates a $47,000 AWS invoice.
The gap
OpenAI's guardrails have no concept of spend.
There is no budget_usd parameter. No on_exceed hook. No token accumulation across a task. No cost ceiling per agent function.
That is not an oversight. It is out of scope. OpenAI is building a framework for agent orchestration and quality control. Budget enforcement is a different layer.
The gap looks like this:
Your pipeline passes every guardrail check. The output is clean. The tool calls are approved. And your agent has now made 400 API calls because a retry loop hit an edge case at 2 AM and nobody was watching.
Guardrails passed. Budget destroyed.
What the cost enforcement layer looks like
I built agentguard47 to sit below the framework layer. One decorator per agent function:
from agentguard47 import guard @guard(budget_usd=2.00, on_exceed="raise") def run_analyzer(task): result = client.responses.create(...) return result
When the agent hits $2.00 in accumulated spend, it raises. You catch it. You decide what to do next.
No silent loops. No surprises at billing time. Each agent function has its own ceiling.
This works with OpenAI's Agents SDK. It works with LangChain. It works with a raw openai client call. The decorator does not care what is inside the function.
The stack you actually want
Use OpenAI's guardrails for what they do well: behavior validation, content filtering, tool approval logic.
Add agentguard47 for what they do not cover: spend enforcement per agent, hard stop on budget breach, cost accumulation tracking.
These are not competing tools. They are different layers. One asks "did the agent behave correctly?" The other asks "did the agent stay within budget?"
You need both questions answered.
Install
pip install agentguard47
Docs and examples: https://bmdpat.com/tools/agentguard
FAQ
What do OpenAI Agents SDK guardrails actually do?
They validate input, output, and tool calls. Behavior controls. They do not track spend.
What is missing for cost control?
No budget_usd, no on_exceed, no token accumulation across a task, no per-function cost ceiling.
What failure still gets through?
A retry loop at 2 AM that makes 400 API calls while every quality guardrail still passes.
Get the Local AI Field Kit
Four copy-ready tools now, then one evidence-backed Local AI Lab Note on Friday when there is something worth sharing.
Try the free agent run check firstGet the requested artifact now, then at most one evidence-backed Local AI Lab Note on Friday when there is something worth sharing. One-click unsubscribe. No sponsored placements. Privacy.
Patrick Hughes
I build BMD and publish measured AI runs, failure reports, and reusable checks. Nashville, Tennessee.
More writing
- 4 min
agent-sre on PyPI: what SRE for AI agents actually means
Microsoft just shipped agent-sre on PyPI. Seven packages: SLOs, error budgets, circuit breakers. Here is what it does, what it does not, and why solo builders still need agentguard47.
- 6 min
How to Close the AI Agent Cost Gap at the Call Site
The cost gap between what an AI agent could cost and what it does cost is 40%. You close it at the call site, not in a dashboard. Here is how.
- 8 min
Stop Runaway LLM Spend: AI Agent Cost Control (Python)
One bad loop and an AI agent burned $200 in minutes. AgentGuard is a Python SDK that enforces hard cost limits at runtime — here is how to ship it.
- 4 min
Missing AI agent cost data is not zero
A spend ledger that counts missing billing data as $0 hides exactly the unattended agent spend you built it to catch.
- 4 min
When JPMorgan's AI bill goes up, who controls it?
JPMorgan turned on AI for 250k people. The quiet line is that the usage racks up fees. Here is how to control the bill before it arrives.