Agent Platform Alert Configuration logo

Agent Platform Alert Configuration

OrganizationPopular
google
agent-platform-alert-configuration

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.

Overview

Publishergoogle
Repositoryskills
Skill nameagent-platform-alert-configuration
Stars
20.1K
Forks
1.6K
Bundled files
27
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 27 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by google on GitHub. Read the source before you install it.

Installation

Install the Agent Platform Alert Configuration AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/google/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/cloud/agent-platform-alert-configuration .claude/skills/agent-platform-alert-configuration
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Agent Platform Alert Configuration in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Agent Platform Alert Configuration on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Agent Platform Alert Configuration is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Agent Platform Alert Configuration

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

Before executing any python script in this skill you MUST install the required dependencies in your environment. Run this command first:

bash
pip install -r scripts/requirements.txt

3. Input Assumptions

  • Explicit Project Adherence: You must ONLY configure alerts, query telemetry, or interact with the Google Cloud Project(s) explicitly provided by the user in the prompt. Do NOT assume or use other projects from your environment or history unless the user explicitly directs you to do so.
  • Sequential File Transformations: If the user explicitly asks to copy a file and then modify it, you MUST perform these actions sequentially (copy first, then modify) rather than writing the final content directly.

4. Execution Steps

  1. Mandatory Prerequisite Execution Protocol (SEQUENTIAL): Before generating or writing ANY configuration, you MUST execute these steps in order:

    1. Step 1: Streamlined Discovery (Mandatory): Run gather_agent_info.py to automatically identify agent runtime, verify telemetry, metric scopes, linked datasets, and more. This script covers most of the manual verifications listed in subsequent steps.
      • Command: python3 scripts/gather_agent_info.py --project-id {project_id} --agent-name {agent_name}
      • Note: If this script fails, returns partial data, or doesn't produce everything you need, you MUST satisfy requirements by running the manual fallback steps listed in Step 2 and then perform Step 3 below. If Step 1 succeeds and provides all info, SKIP to Step 3 (Pre-existing Policies Verification).
    2. Step 2: Metric Scope Verification (Fallback): Run this ONLY if Step 1 failed to determine the metric scope.
      • Action A (CLI): Run gcloud beta monitoring metrics-scopes list projects/{project_id}. If a scoping project is returned, you MUST deploy policies there.
      • Action B (Code Scan): Search Terraform configurations for google_monitoring_monitored_project resources to extract the scoping project.
      • Action C (Fallback): If ambiguous, ASK the user: "Are you using a multi-project Cloud Monitoring Metric Scope? If so, what is the scoping project ID?"
    3. Step 3: Pre-existing Policies Verification: Avoid duplicates.
      • Action: Scan the target directory to see if aggregated policies already exist targeting the same metrics (grouped by reasoning_engine_id or gen_ai_agent_name). Use scan_duplicates.py to verify.
  2. Alert Policy Type Resource Files: You MUST list and read files under references/ with names ending in _alert_policies.md to learn how to configure alert policies based on type. By default you MUST configure all of the following alert types UNLESS the user requests to generate explicit alert policies and/or types. Follow their tables of content to help you find the reference sections you need to read:

5. Outputs & Formats

  • Always configure the supported alerting policies for the target agent:

    • For Reliability Monitoring: You MUST configure exactly five alerting policies:
      1. Latency (anomaly monitoring)
      2. Error Rate - Fast Burn SLO (1-Hour Window)
      3. Error Rate - Slow Burn SLO (3-Day Window)
      4. Model Call Error Rate (SQL-based Observability Analytics Alerting)
      5. Tool Call Error Rate (SQL-based Observability Analytics Alerting)
    • For Quality Monitoring: You MUST configure exactly three alerting policies (Requires Vertex AI Online Monitors):
      1. Final Response Quality
      2. Tool Use Quality
      3. Hallucination
    • For Cost Monitoring: You MUST configure exactly one cost alerting policy:
      1. Rapid Token Burn Rate (anomaly monitoring)
    • For Safety Monitoring: You MUST configure exactly one safety alerting policy:
      1. High Model Armor Safety Policy Trigger Rate (SQL-based Observability Analytics Alerting)
    • For Security Monitoring: You MUST configure exactly one security alerting policy:
      1. High IAM Permission Denied Trigger Rate (SQL-based Observability Analytics Alerting)
  • Terraform Only: Write the generated observability configuration ONLY as Terraform (.tf) files (such as alerts.tf, variables.tf).

    • You ONLY need to install Terraform if you're asked to deploy the alerts AND there is no valid Terraform install. SQL-based alerting using condition_sql requires the provider version >= 6.0.0 (or late 5.x versions supporting the feature).
    • If you are NOT asked to deploy the alerts you do not need to install terraform.
  • Dynamic Multi-Resource Alerting (No Single-Resource Pinning): You MUST NOT hardcode specific agent IDs or resource name filters (for example, {gen_ai_agent_name="{agent_name}"} or metric.labels.agent_resource_name="{agent_name}") in alerting conditions unless explicitly requested (for example, "ONLY for this agent"). Merely mentioning a specific agent name or ID in the request does NOT constitute an explicit request to pin/filter; you MUST still default to dynamic grouping to cover all agents. To cover all active agents in the project dynamically:

    Good Example (PromQL Grouping):

    promql
    sum(rate(workload_googleapis_com:gen_ai_invoke_agent_duration_count{monitored_resource="generic_node"}[5m])) by (gen_ai_agent_name)

    Bad Example (PromQL Hardcoded Filter):

    promql
    sum(rate(workload_googleapis_com:gen_ai_invoke_agent_duration_count{monitored_resource="generic_node", gen_ai_agent_name="support-bot"}[5m]))
    • For Reliability Metrics using PromQL: ALWAYS use grouping aggregations. Group by gen_ai_agent_name (for example, by (gen_ai_agent_name)). Avoid filtering to a single ID/Name unless requested.
    • For Quality Metrics using Standard Threshold Filters: Omit the agent_resource_name filter entirely. Configure the condition filter to only target the monitored resource type (aiplatform.googleapis.com/OnlineEvaluator) and metric type (aiplatform.googleapis.com/online_evaluator/scores) globally for the project.

    Good Example (SQL Grouping):

    sql
    SELECT
      JSON_VALUE(resource.attributes, '$."cloud.resource_id"') as agent_id,
      ...
    FROM ...
    GROUP BY agent_id

    Bad Example (SQL Hardcoded Filter):

    sql
    SELECT ...
    FROM ...
    WHERE JSON_VALUE(resource.attributes, '$."cloud.resource_id"') = 'support-bot'
    • For Downstream Calls using SQL: Omit the ENDS_WITH filter targeting a specific agent name. Instead, extract the agent identifier (for example, JSON_VALUE(resource.attributes, '$."cloud.resource_id"')) and add it to the GROUP BY clause alongside the model or tool name.
  • Directory Inference: Prefer the path explicitly provided by the user (if any). Otherwise, deploy configuration files to target Terraform or SRE folders (such as monitoring/, ops/, sre/). Use tools to locate where alert policies or state pointers exist in the project, rather than blindly writing to the root.

  • Notification Channels: By default, never configure any notification channels without user input. If the user explicitly provides a notification channel in their prompt, configure the alerts to use it. If no notification channel is provided, you MUST explicitly ask the user in your final response if they would like to configure notification channels. This is a mandatory question and you MUST NOT omit it from your response. IMPORTANT Do NOT make assumptions about notification channels. If you search the codebase for a notification channel you must ALWAYS confirm with the user before using it.

  • Plain English Response: You MUST include a plain English explanation for what the alerts do in your response. This must explain in plain English what the alert measures, how the algorithm works, and what a trigger indicates.

6. Output Verification

  • Background Task Cleanup: You MUST verify the status of all background tasks that you spawn. Before completing your execution and returning your final response, you MUST terminate or kill any active or hanging background tasks (using the manage_task tool with action kill).
  • Validate Configuration: Run the Config Linting tool to make sure all the output files are written with the correct grammar and structure. See details about the tool in the Tooling Scripts section below.

Tooling Scripts

Use the following scripts to discover agents, gather configuration details, resolve duplicates, and validate configs:

  1. Agent Information Gathering: Streamlines discovery, environment auditing (Metric Scopes, BQ Datasets, Notification Channels), table derivations (Log & Trace), and Online Evaluator verifications.
    • Command: python3 scripts/gather_agent_info.py --project-id {project_id} --agent-name {agent_name}
  2. Duplicate Verification & Merge: Verifies pre-existing alerts in the target folder to ensure changes are merged in-place rather than appended:
    • Command: python3 scripts/scan_duplicates.py {target_tf_dir} --engine-var '${var.gen_ai_agent_name}'
  3. Config Linting: Validates PromQL grammar, matching engine labels, and HCL structure:
    • Command: python3 scripts/lint_syntax.py {path_to_tf_file}
    • Self-Correction Loop: If validation fails (exits non-zero or outputs errors), you MUST read the command output, locate the line/file containing the lint error, analyze the PromQL syntax or Terraform HCL issue, apply adjustments in-place, and re-run the lint_syntax.py validation. Repeat this loop until the validation script passes successfully.

Gotchas & Behavioral Corrections

  • Raw Error Boundaries: Explain that raw error counts or absolute failed request count boundaries do not scale under changing traffic throughput. Recommend ratio-based error rate alerts instead.
  • Safe Threshold Modulation E2E Validation: When verifying a dynamic metric threshold policy end-to-end, do NOT attempt to force real platform errors. Instead, deploy the alert policy with standard safe bounds (Z-score multiplier > 15), then temporarily update standard deviation Z-score limits to a negative value (for example, > -3) to trigger/verify the "Firing" state before reverting. Always get confirmation before taking this action proactively.
  • Expected Script Failures:
    • scan_duplicates.py exiting with code 1: Parse the JSON output for duplicate resource targets. Perform in-place upgrade edits, then re-check until it passes with 0.
    • Avoid Redundant Discovery Calls: If gather_agent_info.py successfully returns the Trace or Log table names (or writes them to variables file), do NOT redundantly call list_trace_scope_table_names.py or list_log_scope_table_names.py. These scripts are run internally by gather_agent_info.py and are provided as external Fallbacks only.
    • Script Execution Failures & Self-Correction: If the execution of utility scripts (such as gather_agent_info.py, check_telemetry.py, create_online_monitor.py, analyze_traffic.py, list_log_scope_table_names.py, or list_trace_scope_table_names.py) fails unexpectedly, you MUST read and inspect the stdout/stderr logs or error output. Analyze the error message and attempt to dynamically correct parameters and retry execution before escalating or falling back to manual plans. Consult the relevant domain-specific reference file for detailed troubleshooting steps for specific scripts.
  • Distribution Metric Aligner Constraint: Standard ALIGN_MEAN cannot be applied to DELTA distribution metrics like online_evaluator/scores. You MUST use percentile-based aligners (like ALIGN_PERCENTILE_50) to reduce the score distribution into a comparable numeric stream.
  • HCL Heredoc Interpolation: When referencing Terraform variables inside PromQL or SQL queries (which are defined as strings), you MUST use the ${var.variable_name} syntax. Bare references like var.variable_name will fail at deployment time.
  • Avoid Recursive Directory Operations: You MUST NOT run recursive listing or search commands (such as ls -R, find ., or raw recursive grep) from the repository root if it contains a very large number of files, as this will freeze your session. Always target specific subdirectories.

Supporting Links

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Agent Platform Alert Configuration AI skill do?

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)...

Why use Agent Platform Alert Configuration on TypingMind?

Because you install it once and use it with any model. Agent Platform Alert Configuration is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Agent Platform Alert Configuration in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/google/skills/tree/main/skills/cloud/agent-platform-alert-configuration. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Agent Platform Alert Configuration?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Agent Platform Alert Configuration?

As many as you like. As long as a model supports skills, you can use Agent Platform Alert Configuration with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Agent Platform Alert Configuration AI skill free?

Yes. It is published on GitHub by google under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇