# Agent Alert Configuration

Writes Terraform alerting policies for AI agent latency, errors, token use, and quality.

- Repository: https://github.com/google/skills (21764 stars)
- Category: DevOps
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add google/skills --skill agent-platform-alert-configuration -g -a claude-code -y`
Codex: `npx skills add google/skills --skill agent-platform-alert-configuration -g -a codex -y`
Cursor: `npx skills add google/skills --skill agent-platform-alert-configuration -g -a cursor -y`
Gemini CLI: `npx skills add google/skills --skill agent-platform-alert-configuration -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add google/skills`

## Description

Configures best-practice alerting policies for AI agents using OpenTelemetry (OTel) metrics, generating output as Terraform (.tf) configuration files. Use when analyzing, writing, or deploying alerting policies to monitor agent latency, error rates, token usage, and quality metrics. Don't use for standard infrastructure monitoring unrelated to AI agents, or when the agent is not instrumented with OpenTelemetry (for Reliability, Cost, Safety, Security alerts). NOTE: Reliability, Cost, Safety, and Security alerts use generic OTel metrics and work across runtimes (such as Cloud Run, Vertex AI). Quality alerts rely on Vertex AI Online Monitors and are strictly bound to Vertex AI deployments.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Agent Platform Alert Configuration

## Attribution

**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
MUST read [Usage Attribution](references/attribution.md). For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix `gcloud` with
`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:agent-platform-alert-configuration)"`
and append
`agent-skills/1.0 (skill:agent-platform-alert-configuration)`
to `User-Agent` headers.

## Critical Steps

### 1. Safety & Confirmation Tiers (CRITICAL)

Before executing any commands or writing configurations on behalf of the user,
you MUST adhere to the following safety tiers based on the action requested:

1.  **Tier R: Read-only (`check_telemetry.py` / `gather_agent_info.py`)**
    *   **Rule**: No confirmation needed. You may execute these scripts
        immediately to inspect telemetry status or gather agent configuration
        details.
2.  **Tier B: Billing & Resource Creation (`create_online_monitor.py` /
    provisioning)**
    *   **Rule**: **Explicit User Confirmation Required**. These actions incur
        additional billing charges and create cloud resources. The agent MUST
        ALWAYS warn the user explicitly about the potential extra billing costs
        of BOTH the Online Monitor (specifically mentioning **LLM evaluations**)
        and Telemetry (specifically mentioning **Cloud Trace/Cloud Logging
        export**). You MUST STOP and ask for explicit approval before proceeding
        with provisioning or providing setup commands.

### 2. Prerequisites & Dependencies

#### Agent Telemetry

*   **Disclaimer**: For Reliability, Cost, Safety, and Security alerts to
    function, the underlying agent MUST be instrumented to emit OpenTelemetry
    (OTel) metrics. If the agent does not emit these metrics, the alerting
    policies will have no data stream to evaluate.

#### Python Environment

The rest: https://github.com/google/skills/blob/HEAD/skills/cloud/agent-platform-alert-configuration/SKILL.md
