# Agents That Watch Your Back

Configure agents to monitor your codebase and alert you when something needs attention. Broken builds, security issues, performance regressions — caught and reported before your users notice.

## You Shouldn't Find Out About Problems From Your Users

Right now, how do you know when something breaks? A Slack message from a customer. A spike in your error tracking. A teammate saying “hey, is the API down?”

By the time you know, your users already know. The damage is done.

Monitoring tools tell you something is wrong. They don't tell you why or how to fix it. You still need to open the codebase, trace the issue, write the fix, and push it through CI.

What if the agent that watches your code could also explain the problem and propose the fix?

### What usually happens

Signal

“Hey, is the API down?”

↓

monitoring dashboard

Latency spike detected on /api/users

No root cause. No fix. No code context.

↓

Engineer opens the repo, traces the issue, writes the patch, and pushes it through CI.

## Monitor. Detect. Notify. Fix.

1

### Configure what to watch

Tell the agent what matters to you. “Watch the CI pipeline on main.” “Check for dependency vulnerabilities weekly.” “Alert me if test coverage drops below 80%.”

2

### Agent monitors continuously or on schedule

The agent runs in the background — checking builds, scanning dependencies, running tests, watching for regressions. You choose the frequency.

3

### Something triggers an alert

A build fails on main. A critical CVE is found in a dependency. Test coverage dropped after last week's merge spree.

4

### You get notified with full context

Not just “something broke.” The alert includes: what happened, which files/services are affected, the root cause analysis, and a recommended fix.

5

### Optionally, the agent fixes it

For configured alert types, the agent can automatically open a PR with the fix. You review and merge — same workflow as any Agen task.

## What agents can monitor

### Set Alerts for What Matters to Your Team

### Build Health

- CI pipeline fails on main or protected branches
- Build time increases beyond threshold
- Flaky tests detected (pass/fail inconsistency)

### Security

- New CVEs in your dependency tree
- Outdated packages with known vulnerabilities
- License changes in dependencies

### Code Quality

- Test coverage drops below your threshold
- Linting violations introduced
- Dead code or unused imports accumulating

### Performance

- API response time regressions
- Bundle size increases beyond threshold
- Database query performance degradation

### Documentation

- Code changes without corresponding doc updates
- README out of sync with actual setup steps
- API docs that don't match current endpoints

## Alerts vs monitoring tools

### Monitoring Tells You It's Broken. Alerts Tell You How to Fix It.

| Capability | Traditional Monitoring (Datadog, PagerDuty, etc.) | Agen Alerts |
| --- | --- | --- |
| Detects issues | ✓ | ✓ |
| Notifies you | ✓ | ✓ |
| Explains root cause in code | ✗ — shows metrics, not code | ✓ — traces to specific files, commits, dependencies |
| Proposes a fix | ✗ | ✓ — recommended fix with diff |
| Opens a PR with the fix | ✗ | ✓ — optional auto-fix |
| Works across repos | Varies | ✓ — traces issues across multi-repo sessions |

Agen Alerts don't replace your monitoring stack — they sit on top of it. Datadog tells you latency spiked. Agen tells you the N+1 query in `users.ts` line 47 is the cause and opens a PR to fix it.

## Scheduled Monitoring with Alert Triggers

Alerts and Scheduled Agents work together naturally.

### Example setup

- Schedule: “Every night at 2 AM, scan all dependencies for vulnerabilities”
- Alert trigger: “If a critical or high severity CVE is found”
- Action: “Open a PR with the patch and notify me on Slack”
- Budget: “$5 per run”

You configure it once. Every night the agent scans, and you only hear about it when something needs your attention. If nothing is found, silence. No noise.

This is the difference between a monitoring dashboard you have to check and an agent that tells you when to act.

## How competitors handle alerts

### Nobody Else Does Agent-to-Human Alerts

| Tool | Proactive alerts? | Auto-fix from alert? |
| --- | --- | --- |
| Agen | ✓ — configurable monitors with smart notifications | ✓ — opens PR with fix |
| Cursor | ✗ | ✗ |
| Devin | ✗ | ✗ |
| GitHub Copilot | ✗ | ✗ |
| Claude Code | ✗ | ✗ |

This is a full column of ✗. No other AI coding tool has agent-to-human alerting. They're all reactive — you assign a task, they do it. Agen is the only one that proactively tells you when something needs attention.

## Don't Wait for Users to Report Bugs

Agents monitor. Agents alert. Agents fix.
