Budget Guardrails for LLM Spend
Stop surprise bills with project-level monthly budgets, threshold alerts, and hard-cap enforcement — now with real-time in-app and email notifications.
Observability tells you what happened. Governance tells you what should not happen. Until this release, AgentCost only solved the first half.
Budget Guardrails close the loop. Every project can now define a monthly USD budget, a list of alert thresholds (defaults: 50%, 80%, 100%), and one of three enforcement modes: off, warn, or hard cap. In warn mode, owners and project admins receive an in-app notification and an email the first time each threshold is crossed in a calendar month — deduplicated so a noisy ingestion batch can not trigger repeat alerts. In hard cap mode, the ingestion endpoint returns 429 once month-to-date spend reaches the budget, protecting you from runaway agents and broken loops in production.
Thresholds are evaluated on every event batch, against month-to-date cost in UTC. The projected spend (current spend + the incoming batch) is what gets compared, so a single large batch that would push you across the cap is rejected before it is persisted, not after. The deduplication is enforced at the database layer with a unique index on (project_id, period_key, threshold_percent), so a restarted worker or a retried batch can not double-alert.
On the dashboard side, the new Budget Guardrails card in Settings shows month-to-date spend, a utilization bar that changes color as you approach the cap, the configured thresholds as chips you can add or remove, and the enforcement mode as a single dropdown. The new bell icon in the top-right of every dashboard page surfaces budget alerts (and any future user-scoped notifications) with a live unread count.
If you have not set a budget yet, nothing changes — the feature is opt-in per project. To enable it, head to Settings → Budget Guardrails and pick the mode that fits your environment. Most teams start in warn mode for a billing cycle, then promote to hard cap once they trust the threshold values.