AI Agents for the Chief Technology Officer (CTO)

AI agents for software engineering are AI models that take a goal, use tools like your test runner, and work in a loop until a check passes. For a Chief Technology Officer (CTO), they pay back first in coding, QA and DevOps, where 70% of developers using agents told Stack Overflow in 2025 they save time on specific tasks.

The hard part is control: Gartner predicts over 40% of agentic AI projects will be canceled by the end of 2027, citing cost, unclear value and weak risk controls.

This page covers agents your engineering team runs and agents inside your product. Agents across internal systems like the ERP and CRM are covered in AI Agents for the CIO.

87%of developers are concerned about the accuracy of AI agentsStack Overflow 2025
70%of developers using agents say they save time on specific tasksStack Overflow 2025
<10%agent success rate on tasks that take a person over 4 hoursMETR 2025
13 of 13frontier models hijacked at least once in a red-team competitionNIST CAISI 2026

Key takeaways

What is an AI agent in software engineering, and how is it different from a coding assistant?

An AI agent in software engineering takes a goal, plans steps, calls tools (edit files, run tests, open a pull request) and checks its own results, while a coding assistant suggests code a developer accepts line by line. METR found the task length agents finish at a 50% success rate has doubled about every 7 months.

Every coding agent has the same 4 parts: a model, a set of tools, a loop, and a stop condition. The stop condition is usually a check, like the test suite passing, or a limit on steps or spend.

That loop is what makes an agent useful and what makes it risky. A coding assistant can only suggest. An agent can run a command.

How you use AI coding assistants day to day, and whether they make developers faster, is covered in AI for the CTO. This page starts where the tool starts acting on its own.

Check what the vendor’s “agent” actually does

Gartner estimates only about 130 of the thousands of vendors selling “agentic AI” have real agentic capabilities. It calls the rest “agent washing”: chatbots, assistants and RPA tools with a new label.

Ask a vendor 3 questions:

If the answers are vague, you’re buying an assistant at agent prices.

Size the work to what agents can finish

METR’s March 2025 study measured task length in human time. Agents succeeded almost 100% of the time on tasks that take a person under 4 minutes, and under 10% of the time on tasks over about 4 hours.

The trend moves fast, so I re-check those limits every quarter. The planning rule holds either way: give an agent a ticket a developer could finish in an hour or two, with a test that proves it’s done.

Which coding, QA and DevOps work should you hand to agents first?

Hand agents work that comes with its own check: dependency upgrades, test writing, flaky-test triage, small bug fixes with a reproduction, and first-pass incident triage. In my planning model for an 8-developer team, those 5 jobs give back about 17.5 hours a week, worth roughly $71,400 a year at an $85 loaded hourly rate.

Start with work that has a verifier

A lot of agent advice says to start with new features, because there’s no legacy code to break. I disagree, and I start teams on maintenance and QA work.

The reason is the verifier. A dependency upgrade either passes the test suite or fails it, and a flaky test either reproduces or it doesn’t. A new feature has no test yet, so a person has to judge every line, and the agent saves far less time.

Google’s 2025 DORA report, drawn from nearly 5,000 technology professionals, describes AI as an amplifier of the engineering system it lands in. Strong tests make an agent useful, and weak tests let it ship mistakes faster.

Verified work also builds the team’s trust faster. Each merged agent pull request with a green test run is evidence the team can see.

Where agents give hours back to an engineering team

Here’s a planning model for an 8-developer team at a $20M software company. The hours are assumptions from the kind of week I see at this size, so replace them with your own baseline before you budget against them.

Engineering taskTeam hours/week nowWith agentsHours given backMechanism
Dependency upgrades and security patches624Agent opens a draft pull request from each scanner alert, runs the full test suite in a sandbox, and a developer reviews the diff
Writing tests for uncovered code1055QA agent reads the coverage report, writes tests for untested paths, and runs them until they pass; the code owner reviews each test
Flaky-test triage41.52.5Agent reruns failing tests, compares logs across runs, and labels each one as a flake or a real failure with the evidence attached
Small bug tickets with a reproduction1284Agent turns the reproduction into a failing test, fixes the code until it passes, and opens a pull request for human review
First-pass incident triage532DevOps agent with read-only access pulls logs, recent deploys and error rates into a summary; the on-call engineer decides what to roll back
Total3719.517.5

Every row clears my 20% rule: if an agent would give back less than 20% of a task’s time, cut or redesign the task before you build an agent for it.

The incident row stays read-only on purpose. The agent drafts the rollback command, and a person runs it.

Here’s what 17.5 hours a week is worth, with every assumption stated.

The math on engineering agents

17.5 hrsgiven back per week
$85.00loaded cost per hour
48working weeks
$71,400 a yearin capacity given back
17.5 × $85.00 × 48 = $71,400. The rate is BLS median developer pay loaded at 1.3×. Swap in your own numbers in the AI ROI Calculator.

Those hours go back to the roadmap and the tech debt list. Every role stays in this model; the team ships more of what it already planned.

Starting agents on test coverage: a planning example

Here’s how I’d model a first coding agent for a 6-person software team. It’s a planning example built from typical numbers, so use it as a template for your own baseline.

The agent gets one bounded job: add unit tests to an established internal service. Engineers name the behaviors that need coverage, and the agent reads the existing code and tests, drafts new cases, and runs them in an isolated environment. Then it opens a proposed change for review.

Engineering effortBeforeWith agent
Selecting cases and defining expected behavior4 hours4 hours
Writing tests and preparing fixtures12 hours6 hours
Reviewing, correcting and validating tests4 hours6 hours
Total per week20 hours16 hours

That’s 4 engineering hours a week, a 20% reduction, after counting the extra review time. The team puts those hours into reproducing production bugs and adding regression tests.

Look at the review row. It goes up by 2 hours, and the model only holds because the team budgets for that.

A 20% gain sits right on my 20% rule, so this job clears the bar with no room to spare. If review creeps up another hour, cut the job or redesign it.

The agent can’t merge its own changes. Engineers check that each assertion tests the behavior the team intended, because a test written by reading the current code can lock in a current bug.

Passing tests and higher coverage are the minimum bar. Judging test quality still takes a person reading the assertions.

What guardrails does a coding agent need before it touches your repository?

A coding agent needs 4 guardrails: its own scoped credential, a sandbox that can’t push to protected branches, the same security scans and review as human code, and human approval before anything reaches production. AWS’s July 2026 control framework for coding agents calls for 2 human approval gates: one after security scans and one before deployment.

The credential matters most. An agent running on a developer’s personal token can do anything that developer can do, including changes no one asked for.

The AWS framework puts it plainly: give each MCP server the minimum tools and a dedicated, scoped-down credential, and keep an allowlist of reviewed servers. It also warns against wildcard auto-approval, which removes the human prompt on every tool call.

Prompt injection is the risk to plan for

Prompt injection is text that hijacks an agent: an instruction hidden in an issue, a README, a web page or a log line. NIST’s Center for AI Standards and Innovation (CAISI) ran a red-team competition with more than 400 participants and 250,000 attack attempts, and found successful attacks against all 13 frontier models tested.

So assume any agent that reads outside text can be steered. The fix is permissions: an agent that reads untrusted content gets read-only access, and anything with write access reads only trusted input.

OWASP published its Top 10 for Agentic Applications in December 2025. I use it as the checklist for a security review of any agent before it moves up a rung.

The agent permission ladder

I put every engineering agent on a 4-rung ladder. Every agent starts on rung 1, and it climbs only when it clears the gate.

RungThe agent canGate to climb to this rungTypical work
1. ReadRead code, logs and tickets; write nothingNone; every agent starts hereIncident triage, explaining unfamiliar code
2. ProposeOpen a draft pull request from a sandbox branchPasses its 20 to 50 eval tasks; 2 weeks of reviewed output on rung 1Tests, dependency upgrades, small bug fixes
3. Act in stagingRerun CI, deploy to staging, run migrations on test data4 weeks on rung 2 with change failure rate flatFlaky-test triage, release prep
4. Act in production with approvalRun a prepared change after a named person approves itWritten rollback plan, full audit log, security review against the OWASP agentic listConfig changes, approved rollbacks

There’s no fifth rung. Unattended writes to production stay off the table at a $5M to $50M company, because there’s no separate platform team to clean up after one.

How do you build agents into your product with tool use and MCP?

Build a product agent from 4 parts: a model, a short list of tools with tight inputs, a loop with a step limit, and a log of every tool call. The Model Context Protocol (MCP) is the open standard for connecting those tools, and its November 2025 specification says hosts must get explicit user consent before invoking any tool.

MCP defines 3 things a server can expose: tools (functions the model can run), resources (data for the model or user), and prompts (templated workflows). It runs on JSON-RPC 2.0 messages between a host, its clients and the servers.

The specification is blunt about risk. It says tools represent arbitrary code execution, and that tool descriptions should be treated as untrusted unless they come from a trusted server.

Keep tool lists short and chains shorter

Every tool you add is another decision the model can get wrong. I start a product agent with 3 to 5 tools, each with a narrow input schema, and add more only when the eval suite shows a gap.

Chain length drives failure rates. If each step in an agent’s task succeeds 95% of the time, a 5-step chain succeeds 0.95⁵ = 77% of the time, and a 10-step chain succeeds 0.95¹⁰ = 60% of the time.

So design for short chains. Add a check between steps (validate the tool output against a schema before the next call), cap the loop at a fixed number of steps, and set a spend limit per run.

Where the agent code lives

Put tool servers behind the same service layer that owns your other model calls. Python handles tool logic and error handling well, and Cloudflare Workers can host lightweight tool endpoints close to users.

Log the prompt, each tool call with its arguments, each result, the model, and the token cost per run. That log is your audit trail, your debugging record, and your eval data source in one place.

Model selection, retrieval and the service layer itself are covered in AI for the CTO.

How do you test an AI agent before customers use it?

Test an agent with an eval suite: 20 to 50 tasks drawn from real failures, each with a grader that checks the outcome, run on every change to the prompt, tools or model. Anthropic’s January 2026 guidance recommends that starting size and code-based graders wherever a deterministic check exists, because they’re fast, cheap and reproducible.

Anthropic’s guidance describes 3 grader types. Code-based graders check outcomes exactly. Model-based graders handle judgment calls but need calibration against people, and human graders set the gold standard at the highest cost.

For coding agents, you already own the best grader: the test suite. For product agents, write a check per task, like “the refund tool was called once, with the right order ID.”

Split capability evals from regression evals

Capability evals start with a low pass rate and give the team something to climb. Regression evals should sit near 100%, and a drop blocks the merge the same way a failing unit test does.

When a capability eval passes consistently, move it into the regression suite. Over a quarter, the regression suite becomes a record of every failure you’ve fixed.

Measure consistency, too

A single passing run can hide an inconsistent agent. Anthropic’s guidance gives the math: an agent with a 75% per-trial success rate passes 3 trials in a row only about 42% of the time (0.75³).

For anything customer-facing, run each eval task 3 times and count it as passed only when all 3 pass. Then read the transcripts: Anthropic reported a model scoring 42% on one benchmark that rose to 95% once grading bugs were fixed.

How do you measure whether engineering agents pay back?

Measure agent payback as hours given back minus agent cost, against a 4-week baseline taken before rollout. At published Claude Sonnet 5.5 prices, a 2-million-token coding agent run costs about $1.56, so 150 runs a month costs about $234 against roughly $5,950 a month for 17.5 weekly hours of developer time.

The token math for 1 coding agent run

Here’s the cost of 1 run, using Anthropic’s published API pricing (accessed October 2026). Agents reread their context on every step, so most input tokens are cache reads.

ModelFresh inputCache readsOutputPer run150 runs/month
Claude Sonnet 5.5 ($2 in / $0.10 cached / $10 out per million)$0.80$0.16$0.60$1.56$234
Claude Opus 5.5 ($4 in / $0.20 cached / $20 out per million)$1.60$0.32$1.20$3.12$468

Cache writes add a little on top. Your real token counts will differ, so log them from week 1 and replace my assumptions.

Developer review time costs far more than tokens, which is why review minutes belong in the payback math.

The 4 numbers I track

  1. Merge rateThe share of agent pull requests merged after review. Below 50% means the tickets are too big or the instructions too thin.
  2. Review minutes per agent pull requestIf review takes longer than writing the change would have, the agent costs time.
  3. Change failure rateThe share of deploys that need a fix or rollback. It should hold flat as agent volume grows.
  4. Cost per merged changeMonthly agent spend ÷ merged agent pull requests.

Run your own hours and rates through the AI ROI Calculator before you expand past the first 2 agents.

Gartner’s cancellation reasons map to these numbers. Rising cost shows in cost per merged change, unclear value shows in merge rate, and weak risk control shows in change failure rate.

Your first 90 days

Ordered people first, then process, then tech. Each step names who does it and what it produces.

Days 1 to 30
People
  1. Tell the team what agents are for
  2. Name 1 agent owner
  3. Ask each developer for 3 chores with a built-in check
Days 31 to 60
Process
  1. Take the baseline
  2. Write the guardrails down
  3. Pick 2 agent jobs that clear the 20% rule
Days 61 to 90
Tech
  1. Build 20 to 50 eval tasks
  2. Run both agents on rung 1, then rung 2
  3. Report at day 90

Days 1 to 30: people

  1. Tell the team what agents are for. Write a one-page note: agents give hours back to the roadmap, every role stays, and every agent change gets human review.
  2. Name 1 agent owner. Usually a senior engineer, with 2 hours a week to own the permission ladder, the eval suite and the cost log.
  3. Ask each developer for 3 chores with a built-in check. Tests, upgrades and flaky failures usually top the list; track hours on them for 2 weeks.

Days 31 to 60: process

  1. Take the baseline. Record review minutes, change failure rate and hours per chore for 4 weeks.
  2. Write the guardrails down. Scoped credentials, sandbox branches, the 2 approval gates, and the 4-rung ladder, reviewed against the OWASP agentic list.
  3. Pick 2 agent jobs that clear the 20% rule. Price them in the AI ROI Calculator.

Days 61 to 90: tech

  1. Build 20 to 50 eval tasks for each of the 2 jobs from real past tickets and failures.
  2. Run both agents on rung 1, then rung 2. Read-only for 2 weeks, then draft pull requests from a sandbox.
  3. Report at day 90. Hours given back against the baseline, merge rate, change failure rate, cost per merged change, and one call per agent: keep, expand, or kill.

How eMediaAI approaches this

I’m Lee Pomerantz, Certified Chief AI Officer, founder of eMediaAI, Fort Wayne, Indiana. Every engagement runs in one order: people first, then process, then tech.

The AI Opportunity Blueprint™ is where it starts. It’s a 10-day, $5,000 forensic audit: your team records the work, I map where the hours and data go, and you get a prioritized workflow map, an ROI projection, an implementation roadmap and governance recommendations.

For a CTO, the Blueprint scores candidate agent jobs against the 20% rule and places each one on the permission ladder. If the numbers don’t hold, the report says don’t build it.

When an agent clears the Blueprint, I build it with error handling, logging and a handoff your team can run: an SOP, a Loom walkthrough, a governance doc and an ROI report. That’s the AI agents work.

Frequently asked questions

Are AI coding agents safe to use on a production codebase?

AI coding agents are safe on a production codebase when they work in a sandbox branch, use a dedicated scoped credential, and every change passes security scans and human review before merge. NIST’s CAISI reported in March 2026 that red-teamers hijacked all 13 frontier models it tested, so agents that read untrusted text like issues or web pages should get read-only access.

What is the Model Context Protocol (MCP)?

The Model Context Protocol (MCP) is an open standard for connecting AI applications to tools and data. An MCP server exposes tools, resources and prompts over JSON-RPC 2.0 messages. The November 2025 specification says hosts must get explicit user consent before invoking any tool, and treats tool descriptions as untrusted unless the server is trusted.

How much do AI coding agents cost?

AI coding agents cost a seat fee or per-token usage, and usage dominates for heavy work. At Anthropic’s published October 2026 prices, a run of 2 million input tokens (1.6 million cached) and 60,000 output tokens costs about $1.56 on Claude Sonnet 5.5 and $3.12 on Claude Opus 5.5. An 8-developer team running 150 Sonnet runs a month spends about $234 in tokens.

How much time does rolling out coding agents take from the engineering team?

Rolling out coding agents takes about 2 hours a week from 1 named agent owner for 90 days, plus 2 weeks of each developer logging hours on chores. Building an eval suite takes a few days per agent job, because each needs 20 to 50 tasks drawn from real tickets. Review time on agent pull requests is the ongoing cost to track.

How do you calculate the ROI of an AI agent?

Calculate AI agent ROI as hours given back × loaded hourly rate, minus token, seat and review costs. With a 4-week baseline, 17.5 hours a week × $85 × 48 weeks = $71,400 a year in engineering capacity. Subtract agent spend and the review minutes each agent pull request takes, then confirm change failure rate held flat.

Why do agentic AI projects fail?

Agentic AI projects fail mostly on cost, unclear value and weak risk controls, the 3 reasons Gartner gives for predicting over 40% will be canceled by the end of 2027. Teams also give agents tasks that are too long: METR found agents succeed under 10% of the time on tasks that take a person over 4 hours.

What is prompt injection in an AI agent?

Prompt injection is hidden text that hijacks an AI agent, such as an instruction planted in an issue, a document or a log line the agent reads. The OWASP Top 10 for Agentic Applications, published December 2025, lists agent goal hijack first among its 10 risks. The main defense is permissions: an agent that reads untrusted text gets read-only access.

How many test cases does an AI agent eval need?

An AI agent eval suite can start with 20 to 50 tasks drawn from real failures, according to Anthropic’s January 2026 guidance on agent evals. Each task needs a grader that checks the outcome, ideally with code. For customer-facing agents, run each task 3 times, since a 75% per-trial success rate passes 3 runs in a row only 42% of the time.

Will AI agents replace software engineers?

AI agents are changing what software engineers spend their hours on, while the employment data still points to growth. The Bureau of Labor Statistics projects software developer jobs will grow 10% from 2025 to 2035. At eMediaAI, agent work is scoped to give engineering hours back to the roadmap, and engagements aimed at cutting headcount are declined.

What should a CTO do first with AI agents?

A CTO’s first step with AI agents is a one-page note telling the engineering team what agents are for and that every agent change gets human review, followed by naming 1 agent owner. Next, take a 4-week baseline of review time and change failure rate. Then start 2 agents on read-only work, such as incident triage or flaky-test analysis.

Sources

Book a free 20-minute call to see if the AI Opportunity Blueprint™ is right for you.

Book Your Call

Summarize This Page With Your Favorite AI

© 2026 eMediaAI.com. All rights reserved. Terms and Conditions | Privacy Policy