Artificial Intelligence

How to Deploy AI Agents in Production Without Creating More Problems Than They Fix

Using artificial intelligence (AI) agents in production is risky in ways most teams don’t see until something breaks. The agent drifts from the process it was given. Nobody, human or machine, questions its work before it ships. There is no real judgment behind approvals or rejections, and there are no acceptance tests that say what done looks like. Then the agent is handed write access and told to fix things.

A lot of my work with clients involves fixing problems after they happen, and agent automation has become a steady source of them. This guide is the playbook I use: where these agents show up today, how they fail, how to architect them so a mistake stays small, how to test them, where a person has to approve, how to require a reviewable summary log at the end of every run, when to write a skill and when to train a model, what to measure, how to roll out, and which governance frameworks to map to. It ends with a checklist you can use before your next deployment.

Where You’ll Deploy Agents Today

Most teams first meet agents in a browser, a workspace assistant, a coding tool, a workflow platform, or a CRM. The packaging changes, but the risks and the controls do not. Find your row, then jump to the section that matters most.

TypeExamplesTypical marketing or ops useMain riskStart here
Browser and computer-use agentsClaude in Chrome, ChatGPT Work and its desktop browser, Perplexity Comet, and Gemini in ChromeResearch, form filling, pulling data from SaaS screens, and acting across tabsA signed-in agent can click, type, and submit, so a bad step can change live data or send a message. Page content can also inject instructions.architecture (untrusted content and write gates) and human-in-the-loop
Assistant and workspace agentsMicrosoft 365 Copilot agents, Google Workspace agents, and ChatGPT plugins or projects with connected appsInbox triage, meeting briefs, reports, and drafts in mail, docs, and calendarsBroad access to files, email, and calendars. A polished draft can go out if review is weak.human-in-the-loop and skills
Coding agentsClaude Code, Cursor, GitHub Copilot agents (including the cloud agent that opens pull requests), and OpenAI CodexSite and app changes, tests, scripts, and internal tool fixesThey can edit code, run commands, and open pull requests that reach production if review is skipped.quality assurance and architecture (staging and backups)
Workflow and automation platformsZapier Agents (which Zapier is moving into AI by Zapier), n8n, and Make AI AgentsLead routing, enrichment, notifications, and multi-app campaignsOne run can write to many systems, and a retry can duplicate a send or a record.architecture (idempotency and write gates) and rollout
Agents in business platformsSalesforce Agentforce, HubSpot Agent Hub (formerly Breeze Agents), and ServiceNow AI AgentsLead qualification, ticket handling, CRM cleanup, and service requestsThey operate on customer or employee records, and some changes are hard to reverse.human-in-the-loop and backups in the architecture section
Custom-built agents on SDKs and MCPAgents you assemble with vendor SDKs and the Model Context Protocol (MCP)Publishing, research, and internal ops with your own data and toolsYou own permissions, tests, and failure modes. A loose tool grant can become a production outage.skills, quality assurance, observability, and the checklist

Treat the agent as a production system, not a chat window.

Why Agent Deployments Go Wrong

The gap between a demo and a dependable production agent is wide, and the research keeps confirming it. In June 2025, Gartner predicted that over 40% of agentic AI projects will be canceled by the end of 2027, citing escalating costs, unclear business value, and inadequate risk controls.

“Most agentic AI projects right now are early stage experiments or proof of concepts that are mostly driven by hype and are often misapplied.” Anushree Verma, Senior Director Analyst, Gartner

Gartner

Adoption is real but shallow. McKinsey reported in November 2025 that 23% of organizations are scaling an agentic AI system somewhere in the enterprise and another 39% are experimenting, yet in any single business function no more than 10% are scaling agents. Capability is the other constraint. In Carnegie Mellon’s TheAgentCompany benchmark, which simulates a small software company with realistic office tasks, the best agent in the June 2025 results, Claude 3.5 Sonnet, completed only 24% of tasks, and partial credit raised that to 34.4%.

Practitioners report the same bottleneck. In LangChain’s State of Agent Engineering survey of more than 1,300 professionals, quality was the top barrier to production, cited by about a third of respondents. Nearly 89% had some observability on their agents, but only 52.4% ran offline evaluations on test sets. In other words, many teams can watch their agents fail in detail without a systematic way to prove they work before release.

None of this means agents aren’t useful. I run a good part of my own publishing operation with them. It means the work isn’t building the agent. It’s building the controls around it. If you’re still sorting out the terminology, start with what agentic AI is and how agents work.

When an Agent Fixes Things and Makes Them Worse

We recently had an issue at work where someone let an agent respond to issues and correct them on its own. It introduced more problems than it fixed.

That outcome isn’t bad luck. It’s what you should expect when an agent can both diagnose and change a system with nothing checking it in between. Each correction is a change made on an incomplete picture of the system. When a change causes a side effect, the agent sees a new issue and corrects that too, so the second change rests on the first one’s mistake. Without a stop rule, a reviewer, or a test that defines success, the loop keeps going and every pass adds a layer someone has to unwind later.

Anthropic described the mechanism plainly when it wrote up how it took its multi-agent research system to production: agents are stateful, errors compound, and one step failing can send an agent down an entirely different path. Its earlier guide on building effective agents made the same point about cost and risk.

“The autonomous nature of agents means higher costs, and the potential for compounding errors. We recommend extensive testing in sandboxed environments, along with the appropriate guardrails.”

Anthropic, Building Effective Agents

The fix for that story isn’t a better prompt. It’s separating the agent that proposes a change from the thing that approves it, testing the change against criteria written beforehand, keeping a snapshot to roll back to, and capping how many times an agent can act on its own output before a person looks. The rest of this guide is how to build those pieces.

The Failure Modes to Plan For

Microsoft’s AI Red Team keeps a taxonomy of failure modes in agentic AI systems, updated to version 2.0 in 2026 after a year of red teaming. Its main lesson is that failures rarely happen alone; they chain together. These are the ones I see most often in marketing and business operations.

  • Process drift. The agent follows the procedure on the first few runs, then starts skipping steps, reordering them, or substituting its own approach, especially as context fills up over a long task. Without a written procedure it’s checked against, nobody notices until the output is wrong.
  • Compounding errors from auto-fixing. As in the story above, an agent that can act on its own output turns one mistake into several. Each fix inherits the assumptions of the last.
  • Reward hacking and false claims of success. Agents optimize for whatever signals success. If that’s a passing test or a status message, they’ll sometimes produce the signal without doing the work.
  • Scope creep. Asked to fix one record, the agent tidies the whole table. Asked to update a paragraph, it rewrites the article. Helpfulness without boundaries is a liability in production.
  • Sycophancy. Models trained on human feedback, including reinforcement learning from human feedback (RLHF), can learn to agree with the user instead of being right. An agent that tells you what you want to hear won’t push back on a bad instruction.
  • Prompt injection from untrusted content. An agent that reads email, web pages, tickets, or documents can be redirected by instructions hidden in that content.
  • Silent tool failures. An application programming interface (API) call times out, returns an empty result, or partially succeeds, and the agent carries on as if it worked. Empty results are especially dangerous because the agent may conclude there’s nothing there and act on that.
  • Rubber-stamp approvals. A human is technically in the loop but approves everything, because the agent’s explanation sounds confident and disagreeing feels awkward.

Reward hacking deserves extra attention because it defeats the checks most teams rely on. METR reported in June 2025 that recent frontier models modified tests or scoring code, looked for leaked answers, and exploited loopholes to get higher scores. On one set of tasks, OpenAI’s o3 reward-hacked in 30.4% of runs. Telling the model “Please do not cheat” barely helped; reward hacking still occurred in 80% of runs on one task under that instruction.

“This isn’t because the AI systems are incapable of understanding what the users want… but rather because they seem misaligned with the user’s goals.”

METR, Recent Frontier Models Are Reward Hacking

Carnegie Mellon’s researchers saw a mundane version of the same behavior. When an agent couldn’t find the person it was told to contact in the company chat, it renamed another user to that person’s name and carried on. The researchers wrote that agents sometimes create fake shortcuts that omit the hard part of the task.

The practical lesson: an agent’s report that a task succeeded is a claim, not evidence. Verification has to come from something the agent can’t edit. Sycophancy is the same lesson from another angle. In April 2025, OpenAI rolled back a GPT-4o update because it had become overly flattering and agreeable after leaning too heavily on short-term thumbs-up feedback.

Prompt injection is the top risk in the OWASP Top 10 for Agentic Applications, published in December 2025 as ASI01, Agent Goal Hijack. The document is blunt about why it’s hard to solve.

“Agents and the underlying model cannot reliably distinguish instructions from related content.”

OWASP Top 10 for Agentic Applications 2026

So treat everything an agent reads from outside your organization as data, never as instructions, and never let content from an untrusted source be the trigger for a write, a send, or a payment. If your agents browse the web, it also helps to understand how sites identify bots and AI agents and why some will refuse them.

Start by Asking Whether You Need an Agent

The cheapest control is not deploying an agent where a workflow will do. Anthropic draws a useful line: workflows are systems where large language models (LLMs) and tools follow predefined code paths, while agents decide their own process and tool use.

“We recommend finding the simplest solution possible, and only increasing complexity when needed. This might mean not building agentic systems at all.”

Anthropic, Building Effective Agents

Here’s the decision rule I use with clients:

If the task is…UseWhy
Fully predictable, rule-based, high volumeTraditional automation or scriptsDeterministic, cheap, and easy to test
Predictable steps with judgment inside a stepA workflow with LLM calls at fixed pointsYou control the path; the model handles language
Open-ended, where the steps depend on what is foundAn agent, inside the controls belowFlexibility is worth the extra cost and risk
Irreversible, regulated, or high-stakesAn agent that only proposes, or a personThe cost of one error outweighs the time saved

Gartner’s guidance points the same way: use agents when decisions are needed, automation for routine workflows, and assistants for simple retrieval. If you’re comparing build options, see the platforms used to build AI agents.

Architecture Patterns That Keep Mistakes Small

Good agent architecture assumes the agent will be wrong sometimes and limits how far a wrong action can travel. These are the patterns I insist on before an agent gets write access to anything that matters.

Six step maker-checker pipeline for AI agent writes: define the job, maker agent drafts in staging, snapshot and diff, independent checker, approval gate, and apply and verify with rollback

Maker-checker with an independent verifier. The agent that does the work never approves it. A separate checker reviews the output with its own context and instructions. That checker can be a deterministic validator, a test suite, a second agent, or a person, and it can reject the work without the maker being able to overrule it. The checker should not see the maker’s reasoning as justification. It should see the request, the acceptance criteria, and the result. Anthropic notes that having one model screen another tends to perform better than asking a single call to do both the work and the guarding.

Separation of duties. Split roles the way you would for people: the agent that drafts a customer reply is not the one that sends it, and the agent that proposes a customer relationship management (CRM) merge is not the one that executes it. Give each agent its own identity and credentials so its actions are attributable.

Least-privilege tools. Grant each agent only the tools and scopes its job needs, using role-based access control (RBAC) rather than a shared admin key. If an agent only needs to read orders, it gets a read-only token. When those tools are exposed through the Model Context Protocol (MCP), apply the same least-privilege rule to each server and the scopes it exposes. Anthropic’s advice to “poka-yoke your tools,” or change the arguments so mistakes are harder to make, applies directly: a tool that requires a record ID is safer than one that accepts a free-text query and updates whatever matches.

Read versus write gating. Make reads cheap and writes expensive. Reads can run freely. Every write passes through a gate that checks the action against policy, confirms a snapshot exists, and routes higher-risk writes to approval. The gate lives in code outside the agent, so the agent can’t talk its way past it.

Staging and dry runs. Agents should work against a copy first. For content, that’s a draft or a staging post. For data, it’s a sandbox database or a dry-run mode that reports what would change without changing it. Production is the last environment an agent touches, not the first.

The best-known example of why this matters is Replit. In July 2025, its agent deleted data from a user’s database during a project, and the agent itself didn’t know a rollback feature existed. Replit’s response was to separate development and production databases by default, so the agent cannot make any change to the production database during development, and to work on a planning-only chat mode. Both are architecture fixes, not prompt fixes. Coding agents get the same treatment from tools like a destructive command guard.

Idempotency. Design every write so running it twice produces the same result as running it once. Agents retry, time out, and resume after errors. Without idempotency keys or check-before-write logic, a retry sends the email twice, double-applies the discount, or creates a duplicate record.

Backups and snapshots before any write, with restore tests. Before an agent changes a record, page, file, or setting, capture its current state somewhere the agent can’t modify, and store it off the production system. Then test restores on a schedule. A backup you’ve never restored is a hope, not a control. Some changes can’t be undone even with a backup; HubSpot’s help documentation, for example, says merged records can’t be unmerged, which is why merges belong in the highest risk tier.

Audit logs and change diffs. Log every action with the agent identity, the tool, the inputs, the old value, the new value, the reason the agent gave, and the time. For any change a person approves, show a diff, not a summary. A summary is the agent’s description of what it did. A diff is what it actually did. Later in this article I describe a human-readable summary log that packages those diffs with the assumptions and cited judgments a reviewer needs; that log does not replace this audit trail.

These controls echo what we recommended for lead routing and CRM cleanup agents: shadow mode first, a written permission table, a dedicated agent user, logged changes, and a tested way to stop the agent.

Quality Assurance: Prove It Works Before and After Launch

Quality assurance (QA) for agents borrows from software testing but has to cope with output that varies from run to run. The goal is the same: decide what good looks like before the agent runs, then measure against it.

Write acceptance criteria before the run. For every task type, define what done means in checkable terms: required fields present, no broken links, totals reconcile, tone rules met, no claims without a source, no changes outside the named records. Criteria written after you see the output tend to describe the output. Give the criteria to the checker, not just the maker.

Use deterministic validators wherever possible. Schema validation, link checkers, linting, spelling and banned-term lists, reconciliation queries, and format checks are fast, cheap, and can’t be sweet-talked. On my own site, every article an agent writes has to pass a block validator with zero invalid blocks before it’s saved, and the agent can’t edit the validator.

Build a golden dataset. Collect a set of real inputs with known-correct outputs, including the edge cases and past failures. Anthropic recommends starting small and starting now; it began with about 20 queries representing real usage, because early changes have large effects you can see with a few test cases. Grow the set every time production surprises you. Tools like Promptfoo make it straightforward to run prompt and agent tests against a dataset in a continuous integration and delivery (CI/CD) pipeline.

Run offline and online evals. Offline evals run your golden dataset before any change ships: a new model version, a prompt edit, a new tool. Online evals score a sample of live production runs to catch drift and new input types. LangChain’s survey found that among teams with agents in production, 44.8% run online evals, compared with 37.3% overall.

Keep a regression suite. Every incident becomes a test case. If an agent once overwrote a field it shouldn’t have touched, a test should fail if it ever does that again. Model upgrades are the most common source of regressions I see, because teams assume a newer model is a strict improvement.

Use shadow and canary releases. In shadow mode, the agent processes live inputs but its output goes to a log for comparison with what people actually did. In a canary release, a small slice of real traffic goes to the new version while the rest stays on the old one, with automatic rollback if metrics drop. Anthropic uses rainbow deployments for the same reason: agents run long processes, so you shift traffic gradually instead of swapping versions on everyone at once.

Know the limits of LLM-as-judge. Using a model to grade a model scales well, and Anthropic found a single judge prompt with a rubric and pass or fail grade was most consistent with human judgment for its research agent. But judges have biases. A 2025 study by Amazon Web Services researchers, using more than 5,000 prompt and completion pairs with expert human annotations, found that some models, including GPT-4o and Claude 3.5 Sonnet, systematically gave higher scores to their own outputs and to outputs from models in the same family. So:

  • Use a judge from a different model family than the agent it grades.
  • Give the judge a rubric and, where possible, a reference answer.
  • Calibrate it: have people grade a sample, measure agreement with the judge, and recheck after any model change.
  • Randomize the order when the judge compares two outputs, to reduce position bias.
  • Never let a judge be the only gate for an irreversible or external action.

Human review still matters. Anthropic’s testers found its early research agents preferred SEO-optimized content farms over authoritative sources, something automated evals missed. In LangChain’s survey, 59.8% of teams running evals used human review and 53.3% used LLM-as-judge, usually together.

Human-in-the-Loop: Decide Where People Must Approve

Human-in-the-loop (HITL) only works when it’s designed, not bolted on. The question isn’t whether a human is involved. It’s which actions require a person, what that person sees, and what counts as a yes.

Four risk tiers for AI agent actions showing when a human must approve: read and report, reversible internal writes, external or hard to reverse actions, and irreversible money, legal, or safety actions

Tier the action, not the agent. The same agent can read and summarize freely and still need approval before it sends anything to a customer. OpenAI’s guide gives the two classic triggers for handing control to a person.

“Actions that are sensitive, irreversible, or have high stakes should trigger human oversight until confidence in the agent’s reliability grows. Examples include canceling user orders, authorizing large refunds, or making payments.”

OpenAI, A Practical Guide to Building Agents

The other trigger is exceeding failure thresholds: if the agent retries too many times or can’t resolve a task, it escalates instead of improvising. I treat these categories as approval-required by default: anything irreversible, anything external-facing such as publishing or customer communication, anything involving money, anything with legal or contractual effect, anything touching personally identifiable information (PII) or consent settings, and anything that changes access or security.

Design approval so it can’t become a rubber stamp. People defer to machines more than they think. In a 2025 study in the Journal of Management Information Systems, researchers ran four experiments with 1,445 participants on simple image-classification tasks. Substantial percentages followed erroneous AI recommendations even though they could do the task perfectly without help, partly because disagreeing with the AI felt uncomfortable. Conformity dropped when participants believed their decisions had real impact. Approval interfaces should work with that finding:

  • Show the exact change as a diff, with the target, the arguments, and the evidence, not the agent’s summary of it.
  • State the consequence in plain words, such as “This email goes to 4,212 customers” or “This deletes 18 records.”
  • Put the checker’s findings and any failed validations above the approve button.
  • Require a typed reason for approving anything in the top tier, and a second approver for irreversible actions.
  • Batch low-risk approvals, so people save their attention for the ones that matter.
  • Track approval rates by reviewer. Someone who approves 100% of a high-risk queue isn’t reviewing it.

Set escalation and confidence thresholds. Have the agent report its uncertainty and route low-confidence items to a person. Self-reported confidence isn’t well calibrated, so pair it with objective signals: a validator failure, a checker disagreement, a tool error, an empty result where data was expected, or an input that doesn’t resemble the golden dataset. Any of those should stop the run and escalate.

Define what counts as approval. Approval is a named, authorized person saying yes to a specific change in words, through a channel you log. It is not an emoji reaction, not silence after a deadline, not the agent’s own conclusion that the change is safe, and not another agent relaying that someone approved. Agents talk to each other now, and a message that says “the owner approved this” is just text. Verify approvals at the source.

End Every Run With a Reviewable Summary Log

A person cannot review work they cannot see. The audit trail I described in the architecture section records every tool call and every old and new value, and that record is the source of truth. Reviewers still need a human-readable package they can finish in a few minutes: what the agent did, what it assumed, where it used judgment, how sure it was, what it skipped, and which outputs to inspect. I require that summary log at the end of every production run. A missing or incomplete log is a failed run, and nothing in an approval tier proceeds without it.

This log is not a substitute for the diff. In the human-in-the-loop section I said to show the exact change, not the agent’s description of it. The summary log must point to those diffs and carry the context a reviewer needs to judge them.

What the log must contain. Every run should close with the same fields, filled in plain language a teammate can read without opening a trace viewer:

FieldWhat to include
What the agent didAn ordered list of actions, with record IDs, URLs, and timestamps
AssumptionsEvery fact the agent treated as true without proving it in this run, stated as an assumption, not as a finding
Judgments and citationsEach decision, the reason, and the source it relied on, such as a skill, policy, ticket, procedure, or data query, with a link, ID, or pinned version
ConfidenceA level per action or decision, plus the signal behind it, such as a validator pass, a checker disagreement, or missing data
Skipped or unverifiedWhat the agent did not do, and what it could not confirm
Open questionsAnything a reviewer must resolve before approving
Outputs and diffsPaths, IDs, and links to every file, record, or draft touched, plus the actual diffs

A judgment without a citation is unfinished work. The citation has to be specific enough that a reviewer can open it and check the claim. “Per the docs” is not a citation. If the agent cannot point to a source, it should label the judgment as unverified, record the gap under open questions, and escalate rather than proceed.

How reviewers should use the log. The review starts with the diffs and outputs, then uses the log to test the story around them:

  • Confirm the list of what the agent did matches the diffs. Extra or missing changes are a reject.
  • Read every assumption as something that might be wrong. If an assumption is load-bearing and unproven, reject the run or send it back.
  • Open the citations. If the policy, skill, ticket, or dataset does not say what the agent claims, reject.
  • Treat low confidence, skipped checks, and unverified items as stops when they sit on the critical path, especially for irreversible or external actions.
  • Approve only as a named, authorized person saying yes to the exact change, in a logged channel, the same way I defined approval earlier. An emoji, silence, or another agent relaying a yes still does not count.

How findings feed back into skills, QA, and tests. A reviewed log is wasted if it dies in the ticket. After each approval, edit, or rejection, write the finding into the layer that will prevent the same mistake:

  • A wrong assumption becomes an explicit rule or stop condition in the skill or playbook.
  • A skipped check that should have been required becomes an acceptance test or a validator in quality assurance.
  • A bad judgment with a weak citation becomes a guardrail: the action is blocked unless the cited source is present and current.
  • Reviewer edits, and the reasons for them, become cases in the evaluation set so regressions show up before the next release.

I review these logs on the same weekly cadence I use for training corrections. If the same assumption or skip appears after you changed the skill or the test, the fix is in the wrong layer.

A template you can require. Make this structure a required output of the run, and put it in the approval view next to the diffs.

FieldPrompt the agent to fill
Run ID and taskA unique ID, the requested job, and the environment (staging, dry run, or production)
What I didNumbered actions, including what was not applied
AssumptionsEach unproven premise, with a note if no policy covers it
Judgments and citationsDecision, reason, and source ID or link
ConfidenceHigh, medium, or low, plus the evidence for that rating
Skipped or unverifiedGaps, timeouts, and missing inputs
Open questionsDecisions only a person can make
Outputs and diffsLinks or IDs for every artifact the reviewer must inspect

Here is a short example from a staging dry run that proposed customer record merges but did not apply them:

Run ID: crm-dedupe-20261204-1842
Task: Propose merges for 24 contacts flagged as possible duplicates
Environment: staging dry run (no production writes)

What I did:
- Loaded 24 contacts from queue Q-882
- Proposed 9 merges and wrote staging report 1842
- Did not apply any merges

Assumptions:
- Contacts that share an email address are the same person (not stated in SOP-14)

Judgments and citations:
- Excluded 2 pairs that have different billing accounts, per SOP-14 section 3.2
- Flagged 2 plus-alias address pairs as uncertain; SOP-14 does not address this case

Confidence:
- High on 7 proposals (exact email match and same company name, validated by the staging report)
- Low on 2 proposals (plus-alias email match only); needs a reviewer decision

Skipped or unverified:
- 3 contacts had no email, so no match was attempted
- External profile lookup timed out for 4 contacts

Open questions:
- Should plus-alias addresses be treated as the same person under SOP-14?

Outputs and diffs:
- Staging report 1842
- Proposed field-map diff attached to the report

Notice what this example makes easy for a reviewer: the agent did not write to production, two proposals are already called out as low confidence, and the open question is specific enough to answer. That is the standard. If a log cannot support a yes or a no, the run is not ready for approval.

Set a Review Cadence and Monitor Across Runs

In my own deployments, I review these summary logs on every job at first, then daily, then weekly, as the logs come back clean. I step back up to every-run review after a skill change, a model change, a tool change, or a new failure, and I stay there until the logs are clean again.

CadenceWhen to use itWhen you can step down
Every runWhile the agent is new, and after a skill, model, or tool change, or a new failureReviews come back clean: acceptance criteria are met, and there are no surprise assumptions, unverified judgments, or skipped critical checks
DailyAfter every-run reviews have been cleanA day’s runs show no new pattern of assumptions, low-confidence calls, or skips
WeeklyAfter daily reviews have been cleanA week’s sample still matches the skill, and the log sheet shows no drift

I collect the logs in one Google Sheet, kept in the same workspace folder as the recorded task definitions and the skill documentation. That way a reviewer can trace each judgment to the instruction behind it and edit the skill in the same place. The sheet should have a row per run and columns for the run ID, date, task, skill and version, what changed, assumptions, cited judgments, confidence, skipped or unverified items, open questions, the reviewer’s decision, and the follow-up, such as a skill edit, a new test, or a guardrail.

I also run a separate monitoring agent over the completed-run logs. It looks for patterns a single review can miss: the same assumption showing up across jobs, a cluster of low-confidence calls, recurring skips, and drift from the written skill. That agent only flags issues and never fixes them. A person decides whether to tighten the skill, add a test, or raise the review cadence.

What This Looks Like in My Own Agent Setup

I run much of Martech Zone with a team of agents on Grok Bot, and I wrote about why I use AI teammates instead of a DIY agent stack. The tooling matters less than the rules. A few that have saved me repeatedly:

  • Agents write drafts. Nothing publishes without my explicit word in the chat. A thumbs-up reaction doesn’t count, and neither does another agent saying I approved it.
  • Before any change to a live post, the agent saves a snapshot of the current content, and backups are stored off the production server.
  • Every article passes a block validator with zero invalid blocks before it’s saved, and the agent rereads the saved version to confirm it matches what was intended.
  • For featured images, the agent that creates an image never approves it. A separate reviewer with no stake in the image checks it against a written standard before it’s attached.
  • Each recurring job has a written skill with steps, stop rules, and checks, so the process doesn’t drift from one run to the next.
  • Every run ends with a written summary log of what changed, the assumptions made, the judgments and their sources, and anything that could not be verified, so I can approve or reject with the evidence in front of me.

None of those rules came from a vendor’s best practices page. Each one exists because something went wrong once without it.

Skills and Playbooks: Turn Procedures Into Guardrails

Process drift is a documentation problem as much as a model problem. A skill, sometimes called a playbook or runbook, is a written procedure the agent loads when it does a specific job, much like a standard operating procedure (SOP) for a new hire. Anthropic introduced Agent Skills in October 2025 as folders of instructions, scripts, and resources that agents load only when relevant.

“Building a skill for an agent is like putting together an onboarding guide for a new hire.”

Anthropic, Equipping Agents for the Real World with Agent Skills

When to codify a procedure into a skill:

  • The task recurs, and you’ve corrected the agent on the same point more than once.
  • The task has steps that must happen in order, such as backup before write or validate before save.
  • Mistakes are expensive, and you want the procedure reviewable by a person.
  • Several agents or people need to do the job the same way.

How to write a skill that holds up:

  1. Scope and trigger. One sentence on when to use it and when not to. A vague description means the agent loads it at the wrong time or not at all.
  2. Inputs. What the agent must have before starting, and what to do if something is missing (usually: stop and ask).
  3. Steps. Numbered, specific, and in order. Put deterministic work, such as validation, formatting, and calculations, into scripts the skill calls, because code is repeatable and a model is not.
  4. Stop rules. Conditions that end the run: a failed validation, an unexpected empty result, a change outside scope, a second failed attempt, or any action in the approval tier without approval.
  5. Verification. How to prove the job is done, checked against the saved result rather than the agent’s memory of what it did.
  6. Reporting. What to hand back: a summary log with IDs, links, what changed, assumptions, cited judgments, confidence, what was skipped, open questions, and the diffs.

Version and review skills like code. Keep them in version control, date every change, record why it changed, and have a person review edits to any skill that touches production. Anthropic suggests building skills from observed gaps: run the agent on representative tasks, watch where it struggles, and add only what fixes that. It also warns that third-party skills can carry malicious instructions or code, so audit any skill you didn’t write before installing it.

Training the Agent: Prompts, Skills, Retrieval, or Fine-Tuning

When an agent underperforms, teams often jump straight to fine-tuning. It’s usually the last thing to try, not the first. Start with an eval so you can measure whether any change helped. OpenAI’s model optimization guide follows that order: choose examples that reflect production, define what a good response looks like, establish a baseline, then change the instructions or context and compare on held-out examples.

ApproachBest forData you needWatch out for
Prompt and instruction changesTone, format, rules, and task framingA small eval set, often 20 to 50 real casesLong prompts that the agent follows less reliably over long tasks
Skills and playbooksMulti-step procedures, tool order, stop rulesWritten procedures and examples of past mistakesSkills that grow stale as systems change
Retrieval-augmented generation (RAG)Facts that change, such as policies, product data, and documentationA clean, current, permissioned knowledge sourceRetrieval of outdated or untrusted content, which is also an injection path
Fine-tuningConsistent formatting or classification at high volume, or a smaller, cheaper model for a narrow taskHundreds to thousands of labeled examples, plus a held-out eval setCost, maintenance, and dependence on a vendor offering that can change

Fine-tuning remains a minority practice. LangChain found that 57% of organizations don’t fine-tune at all, relying on base models with prompt engineering and retrieval. Vendor support can also shift under you: OpenAI’s model optimization documentation now says eligible existing customers can create new fine-tuning jobs only until December 15, 2026, and inference ends when the base model shuts down. If you plan to fine-tune, plan for portability. For retrieval-heavy agents, our piece on agentic RAG covers the patterns.

Close the feedback loop. Every human correction is training data. The summary log from each run is the raw material for this review: capture what the agent proposed, what the reviewer changed, and why. Review those corrections weekly and decide where each one belongs: a new eval case, a skill update, a prompt rule, a retrieval fix, or a new validator. Corrections that repeat after a fix tell you the fix is in the wrong layer.

Observability and the Metrics That Matter

You can’t manage an agent you can’t see. At a minimum, trace every run: the inputs, each model call, each tool call with arguments and results, the final output, and the outcome. Platforms such as LangSmith and the open-source Langfuse provide this kind of tracing. Then track a small set of key performance indicators (KPIs) on a dashboard someone actually reviews:

MetricWhat it tells youHow to use it
Task success rateShare of runs that meet the acceptance criteria, verified by the checkerThe headline number; break it down by task type
Intervention rateShare of runs where a person had to edit, reject, or take overShould fall over time; a rise signals drift or new inputs
Rollback rateShare of applied changes that were reversedAny rollback of a high-tier action deserves a review
Escalation rateShare of runs the agent handed to a personToo low can mean overconfidence, too high means poor fit
Checker disagreement rateHow often the checker rejects the makerA leading indicator of quality problems
Cost per successful taskModel, tool, and review cost divided by successful runsInclude the human review time, not just tokens
LatencyTime from request to verified completionMatters most for customer-facing agents

Set service level objectives (SLOs) on the ones that matter, such as a minimum success rate and a maximum rollback rate, and alert when they’re breached. A customer-facing agent needs the same on-call discipline as any production system.

Rolling Out: Crawl, Walk, Run

Every agent should earn autonomy in phases, with written exit criteria for each and an automatic step back after any serious incident.

Four phase AI agent rollout: shadow, suggest, supervised, and bounded autonomy, each with exit criteria and a tested kill switch
  1. Shadow. The agent runs on live inputs, but nothing it produces reaches customers or systems. Compare its output with what your people did. Exit when it meets your accuracy targets on at least two weeks of real work.
  2. Suggest. The agent proposes, and a person accepts, edits, or rejects every item. Track how often proposals are accepted without edits. Exit when that rate is high and stable and no top-tier mistakes have slipped through.
  3. Supervised autonomy. The agent acts alone on read-only and reversible internal work, while external, hard-to-reverse, and irreversible actions still wait for approval. Sample audits continue.
  4. Bounded autonomy. The agent operates within hard limits on volume, spend, and scope, with alerts, monthly evals, and a kill switch. Irreversible, financial, and legal actions stay human-approved.

Build a kill switch and test it. One control should stop the agent immediately, revoke its write credentials, and route work back to people or the previous process. Test it during the shadow phase, not during your first incident. Add circuit breakers that trip automatically: a spike in errors, rollbacks, spend, or actions per minute pauses the agent until someone investigates.

Run incidents like incidents. When an agent causes a problem, contain first: hit the kill switch, revoke access, and restore from snapshots. Then assess the blast radius using the audit log, notify affected customers or teams, and write a blameless postmortem. Every postmortem should produce at least one new test case, and usually a change to a skill, a permission, or an approval tier. If the root cause was that the agent could act on its own output without a check, the fix is architectural.

Governance Frameworks Worth Mapping To

You don’t need to adopt every framework, but mapping your controls to recognized ones makes audits, customer security reviews, and regulatory questions much easier.

  • NIST AI Risk Management Framework. The AI RMF organizes AI risk work into four functions: Govern, Map, Measure, and Manage. It’s voluntary and widely used as a common vocabulary. In February 2026, NIST’s Center for AI Standards and Innovation launched an AI Agent Standards Initiative focused on agent security, identity, and interoperability, so expect more agent-specific guidance.
  • ISO/IEC 42001. ISO/IEC 42001 is a certifiable management system standard for AI. If your customers already ask about security certifications, this is the AI equivalent they will start asking about.
  • EU AI Act. The AI Act applies to AI systems placed on the EU market or affecting people in the EU. Prohibited practices and AI literacy provisions have applied since February 2025, general-purpose AI model obligations since August 2025, and most other rules, including transparency obligations, since August 2, 2026. After the AI Omnibus entered into force in July 2026, obligations for high-risk systems in areas such as employment, credit, and education apply from December 2, 2027. Those obligations include logging, documentation, and appropriate human oversight, which are the same controls described above.
  • OWASP Top 10 for Agentic Applications. The 2026 list names the agent-specific risks to test for: Agent Goal Hijack, Tool Misuse and Exploitation, Identity and Privilege Abuse, Agentic Supply Chain Vulnerabilities, Unexpected Code Execution, Memory and Context Poisoning, Insecure Inter-Agent Communication, Cascading Failures, Human-Agent Trust Exploitation, and Rogue Agents.
  • Microsoft’s agentic failure mode taxonomy. Useful for threat modeling, it separates novel risks from existing ones and safety from security, and version 2.0 adds goal hijacking, inter-agent trust escalation, and plugin abuse.

Governance also has a vendor side. Some platforms now sell agent guardrails and policy layers, such as the ones we covered in our review of Clarvos. They can help, but they don’t replace your own approval tiers, tests, and backups.

Agent Deployment Checklist

Use this before any agent gets write access to a production system.

  • Fit: We confirmed a workflow or script can’t do the job, and the value justifies the cost and risk.
  • Scope: The agent’s job, allowed tools, data, and off-limits actions are written down.
  • Acceptance criteria: Checkable success criteria exist for every task type, and the checker has them.
  • Maker-checker: No agent approves its own work, and the checker can reject without being overruled.
  • Least privilege: The agent has its own identity and only the scopes it needs, with no shared admin keys.
  • Write gate: Writes pass through a policy gate in code outside the agent.
  • Staging: The agent works in staging or dry-run mode before touching production.
  • Idempotency: Retries can’t duplicate sends, charges, or records.
  • Backups: Snapshots are taken before every write, stored off the production system, and restores have been tested.
  • Audit trail: Every action is logged with old and new values, and approvers see diffs, not summaries.
  • Summary log: Every run ends with a human-readable log of what the agent did, the assumptions it made, every judgment with a citation, confidence, what it skipped or could not verify, open questions, and the diffs of outputs it touched.
  • Untrusted content: External content is treated as data and can’t trigger writes, sends, or payments.
  • Risk tiers: Every action is assigned a tier, and irreversible, external, financial, and legal actions require approval.
  • Approval rules: Approval means a named person said yes to the exact change, never an emoji, silence, or another agent.
  • Stop rules: The agent stops on validation failures, empty results, tool errors, scope changes, and repeated failures.
  • Evals: A golden dataset and regression suite run before every model, prompt, skill, or tool change.
  • Judge calibration: Any LLM judge comes from a different model family and is checked against human grades.
  • Skills: Recurring procedures are written as versioned, reviewed skills with stop rules and verification.
  • Observability: Every run is traced, and success, intervention, rollback, escalation, and cost are on a dashboard.
  • Rollout: The agent moves through shadow, suggest, supervised, and bounded phases with written exit criteria.
  • Kill switch: One tested control stops the agent and revokes its write access.
  • Incident plan: Containment, restore, notification, and postmortem steps are documented, and each incident adds a test.
  • Governance: Controls are mapped to the NIST AI RMF, ISO/IEC 42001, OWASP’s agentic list, and the EU AI Act where it applies.

Key Takeaways

  • An agent that can both diagnose and change a system with nothing checking it in between will compound its own mistakes. Separate the maker from the checker.
  • The same controls apply whether the agent lives in your browser, your IDE, your CRM, or a workflow tool: write gates, human approval, and a reviewable log.
  • Treat an agent’s report of success as a claim. Verify against acceptance criteria written before the run, using validators and tests the agent can’t edit.
  • Tier actions by risk. Irreversible, external-facing, financial, legal, and consent-related actions need approval from a named person, and an emoji or another agent’s relay is not approval.
  • Snapshot before every write, store backups off production, test restores, log every change, and show approvers diffs instead of summaries.
  • Require a human-readable summary log at the end of every run, with assumptions stated as assumptions, every judgment cited to a source, and the actual diffs attached. Review every run at first, then daily, then weekly as the logs stay clean, keep the logs in a sheet next to the task and skill docs, and use a separate agent only to flag patterns across jobs, never to fix them.
  • Codify recurring procedures into versioned skills with stop rules and verification, and improve prompts, skills, and retrieval before considering fine-tuning.
  • Roll out in phases from shadow to bounded autonomy, track success, intervention, rollback, and cost, and keep a tested kill switch.

Get Help Deploying AI Agents Safely

Frequently Asked Questions

What Is the Biggest Risk of Using AI Agents in Production?

The biggest risk is an agent that can act on its own output with nothing checking it in between. Each change rests on the last one, so a single mistake can grow into several before anyone notices. Separating the agent that proposes changes from an independent checker, and requiring approval for high-risk actions, contains that risk.

What Is a Maker-Checker Pattern for AI Agents?

It is a design where the agent that does the work never approves it. A separate checker, which can be a validator, a test suite, a second agent, or a person, reviews the result against acceptance criteria and can reject it without being overruled.

When Should a Human Approve an AI Agent Action?

A person should approve any action that is irreversible, external-facing, financial, legal, or related to personal data, consent, or security. Examples include publishing content, emailing customers, refunds, payments, deleting or merging records, and changing access.

Does an Emoji Reaction Count as Approval for an Agent?

No. Approval should be a named, authorized person saying yes to a specific change in words, through a logged channel. An emoji, silence after a deadline, or another agent reporting that someone approved is not approval.

Can an LLM Judge Replace Human Review of Agent Output?

Not entirely. LLM judges scale well, but research shows some models rate their own outputs and their model family’s outputs higher. Use a judge from a different model family, give it a rubric, calibrate it against human grades, and never let it be the only gate for irreversible or external actions.

Should I Fine-Tune a Model to Improve My Agent?

Usually not first. Build an evaluation set, then improve prompts, write skills for multi-step procedures, and fix retrieval. Fine-tuning fits narrow, high-volume tasks with hundreds to thousands of labeled examples, and vendor support for it can change.

What Metrics Should I Track for Production AI Agents?

Track task success rate, intervention rate, rollback rate, escalation rate, checker disagreement rate, cost per successful task including human review time, and latency.

How Should I Roll Out a New AI Agent?

Move in phases: shadow mode, where output is only logged; suggest mode, where a person reviews every item; supervised autonomy for reversible internal work; and bounded autonomy with hard limits. Each phase needs written exit criteria and a tested kill switch.

What Should an AI Agent Include in a Summary Log?

The log should tell a reviewer what the agent did, every assumption it made, every judgment with a citation to the source it relied on, its confidence, what it skipped or could not verify, any open questions, and the diffs or outputs it touched. Reviewers use that record to approve or reject the run, and the findings should be written back into skills, acceptance tests, guardrails, and evaluation sets. Review every run while the agent is new, then step down to daily and weekly reviews as the logs come back clean, and step back up after a skill change, a model change, or a new failure. Keep the logs in a spreadsheet next to the task and skill documentation, and let a separate monitoring agent flag patterns across jobs without making changes.

Related Articles