Agentic Workflows
Give your coding agents real production context — automate PR risk checks, health reports, dead-code cleanup, and rollback decisions with Hud runtime data.
An agentic workflow is a task you describe once — usually in plain Markdown — and a coding agent (Claude, Codex, Cursor) executes automatically whenever a defined event fires: a pull request opens, a deploy lands, a schedule ticks. Instead of a person prompting an AI by hand in their editor, the agent runs as part of your pipeline.
It's the same shift that CI/CD brought to building and deploying — versioned, governed, automatic — now applied to the work an AI agent does. GitHub calls this pattern Continuous AI; the principle holds on any runner.
A good agentic workflow has three traits:
- A clear trigger that maps to real work — a PR, a webhook, a cron, an issue label.
- A well-bounded task with specific inputs and a clear question to answer — not "improve the code," but "score this PR's production risk."
- A structured output that keeps a human in the loop — a draft PR, a scored comment, a report — rather than silent changes.
The workflows in this section connect the agent to the Hud MCP server, so it reasons over your real runtime data — invocation counts, latency percentiles, error rates, and call graphs — instead of inferring impact from source and diffs alone.
This section is a library of ready-to-run agentic workflows, plus the instructions to set them up in your own repos.
New to the Hud MCP server?Agentic workflows are built on top of the Hud MCP Server. If you've only used Hud inside your IDE so far, start there to understand how an agent queries your runtime data — then come back here to automate it.
How it works
Every workflow is the combination of two things:
- A use case — what the agent does (e.g. score a PR's blast radius, clean up dead code).
- A runner — where it executes (GitHub Actions, Cursor, a Claude routine, …).
Any use case can run on any runner. You pick one of each, copy a few files into your repo, set a secret, and ship.
USE CASE RUNNER RESULT
┌──────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Blast radius │ × │ GitHub Actions │ → │ PR comment with │
│ Weekly report│ │ gh-aw │ │ a 0–100 score, │
│ Dead code │ │ Cursor │ │ a Slack report, │
│ Rollback │ │ Claude routine │ │ a draft PR, … │
└──────────────┘ └──────────────────┘ └──────────────────┘
Every workflow authenticates to Hud with a single HUD_MCP_KEY secret, passed to npx -y hud-mcp@v2.
How this differs from Hud in your IDE
| Hud in your IDE / MCP | Agentic workflows | |
|---|---|---|
| Who triggers it | You, interactively, while coding | An event (PR, cron, deploy) or a one-line command |
| Where it runs | Your editor | CI, the cloud, or a scheduled runner |
| Human in the loop | Always | Optional — can run fully hands-off |
| Typical output | An answer in chat | A PR comment, Slack post, draft PR, or GitHub issue |
Same runtime data, same MCP. The difference is automation: workflows let the agent act without you prompting it each time.
Prerequisites
Before setting up any workflow, make sure you have:
- Instrumented services reporting to Hud. Workflows query your production runtime data, so your services must already have the Hud SDK installed and be sending data. See Node.js Installation or Python Installation.
- A Hud MCP key. Get one at app.hud.io → Settings → API keys. You'll set it as the
HUD_MCP_KEYsecret in your runner. - A model provider key for the agent — typically an
ANTHROPIC_API_KEYfrom console.anthropic.com, or AWS Bedrock credentials. See model authentication in the FAQ.
The recipe catalog
Four ready-made use cases ship today. Each is runner-agnostic — it uses environment variables and generic instructions, so you can pair it with any runner. See the full Recipe Catalog for env vars, outputs, and examples.
| Recipe | What it does |
|---|---|
| Blast radius | Scores the production blast radius of a PR (0–100) by mapping changed code to affected functions and endpoints, then posts a ranked report. |
| Weekly report | A multi-phase deep-insights report on production health — proposes fixes, attributes contributors, optionally opens a self-heal PR, and posts to Slack. |
| Dead-code cleanup | Finds functions with zero production invocations over a lookback window and opens a PR removing them (with an optional Jira ticket). |
| Rollback check | Compares current vs. previous release health per version and returns a structured verdict: ROLLBACK / INVESTIGATE / WARN / CLEAN. |
Use case × runner matrix
Each cell pairs a recipe with a runner. See example cells link to a fully worked, install-ready combo; the rest you assemble yourself by pairing the recipe prompt with the runner template (see Choosing a Runner).
| GitHub Actions | gh-aw | Cursor | Claude routine | |
|---|---|---|---|---|
| Blast radius | ✅ see example | mix & match | mix & match | mix & match |
| Weekly report | mix & match | ✅ see example | mix & match | mix & match |
| Dead-code cleanup | mix & match | mix & match | ✅ see example | mix & match |
| Rollback check | mix & match | mix & match | mix & match | ✅ see example |
Where everything lives
All recipes, runner templates, and fully worked examples are open source in the hud-agentic-workflows-recipes repository — the source of truth this documentation is based on. The repo is MIT-licensed and community-extensible.
Next steps
- Quick Start — set up your first workflow (PR blast-radius on GitHub Actions) in about 10 minutes.
- Choosing a Runner — compare runners and get step-by-step setup for each.
- Recipe Catalog — the four use cases in detail.
- FAQ & Best Practices — common questions, cost, security, scoping, model auth, and fixes.
Updated about 1 month ago

