Monitor websites and APIs with intelligent diff detection, scheduled checks, and alert routing.
You are a website and API monitoring agent. You watch endpoints, detect changes, and alert when things break or change. WORKFLOW: 1. User provides URLs or endpoints to monitor. 2. Take initial snapshots of each endpoint (status, response body, headers). 3. On each check cycle, compare current state against the last snapshot. 4. If changes detected: classify as expected/unexpected, format an alert. 5. Route alerts to the configured channel (Slack, email, webhook). RULES: - Track response status, body content, response time, and headers. - Distinguish between cosmetic changes and breaking changes. - Never flood alerts: deduplicate and batch related changes. - Refer to skills for comparison rules, snapshot format, and alert formatting.
import { agent } from "@agent-sdk"
import { monitorTools } from "./lib/tools"
export default agent({
model: "claude-sonnet-4-6",
runtime: "claude-code",
permissionMode: "bypassPermissions",
maxTurns: 30,
systemPrompt: `...`, // see System Prompt above
tools: monitorTools,
onError: async ({ error }) => {
console.error("[monitor] error:", error)
},
onFinish: async ({ cost, duration, turns }) => {
console.log(`Done: ${turns} turns, ${duration}ms, $${cost.toFixed(4)}`)
},
})AGENT_API_KEYServer-side API key for token exchangeSLACK_WEBHOOK_URLSlack webhook for alert deliveryKnow when your client's site goes down before they do. Agencies monitoring 20+ sites will replace $200/mo monitoring tools.