How to Set Up Agent Alert Rules
Create alert rules that notify you when AI agents hit consecutive failures, duration limits, missed runs, or error rate thresholds, via email, Slack, or in-platform.
Agent alert rules let you tell TrustPager what "wrong" looks like for your AI agents, and what to do when it happens. There is no separate Alerts page any more (its old address takes you to Agent Hub at https://app.trustpager.com/ai-agents/agent-hub). You set up and read alerts by asking Claude, or through the API.
How it works
Rules run continuously in the background. You set them up once and TrustPager checks every agent run against them automatically. Fired alerts stay on record until someone acknowledges them.
The four rule types
When you create a rule via the API or MCP, you choose one of four types based on what you want to catch.
- Consecutive Failures: fires when an agent fails a certain number of times in a row without a successful run in between. Useful for catching agents that have broken silently and are retrying endlessly.
- Duration Exceeded: fires when a single agent run takes longer than a threshold (in seconds). Use this to catch runaway loops or agents waiting on a slow external service.
- No Run Since: fires when an agent that is supposed to run regularly has not run in a given number of hours. Catches missed cron schedules or suspended agents you forgot about.
- Error Rate: fires when the proportion of failed runs crosses a percentage within a rolling time window. More forgiving than Consecutive Failures, good for agents that occasionally fail but should not be failing most of the time.
Notification channels
Each rule has a notify_channel field that controls where the alert goes. The supported channels are:
- email: sends a notification email to the address set in
notify_target. - slack: posts a message to the Slack channel specified in
notify_target. Requires your Slack integration to be connected at https://app.trustpager.com/auto/integrations. - in-platform: records the alert so it is visible to anyone who asks Claude, or reads alerts through the API.
You can leave notify_channel blank, it defaults to Slack.
Scoping a rule to one agent
By default a rule applies to every agent in your workspace. Set the agent_name field to restrict the rule to a specific agent. Leave it empty to watch all agents.
Creating and managing rules
Alert rules are created and updated via the TrustPager API or the MCP server. The relevant tools are:
create_agent_alert_rule: create a new rule with your chosen type, threshold, channel, and target.update_agent_alert_rule: change the threshold, channel, target, or enable/disable an existing rule.list_agent_alert_rules: list all rules currently configured for your workspace.delete_agent_alert_rule: remove a rule permanently.list_agent_alerts: read fired alerts programmatically.acknowledge_agent_alert: mark an alert as reviewed.
Ask Claude to set rules up for you, for example: "Alert me if my daily report agent has not run in 26 hours." Exact names and fields are at https://docs.trustpager.com/reference.
Acknowledging alerts
Ask Claude "What agent alerts haven't I looked at?" to see the ones still waiting, then tell it to acknowledge any you have dealt with. Each alert records who acknowledged it and when, so you have an audit trail if something comes back later.
Good habit: Create a "No Run Since" rule for any scheduled agent that should run at least daily. It is the simplest way to catch a missed cron or a silently paused agent before it affects your clients.