1
The 7 Rules at a Glance
After this step: you have the complete guardrails cheat sheet
AI agents without guardrails are like employees with no training and a company credit card. Here are the 7 non-negotiable rules that keep your AI system stable, affordable, and useful.
- $10/Hour Spending Cap — Every task gets a cost estimate. Under $10 = run. Over $10 = founder approval
- Config Isolation — Changing Agent X? Touch ONLY Agent X. Mandatory diff before applying
- No Duplicate Cron Runs — Always check if a job is running before triggering another one
- External API Cost Guardrails — Explicit limits on every API request. Test mode = 10 records max
- Canonical Storage — One directory per agent. One source of truth. No exceptions
- Token Management (50% Rule) — At 50% context, stop. Summarize. Clear. Resume fresh
- Build-First Mindset — Before recommending any paid tool: "Can we build this for $0?"
"AI agents without guardrails are like employees with no training and a company credit card. Every rule here exists because something expensive went wrong."
2
Rule 1: The $10/Hour Spending Cap
After this step: you'll never wake up to a surprise $100 AI bill again
Multiple AI agents running concurrently on the most expensive model. Each session at full context costs $15–25. Stack four and you're burning $60–100/hour without realizing it.
Before This Rule
- Agents picked whatever model they wanted
- No visibility into per-task costs
- $100 surprise bills on a Tuesday
- Concurrent expensive sessions stacked silently
After This Rule
- Agents must justify model choice
- Every task has a cost estimate
- Worst case: $10 before someone checks in
- Concurrent usage is flagged and controlled
$10
Hard Cap Per Hour
across ALL agent sessions
$0
Data Collection Cost
bash scripts, not LLM calls
90%
Cost Reduction
after implementing this rule
💡
Implementation
Add to every agent's core instructions: "Before ANY task, calculate estimated cost. Under $10 = run. Over $10 = STOP and get approval. Data collection/scraping = always use bash scripts ($0). Analysis = LLM is OK."
3
Rule 2: Config Isolation
After this step: one "helpful" agent will never break your entire system again
Asked an agent to update one agent's config. It decided to "helpfully" update 4 other agents too. Normalized their models, cleaned up their tool bindings, fixed things that weren't broken. Result: complete system outage. Full git rollback to recover.
- Never change another agent's settings — while working on a different agent. Period
- Never "normalize" or "clean up" — other agents' settings. Even if they look wrong
- Mandatory pre-flight diff — before applying ANY config change. If any other agent shows changes → abort
- Prefer surgical edits — over full config replacements. Smaller surface area = less risk
- No "while I'm in here" changes — Flag issues, don't fix them. One change, one agent, one approval
⚠️
Real Incident Cost
One "helpful" change → five agents affected → complete system outage → full git rollback to recover. This rule is non-negotiable because the downside is catastrophic.
4
Rule 3: No Duplicate Cron Runs
After this step: you'll never waste money running the same job twice
Agent was debugging a failing job. To test its fix, it force-triggered the job — but the previous run was still executing. Same job running twice on the most expensive model. $18 instead of $10. $8 wasted for identical output.
CHECK
Is the job already running?
DIAGNOSE
If it failed — read logs first
💡
Pro Tip
Debugging does NOT mean re-running. Read logs and check status first. If a job ran within the last 5 minutes — stop and verify it actually needs re-running. Every duplicate run = wasted money for zero value.
5
Rule 4: External API Cost Guardrails
After this step: every API key is treated like the credit card it is
Asked an agent to research competitor ads. It scraped 25,437 records when we needed 2,000. Search terms too broad, limits set to default (unlimited). Cost: $19 instead of $1.50. Over 12x what it should have been.
$19
Actual Cost
from one unchecked API call
$1.50
Expected Cost
with proper limits set
10
Max Test Records
for any new query — always
- Explicit limits on EVERY request — max results, max pages, max records. Never leave at default
- Exploratory mode = 10 records — New query? New endpoint? Limit = 10. Prove it returns relevant data first
- $5 cap per session — No single agent session can spend more than $5 on external APIs without approval
- Pre-flight cost estimate — How many calls? Cost per call? Maximum possible spend if something goes wrong?
6
Rule 5: One Source of Truth
After this step: files never end up in the wrong directory again
Agents writing files to wrong directories. Agent A saves config to /workspace/agents/. Agent B reads from the correct path — file not found. References broke. Configs pointed to ghost files. Communication failed.
Without This Rule
- Files scattered across multiple directories
- Agent configs point to ghost files
- Inter-agent communication breaks silently
- Manual cleanup needed after every incident
With This Rule
- One home directory per agent — all files there
- All references resolve correctly
- Agents always find what they need
- Zero path-related incidents since implementation
📂
The Structure
Every agent's files live in: /agents/<agent-id>/ — definitions, memory, configs, everything. Before any file operation: if the path doesn't match the canonical structure → abort. Never rename or reorganize without explicit approval.
7
Rule 6: The 50% Rule
After this step: context bloat never degrades your agent quality again
AI sessions have a context limit. As the session fills, response quality degrades. At 100% context, the agent loses track of early instructions, hallucinates, and starts making expensive mistakes.
50%
Flag it — "Want me to summarize and clear?"
60%
Strongly recommend summary + fresh start
RESET
Save summary to memory, start clean
"A clean session with good context beats a bloated session with perfect history. Summarize aggressively, clear often, and never let context reach 80%."
8
Rule 7: Build-First Mindset
After this step: you stop paying for tools your AI team can build for free
Before recommending any paid tool, ask: "Can we build this with our AI team?" If it requires API access + automation and can be done in under a day of AI work — build it. Only buy complex platforms with years of engineering.
- API access + automation = BUILD IT — Your AI team can connect to APIs and automate workflows for $0
- Complex platform with years of engineering = BUY IT — Don't reinvent Shopify or Klaviyo
- Buildable in under a day = build it — The threshold is one day of focused AI work
- Always present the build option first — Before any SaaS subscription, investigate the free alternative
💡
Real Example
Competitive intelligence tools cost $250–$1,000/month. We built the same thing with bash scripts and AI analysis for $3–$13/month. That's a 95%+ cost reduction with comparable intelligence quality.
9
What Changed: Before vs After
After this step: you see the complete transformation these rules create
Implementing all 7 rules took our AI system from expensive chaos to a reliable, cost-effective operation. Here's the measurable impact.
$100
Daily Cost Before
uncontrolled agent spending
$10
Daily Cost After
with all 7 rules in place
0
System Outages
since implementing config isolation
Before All 7 Rules
- $100/day in surprise API costs
- Regular system outages from config errors
- Duplicate cron runs wasting money daily
- Files scattered, references broken
- Context bloat degrading agent quality
After All 7 Rules
- $10/day with predictable costs
- Zero system outages since implementation
- Every job verified before running
- Single source of truth, all references work
- Fresh context with full memory preserved
10
Implementation Checklist
Click each item as you complete it
Implement these in order. Each rule builds on the ones before it.
- Set $10/hour spending cap — Add cost estimation to every agent's core instructions
- Add config isolation rule — "Touch only the agent you're told to change"
- Add duplicate-run prevention — Status check required before any job trigger
- Set API cost limits — Explicit limits on every external API call, 10-record test mode
- Define canonical storage — One directory per agent, enforce in all agent instructions
- Add 50% context rule — Summarize and clear before sessions get too large
- Adopt build-first mindset — Check if AI team can build it before subscribing to any tool
- Test all rules under load — Run your agents for a full week and verify all rules hold
- Document your own incidents — Every rule you add should come from a real mistake
- Review and update monthly — Rules evolve as your system grows. Schedule monthly reviews
Want the Full AI Business System?
Join THE AI INCOME LAB community. Live training, new guides every week, and a complete AI team ready to deploy.
Join The Community →