How to Monitor AI Agents in Production So Nothing Fails Silently
📢
← Back to Blog

How to Monitor AI Agents in Production So Nothing Fails Silently

John Aspinall · · 14 min read

Three weeks ago, my competitor analysis agent ran every morning at 6am like clockwork. Green logs. Clean output. Zero errors. It looked perfect — except it had been pulling data from cached pages instead of live listings for eleven days straight. The competitive intelligence I was making pricing decisions on was nearly two weeks stale, and nothing in my system flagged it.

That cost me roughly $4,200 in mispriced inventory before I spotted it during a manual review.

This is the problem nobody talks about when they tell you to "just automate it." Building AI agents is well-documented. Testing them before deployment is common sense. But monitoring them after they're live — making sure they actually keep working the way they did on day one — is where most operators completely fall down. Including me, for longer than I'd like to admit.

I run over 30 AI agents across four businesses. After burning real money on silent failures, I built a monitoring system that catches problems in hours instead of weeks. This is exactly how it works.

What Is AI Agent Monitoring?

AI agent monitoring is the practice of continuously checking that your automated AI systems are producing correct, timely, and complete output — not just that they ran without crashing. It sits between pre-deployment testing (did this work before I shipped it?) and reactive troubleshooting (something broke, now what?). The goal is catching problems while they're small.

For operators, monitoring is not about server uptime or API latency dashboards. Those matter if you're running infrastructure. What matters to you is: did my agent produce the right output, on time, at a reasonable cost, and is the quality holding steady?

Traditional software monitoring asks "is it running?" AI agent monitoring asks "is it still good?"

The Three Ways AI Agents Fail in Production

Before you can monitor effectively, you need to understand what you're watching for. AI agents don't fail like normal software. They fail in three distinct ways, and only one of them is obvious.

1. Hard failures: the agent crashes or errors out. This is the easy one. The process dies, an API returns a 500, the model refuses the request. You get an error message. Most operators handle this fine because it's loud — your scheduled task didn't produce output, and you notice.

2. Silent failures: the agent runs but produces wrong output. This is the killer. The agent completes successfully. The logs say "done." The output file exists. But the content is wrong — hallucinated data, stale information, missing sections, or subtly degraded quality. My competitor analysis failure was this type. The agent "worked" every single day. It just stopped working correctly.

3. Quality drift: the output gradually degrades over time. This is the slow poison. A model update changes tone. A source website restructures slightly. Your business context evolves but the agent's instructions don't. Week by week, the output gets a little less useful, a little less accurate. No single day looks broken. But compare output from this week to three months ago, and you'd be embarrassed by the decline.

Most operators only monitor for type one. The operators who scale to 20, 30, 50+ agents are the ones who monitor for all three.

What to Monitor: The Five Signals That Matter

You don't need a complex monitoring stack. You need to watch five signals for every production agent:

1. Completion signal. Did the agent run? Did it finish? This is binary — either you got output or you didn't. For scheduled agents, this means checking that output appeared on time. A daily briefing that doesn't land by 7am is a failed run, even if it eventually completes at noon.

Set a deadline for every scheduled agent. If no output by that deadline, that's an alert.

2. Output shape. Does the output match the expected structure? If your agent produces a markdown report, does it have the right sections? If it fills a spreadsheet, are there the expected number of columns? If it returns JSON, does it parse cleanly?

This catches the most common silent failures. When an API changes its response format or a model starts hallucinating differently, the output shape breaks before the content quality does. Shape checks are cheap and catch 60% of silent failures in my experience.

Here's a real example. My daily intelligence briefing produces a markdown file with five H2 sections. My monitoring check is dead simple:

section_count=$(grep -c '^## ' "$output_file")
if [ "$section_count" -lt 5 ]; then
  echo "ALERT: Briefing has $section_count sections, expected 5+"
fi

That three-line check has caught more failures than any sophisticated monitoring I've built.

3. Output size. Is the output roughly the right length? A competitor analysis that usually produces 2,000 words but today produced 47 words is broken, even if those 47 words are technically correct. Conversely, an agent that usually produces a focused summary but today dumped 15,000 words probably went off the rails.

Set a floor and ceiling for expected output size. Flag anything outside the band.

4. Freshness signals. Does the output contain current information? This is what caught my competitor analysis failure — eventually. If your agent pulls external data, verify that the data is actually fresh. Check for today's date in time-sensitive output. Verify that URLs resolve. Confirm that data points change between runs (if they should).

today=$(date +%Y-%m-%d)
if ! grep -q "$today" "$output_file"; then
  echo "ALERT: Output does not reference today's date"
fi

5. Cost per run. How many tokens did this run consume? Cost is a proxy signal for behavior. An agent that usually costs $0.12 per run but today cost $1.80 probably entered a retry loop, processed more data than expected, or got stuck in a reasoning cycle. Sudden cost spikes almost always indicate something changed, and you want to know about it before your bill does.

How to Build a Monitoring Layer Without Enterprise Tools

You don't need Datadog or PagerDuty. Here's the monitoring stack I actually use for 30+ agents, and the total cost is approximately zero.

Step 1: Create an output log for every agent.

Every agent should write its output to a predictable location with a timestamp. I use a simple convention: outputs/{agent-name}/{YYYY-MM-DD}.md (or .json, or .csv, depending on the output type). This gives me a complete history of every run and makes comparison trivial.

Step 2: Write a validation script per agent.

Each agent gets a short validation script that checks the five signals above. These don't need to be complex. My longest one is 40 lines. Most are under 15. They check: does the file exist, is it the right size, does it have the expected structure, does it reference current data, and does the cost (logged separately) fall within bounds.

Step 3: Run a monitoring agent on a schedule.

This is the part most operators miss: use an AI agent to monitor your other AI agents. I have a Claude Code routine that runs twice daily — once in the morning after my morning briefing agents complete, and once in the evening after my end-of-day automations finish. It reads the validation results and sends me a summary.

The monitoring agent's prompt is simple:

Check the validation results in outputs/monitoring/today/.
For each agent that failed validation, explain what went wrong
and whether it needs immediate attention or can wait for the
weekly review. Send a push notification only if something
needs attention today.

When everything's green, I hear nothing. When something's wrong, I get a one-line notification on my phone: "Competitor analysis output is 90% smaller than usual — likely a data source issue."

Step 4: Build a weekly quality comparison.

Once a week, my management review includes a quality comparison: pull this week's output alongside the same day from four weeks ago. Are they comparable in depth, accuracy, and usefulness? This catches type-three drift that daily monitoring misses.

You can do this manually — it takes about 20 minutes for 30 agents if you sample rather than review every one. Or you can have an agent do the comparison and flag the ones that have drifted most. I do both: the agent flags candidates, and I review those specific ones.

The Alert Hierarchy: What Wakes You Up vs. What Waits

Not every monitoring signal deserves a phone notification at 6am. Getting the alert hierarchy right is the difference between a monitoring system you trust and one you mute.

I use three tiers:

Tier 1 — Immediate notification (phone ping). Reserved for agents that touch money, customers, or external systems. If my pricing agent fails validation, I need to know now. If my client follow-up agent produced garbled output, I need to know before the email goes out. Tier 1 is for agents where a few hours of bad output creates real damage.

Criteria: the agent either modifies live data, sends communications, or makes financial decisions.

Tier 2 — Daily digest. For agents where a single failed run is annoying but not damaging. My competitive analysis, market research, and internal reporting agents fall here. If one run fails, I catch it in my morning monitoring digest and fix it before the next run. No 6am phone buzz required.

Criteria: the agent produces internal intelligence or assets that only I or my team consume.

Tier 3 — Weekly review only. For agents where quality drift is the main risk, not acute failure. Content generation agents, template builders, and research compilations fall here. I review samples weekly during my agent management session.

Criteria: the agent produces first-draft output that always gets human review before use.

Assign every agent to a tier when you deploy it. Write it in the agent's documentation. Then respect the tiers — no promoting an agent to Tier 1 because you're anxious, and no demoting one to Tier 3 because the alerts are annoying. If the alerts are annoying, fix the underlying problem.

Five Common Monitoring Mistakes Operators Make

1. Only monitoring for crashes. If your monitoring consists of "did the cron job run?" you're catching maybe 30% of failures. Silent failures and quality drift are where the real money leaks.

2. Monitoring too much, alerting on everything. I made this mistake early. Every agent had a Tier 1 alert. Within a week, I was ignoring all of them. Alert fatigue is real. Be ruthless about what actually needs to wake you up.

3. No baseline for comparison. You can't detect drift if you don't know what "good" looks like. Before you deploy an agent, save three to five examples of excellent output. Those are your baseline. All quality comparisons reference them.

4. Checking output existence instead of output quality. "The file exists, therefore the agent worked" is the single most dangerous assumption in AI operations. Files exist. They can also be empty, corrupted, hallucinated, or stale. Check the content, not the container.

5. Not monitoring costs. A token cost spike is the earliest warning signal for most behavioral changes. If your agent suddenly costs 3x more than usual, something changed — and you want to investigate before the next 29 runs compound the cost.

A Real Monitoring Setup: My Daily Briefing Agent

Here's the complete monitoring configuration for one of my most important agents — the daily intelligence briefing that synthesizes news, competitor moves, and market signals every morning.

The agent runs at 5:30am. Expected output: a markdown file with five H2 sections, 800–1,500 words, referencing today's date, costing between $0.08 and $0.25 per run.

My validation checks:

  1. Existence: Output file exists at outputs/daily-briefing/{today}.md by 6:15am
  2. Structure: File contains at least 5 lines starting with ##
  3. Length: Word count between 600 and 2,500 (wider band than expected, to allow for light and heavy news days)
  4. Freshness: File contains today's date string at least twice
  5. Cost: Token cost (logged by the runner) between $0.05 and $0.40
  6. Novelty: File is not more than 40% identical to yesterday's output (catches the "same report every day" failure mode)

The novelty check is the most interesting one. I built a simple diff-ratio script:

yesterday="outputs/daily-briefing/$(date -d yesterday +%Y-%m-%d).md"
today_file="outputs/daily-briefing/$(date +%Y-%m-%d).md"

if [ -f "$yesterday" ] && [ -f "$today_file" ]; then
  similarity=$(diff "$yesterday" "$today_file" | grep -c '^[<>]')
  total_lines=$(wc -l < "$today_file")
  change_ratio=$(echo "scale=2; $similarity / $total_lines" | bc)
  if (( $(echo "$change_ratio < 0.30" | bc -l) )); then
    echo "ALERT: Today's briefing is suspiciously similar to yesterday's"
  fi
fi

This check alone has caught two failures where the agent was pulling from a cached data source instead of fresh feeds. Both times, the output looked completely normal on its own — it was only in comparison that the staleness became obvious.

The briefing is a Tier 1 agent because I make decisions based on it before 8am. A failed validation sends a push notification to my phone. A passed validation produces nothing — silence means good.

FAQ

How much time does monitoring add to my agent operations?

Building monitoring for a new agent takes 15–30 minutes — mostly writing the validation script. Once built, the monitoring runs automatically and only requires your attention when something fails. My total monitoring overhead across 30+ agents is about 10 minutes per day (reviewing the daily digest) plus 20 minutes per week (quality comparison sampling). That's roughly 90 minutes a week to ensure $12,000+ in monthly automation value actually works.

Can I use an AI agent to monitor my other AI agents?

Yes, and you should. I use a Claude Code routine specifically for this purpose. The key is making sure your monitoring agent is on a different failure path than the agents it monitors. If all your agents use the same model and the same API, your monitoring agent should at minimum run on a different schedule and have its own alerting channel. The monitor watching the monitors is a legitimate concern — I check the monitoring agent itself during my weekly review.

What's the minimum viable monitoring for a solo operator?

If you have fewer than five agents, you don't need automated monitoring. Just add one thing to your morning routine: open each agent's most recent output and spend 30 seconds confirming it looks right. That's manual monitoring, and it works fine at small scale. Once you hit five to ten agents, the output shape check and cost tracking are worth automating. Beyond ten, you need the full monitoring layer described here.

Should I monitor AI agents differently than traditional software?

Yes. Traditional software monitoring asks "is the process running and responsive?" AI agent monitoring asks "is the output correct and useful?" The failure modes are fundamentally different. Traditional software crashes loudly. AI agents fail quietly. Your monitoring must account for that by checking output quality, not just process health.

What's the biggest monitoring win you've had?

Catching a model-update-induced tone shift in my client communication agent. After an Anthropic model update, the agent started writing emails that were technically correct but noticeably more formal and less personable than my normal voice. My weekly quality comparison flagged it — the current output and the baseline read like they were written by different people. I updated the system prompt with stronger voice examples and the problem resolved in one iteration. Without that comparison, I might not have noticed for months, and my client communication would have slowly drifted away from my brand.

The Three Actions to Take This Week

If you're running AI agents in production without monitoring, here's what to do right now:

  1. Add output shape validation to your three most important agents. Write a five-line script for each one that checks whether the output has the expected structure, length, and freshness. This alone catches the majority of silent failures and takes about 30 minutes total.

  2. Assign every agent to an alert tier. Go through your agent list and classify each one: Tier 1 (immediate notification), Tier 2 (daily digest), or Tier 3 (weekly review). Write the tier in the agent's documentation. Then set up the actual alerting — even if "set up" means adding a check to your morning routine.

  3. Save baseline outputs. For each production agent, save three to five examples of output you consider excellent. Date them. Store them alongside the agent's configuration. These are what you compare against when you suspect quality drift, and they're invaluable when you need to debug a subtle decline.

Monitor your AI agents the way you'd monitor any employee you trust but verify. The goal isn't catching every failure in real time — it's making sure that when something goes wrong, you find out in hours, not weeks. The difference between those two timelines is usually measured in thousands of dollars.

Put AI to work inside the business you already run.

The Aspi OS Bootcamp is a 4-week live build: second brain, Claude Code workflows, Codex execution — on your real business. Starts Mon, Aug 3 · $1,500 · 12 seats.

Explore the bootcamp →

Not ready? Get the free newsletter — the AI workflows I actually ship, when they're worth your inbox.