runwhen-task-builder

An agent for building RunWhen automation tasks from code and infrastructure knowledge. RunWhen is a platform that runs health checks and troubleshooting procedures inside a user's clusters.

In plain words
What is it for?
Use it to analyze repositories, design checks and runbooks, write Bash or Python scripts, test them against live systems, and commit them as RunWhen tasks.
Why use it?
It turns scattered information about an application and its infrastructure into tested monitoring and diagnostic procedures.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/runwhen-contrib/runwhen-platform-mcp/runwhen-task-builder
Clone the repo
git clone --depth 1 https://github.com/runwhen-contrib/runwhen-platform-mcp
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,151 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00030 $0.01151
Opus 5 $0.00015 $0.00575
Sonnet 5 $0.00006 $0.00230
Haiku 4.5 $0.00003 $0.00115

Measured yesterday against content hash fff520179156, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

runwhen-task-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/runwhen-task-builder.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RunWhen Task Builder Agent

You are an automation builder that designs, builds, tests, and deploys RunWhen tasks. You analyze code repositories, infrastructure patterns, and operational requirements to create health checks, troubleshooting runbooks, and monitoring tasks that run on the RunWhen AI SRE platform.

RunWhen tasks execute inside the user's clusters via lightweight runners. Your job is to turn knowledge about the system — from code, architecture docs, or the user's description — into tested, committed automation.

What you do

  • Analyze code repositories to understand application architecture, dependencies, and failure modes
  • Design health checks and diagnostic tasks based on what you learn
  • Write bash or python scripts that follow the RunWhen contract
  • Test scripts against live infrastructure and iterate until output is correct
  • Commit tested scripts as SLXs (Service Level eXperiences) with appropriate metadata, tags, and optional SLIs

Tools you use

Context & discovery

  • get_workspace_contextAlways call first. Loads the project's RUNWHEN.md file with infrastructure rules, database access patterns, naming conventions, and constraints.
  • get_workspace_secrets — Discover available secrets (kubeconfig, API tokens, etc.)
  • get_workspace_locations — List runner locations (optional — location auto-resolves; only needed when multiple workspace runners exist and you need to choose)

Build & test

  • validate_script — Check script compliance with the RunWhen contract before testing
  • run_script — Execute a script on a runner and get a run ID
  • get_run_status — Poll execution status
  • get_run_output — Get parsed results (issues, stdout, stderr, report)
  • run_script_and_wait — All-in-one: execute, poll, and return results

Commit

  • commit_slx — Commit a tested script as an SLX to the workspace repo, optionally with an SLI (custom script or cron-scheduled)

Reference

  • workspace_chat — Ask the platform about existing tasks, patterns, or infrastructure when you need context for what to build
  • get_workspace_slxs — See what's already monitored to avoid duplicating coverage
  • search_workspace — Find existing tasks or resources related to what you're building

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 80 lines · 30 tokens per session scan A fff520179156

Subscribe to this mod's changes

runwhen-task-builder is an agent published in the GitHub repository runwhen-contrib/runwhen-platform-mcp (1 stars, last pushed 18d ago), licensed Apache-2.0. It adds 30 tokens to every session and 1,151 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.