Letting AI Agents Work on Production

Much of this website's engineering over the past six weeks - pages, media, layouts, even security fixes - was shipped by an AI agent with real production access. That is not recklessness. It is the payoff of a delivery system where GitHub and the cloud move in unison and every change, human or machine, passes the same gates.

Talk to an Engineer

There Is an Agent Working on This Site Right Now

The page you are reading was researched, written, laid out, illustrated, and published by an AI agent - one with SSH access to this site's containers, credentials for its deployment pipeline, and permission to change what you see in production. For most engineering leaders that sentence produces a small jolt of horror, and the horror is worth examining, because it is not really about the agent. It is about what the agent would find: the shared admin password, the deploy that only Dave knows how to run, the absence of any test that would notice a broken page.

The right question is not "should an AI touch production" - agents are already inside most delivery organizations, whether sanctioned or not. The right question is: what has to be true about your delivery system before an agent touching production is boring? The answer turns out to be the same list that makes a new human hire safe on day one. Agents did not create the requirement; they just made its absence impossible to ignore, because an agent works at a speed that turns every missing guardrail into an incident generator.

This page describes the system that makes it boring here: how code moves in unison between GitHub and the cloud, how the same discipline extends to data, and how classic SDLC controls map onto a worker that never sleeps, never gets tired, and occasionally gets things confidently wrong. And so the destination is clear before the mechanics: below is what one afternoon of it looks like on the scoreboard.

ahrefs.com - Site Audit - the same-day recrawl
Ahrefs Site Audit overview showing a health score of 85 rated Good with the trend chart jumping from a long flat low baseline to 85 on the most recent crawl

The trend bar on the right is the point of everything below. A client property sat flatlined in the teens for weeks; one agent working session applied the playbook this page describes, and the same day's recrawl reads 85. The full audit and the numbers behind it are further down.

Code in Unison: The Repository Is the Control Plane

The foundation is a rule so strict it sounds almost naive: nothing changes on a server by hand. Every environment this site runs - production, staging, ephemeral previews - is bound to a git branch, and the environment follows its branch the way a shadow follows a hand. Push to the staging branch and the staging environment rebuilds itself within minutes, automatically. Production changes through exactly one door: a pull request merged into the production branch. Nobody deploys; people and agents merge, and the GitOps automation does the deploying.

This binding is what "GitHub and your cloud moving in unison" means in practice, and it quietly solves the hardest problem of operating a live system: drift. When the running environment can only be what the repository says it is, there is no snowflake server whose configuration lives in someone's memory, no "who changed this and when" archaeology, and no deploy ritual that works only when performed by its inventor. The repository holds the entire truth, and the repository is versioned, reviewed, and revertible by design.

For agent work this is the load-bearing wall. An agent that can only reach production through a merge inherits every protection the merge carries: branch protection rules, required reviews, continuous integration, and a one-click revert. The agent does not need to be trusted with production. It needs to be trusted with a branch - which is a much smaller thing to trust anyone with.

Diagram of an AI agent at a terminal committing into a feature branch that passes through an identity gate pull request review by a human and an agent a verification check and a rollback anchor inside an SDLC controls frame before twin rails reach a production globe

The agent works at a workstation, like any engineer. Its commits ride a branch into the controls frame - identity at the door, a human and another agent reviewing the pull request, verification and a rollback anchor on the way out - and only what passes reaches production.

Two Planes of Change, One Discipline

Code is only half of what changes on a live platform. The other half - content, layouts, media, configuration, customer records - lives in a production database, where a change is live the instant it is saved, with no branch and no merge in sight. We wrote a full companion piece on that problem: when a data change is a production deployment, and the three gates that give data changes code-grade safety: a named snapshot before anything moves, changes through an API that can only touch what it names and keeps revisions, and verification of what actually rendered in a real browser.

An agent operating on a live site works both planes constantly, often in the same hour: a theme fix on the code plane, then a layout adjustment on the data plane, then a batch of media uploads with structured metadata. The controls differ by plane - merges and CI on one side, snapshots and revisioned API writes on the other - but the shape of the discipline is identical: no change without a way back, no change broader than its intent, and no change trusted until the result is observed. Keeping the two planes' rails parallel is what lets one operator move fluidly across both without ever leaving the guardrails.

What an Agent Session Actually Looks Like

Concretely, a working session on this site follows a loop that any release manager would recognize, compressed from days to minutes. It starts with read-only reconnaissance: the agent inspects the live system - real content, real logs, real rendered pages - before deciding anything. Code changes are tested against the staging environment first, on its container, before any commit. The commit lands on the staging branch, which redeploys staging automatically; the agent verifies the result as rendered, then opens a pull request toward production for a human to approve. Data changes ride the three gates from the companion piece. The terminal below is the whole ceremony, unabridged.

one agent working session, end to end
$ ssh staging "wp post list --post_type=page"
  # recon: read-only, against real data - decide with facts, not memory
$ scp theme-fix.php staging:/tmp/ && ssh staging "cp /tmp/theme-fix.php /var/www/..."
  # test on the staging container first - production containers are never touched by hand
$ git commit -m "fix: rebuild image alt rendering" && git push origin staging
  # staging branch = staging environment; the push is the deploy
$ gh workflow run regression.yml --ref staging && gh run watch --exit-status
✓ regression · critical-pages · 10/10 passed # rendered in a real browser, screenshots vs baseline
$ gh pr create --base production --head staging
  # production is a merge a human approves - not a mutation anyone performs

The SDLC Controls, Mapped to Agent Work

None of the controls above were invented for AI. They are the same software development lifecycle controls auditors have been asking about for twenty years - they just need to be real rather than aspirational, because an agent exercises them hundreds of times a week. Identity and authorization: the agent works under named, scoped credentials - its own SSH identity, its own application passwords minted per session - so every action in every log is attributable. Environment separation: hands-on testing happens only against staging; production is reachable exclusively through the merge door. Change approval: the production branch is protected, and a human review stands between the agent's work and the customer.

Testing gates: a browser-based regression suite with screenshot baselines runs after every increment, on the theory that no operator - human or machine - gets to declare their own work correct. Rollback: code reverts with git, data restores from named snapshots, layout changes from API revisions. And audit: here agents quietly outperform people. Beyond the git history and API revision logs, every agent session leaves a complete transcript - every command run, every observation made, every decision and its reasoning - which is a level of change documentation no human operator has ever produced voluntarily. When the control question is "show us exactly what happened," the agent's answer is better than yours.

Guardrails Beat Good Intentions

The honest part: the gates exist because things went wrong, and they will again. In June, a batch edit on this site - automated, confident, plausible - adjusted headings across nine pages and silently rebuilt each page's layout geometry along the way, flattening the custom column widths on two of them. Every check that ran that day read the served HTML and pronounced the work clean; the damage only existed once a browser assembled the page, and a person spotted it before the tooling did. The screenshot-comparison suite that now gates every increment is a direct descendant of that afternoon.

That incident is the correct mental model for agent risk. Agents do not get tired, but they do get confidently wrong, and they are wrong at the same speed they are right. A delivery system built on trusting the operator's self-assessment will eventually be burned by any operator. A system that verifies rendered reality, keeps a way back, and bounds each change's blast radius does not need to care how the mistake was made - it catches the human's bad Friday deploy and the agent's overconfident batch edit with the same indifference. Guardrails are not a tax on velocity; they are what velocity is made of.

What This Buys: The Velocity, Measured

The payoff is not theoretical. In one recent seventy-two-hour stretch, this site shipped five substantial content pages, imported thirty-four client testimonials in a single gated batch, uploaded a series of custom diagrams with structured metadata, and re-pointed its navigation - dozens of production changes on a live business site, agent-executed, with the regression suite green after every increment. Over the six weeks this operating model has been running, the site's Ahrefs health score climbed from 18 to 96 while the pace of change went up, not down.

And the model transfers. The morning this page shipped, the same playbook was pointed at another property we operate - a busy Charlotte sports facility's site that had drifted, through months of ordinary neglect, to an Ahrefs health score of 13 with over nine hundred crawl errors. One agent session diagnosed the error families instead of the individual URLs, fixed the content lifecycle behind nearly all of them, and put the same gates in place. By the afternoon recrawl the score read 85. Same discipline, different codebase, one working day.

ahrefs.com - Site Audit - full overview, scroll inside the frame
Full Ahrefs Site Audit overview showing health score 85 with 25 errors 57 warnings and 95 notices HTTP status distribution dominated by success responses and AI content level distribution

The full audit behind the scorecard at the top of this page - scroll inside the frame for the error, status-code, and content breakdowns from the same recrawl.

The operating rule that makes it sustainable is almost embarrassingly simple: one task at a time, verified before the next begins. The agent does not get to batch ten changes and verify once; every increment passes the gates on its own. That cadence would feel bureaucratic to a human team. To an agent it costs minutes, and it means the blast radius of any single mistake is one increment - which is precisely the property that lets a human supervisor stay comfortable while the agent runs ahead.

When You Should Not Give an Agent the Keys

If deploying your application is a manual ritual - SSH in, pull, run three scripts in the right order - do not add an agent to that. If your team shares one admin login, if there is no automated check that would notice a broken page, if rolling back means restoring last night's backup and praying: fix those first. An agent dropped into that environment does not create the risk, but it compounds it, because it operates at a speed that finds every gap faster than your customers do - though not by much.

The encouraging part is that the prerequisite list is short, and none of it is AI infrastructure: branch-bound environments, scoped credentials, a regression gate, a rollback path. Every item pays for itself with an all-human team, which means preparing for agents is indistinguishable from simply operating well. Do it in that order - system first, then agent - and the day the agent arrives, nothing about your risk profile actually changes. That is the whole trick, and it is why the first sentence of this page is safe to publish.

Where This Fits in Our Practice

Array

The delivery practice this page belongs to, one layer at a time.

When a Data Change Is a Production Deployment

The data-plane companion: three gates for the changes that live in the database.

Preview Environments for Static Sites

Every branch of a static site gets its own URL, built and published by automation.

Preview Environments for Dynamic Sites

A running replica per branch, for systems with a server and a database behind them.

WordPress at a Million Visitors

The architecture side of operating a database-backed platform under real traffic.

SOC 2 Compliance for Your Website

The audit framework these controls produce evidence for, automatically.

"

Talk to an Expert

Connect with our diverse group of UDX experts that can help you implement successful DevOps practices within your organization.