Mathematical $0 Overage Ceilings & AI Agent Velocity Circuit Breakers
Autonomous agents in Cursor, Claude, and LangChain can get caught in infinite loops. SpendGuard stops runaway sends before bills explode, with strict $0 default overages and smart hold queues.
Zero surprise bills on all subscription plans.
In-memory sliding token bucket evaluation.
Enqueues held sends for 1-click human review.
Isolate agent keys with daily dollar ceilings.
Live Velocity Circuit Breaker Simulator
Simulate what happens when an autonomous agent enters a runaway loop. Drag the velocity slider to test real-time SpendGuard trip mechanics.
NORMAL: Velocity within safe operational bounds (150 sends/hr)
All transactional emails are being dispatched with sub-150ms latency. Account balance remains protected with a default $0.00 ceiling.
{
"ok": true,
"status": 200,
"id": "msg_982b_accepted",
"spendGuard": {
"status": "normal",
"currentHourlyVelocity": 150,
"velocityCeiling": 300,
"budgetRemainingUsd": 19,
"overageFloor": "$0.00"
}
}Four Levels of Financial Defense
SpendGuard operates as an in-flight gateway filter, stopping runaway costs before any SMTP packet leaves our network.
Mathematical $0.00 Overage Floor
Unlike cloud providers that bill uncapped credit card overages, every SadaSend account defaults to a strict $0.00 overage ceiling. When your quota is reached, sends halt cleanly rather than generating surprise charges.
Hourly Velocity Circuit Breakers
If an autonomous background agent gets stuck in a while loop or recursive retry cascade, send velocity spikes within minutes. SpendGuard trips automatically if send rates exceed your configured threshold.
Dual Action Modes: Block vs. Hold
Choose between Fail-Fast Block (rejecting excess sends immediately with typed errors) or Human-in-the-Loop Hold (safely enqueuing messages in your dashboard for 1-click review without dropping data).
Per-Agent Scoped Key Limits
Give each autonomous agent (e.g. support bot, billing agent, onboarding assistant) its own scoped API key with dedicated daily budget ceilings and recipient allowlists.
Why Legacy Providers Expose You to Bill Shock
Traditional ESPs treat runaway loops as revenue opportunities. Compare overage policies below:
| Provider | Overage Rate Model | Default Hard Stop | Velocity Breaker | Human Hold Queue |
|---|---|---|---|---|
SendGrid (Twilio) | $1.95 - $2.50 / 1,000 sends | No (Uncapped monthly overage charges) | None (Processes all valid API calls) | None |
Postmark (ActiveCampaign) | $1.80 / 1,000 sends | No (Auto-billed at next billing cycle) | None | None |
Mailgun (Sinch) | $1.75 / 1,000 sends (Flex Tier) | No (Stealth overages on all payg plans) | None | None |
Amazon SES | $0.10 / 1,000 + data transfer fees | Account suspension if reputation drops | Hard rate limit per second only | None |
SadaSend SpendGuard | $0.00 Default (Optional pre-paid credits) | Yes (Strict $0.00 ceiling default) | Automated sliding-window trip with alerts | Native Human Hold Queue in /app/approvals |
Handling SpendGuard in Production
Standard SDK error handling patterns for catching circuit breaker trips and routing held sends.
import { SadaSend, SpendGuardError } from 'sadasend';
const sada = new SadaSend({
apiKey: process.env.AGENT_SCOPED_KEY!, // Scoped to max $5.00/day
});
async function dispatchAgentEmail(recipient: string, summary: string) {
try {
const result = await sada.emails.send({
from: 'ai-assistant@yourdomain.com',
to: recipient,
subject: 'Weekly Analysis Briefing',
html: `<p>${summary}</p>`,
headers: {
// Enforce idempotency key to prevent double sends
'Idempotency-Key': `briefing_${recipient}_${new Date().toISOString().slice(0, 10)}`,
},
});
if (result.status === 'held') {
console.log('SpendGuard: Send held in human review queue. Message ID:', result.id);
return { status: 'held', reviewUrl: 'https://app.sadasend.com/approvals' };
}
console.log('Dispatched successfully. Message ID:', result.id);
return { status: 'sent', id: result.id };
} catch (err) {
if (err instanceof SpendGuardError) {
// Velocity circuit breaker tripped or monthly budget ceiling reached
console.error('SpendGuard tripped:', err.code, err.message);
// Zero overages billed — alerts dispatched to Slack & developer email
return { status: 'blocked', reason: err.code };
}
throw err;
}
}Frequently Asked Questions
Build AI email agents without fearing surprise bills
Get 6,000 free emails every month with automatic SpendGuard protection, custom DKIM signing, and zero overage risk.