Agentic AI in Quality Engineering

Agentic AI in Quality Engineering: Beyond a Single Agent

0 Comments

Agentic AI is what happens when several agents, each with a narrow job, hand work to each other. It is more capable than one agent and considerably easier to get wrong.

In this article

  • Why more than one agent
  • Orchestration patterns
  • The orchestrator is ordinary code
  • What goes wrong, and the usual cause
  • Where the human belongs

Why more than one agent

One agent given ten tools and a vague goal performs worse than five agents with two tools each and a precise one. Narrow roles make each step checkable, make failures attributable, and let you put a human in exactly the place that needs one.

Agent Its one job
Planner Turn the release goal into an ordered list of runs
Generator Produce test cases or data for a given story
Executor Run a suite and return the raw result
Triage Cluster failures and separate environment from product
Reporter Write the summary a human will read
Gatekeeper Compare the result to the gates and output READY, CONDITIONAL or HOLD

Orchestration patterns

  • Sequential – each agent's output is the next one's input. Predictable, easy to debug, and the right default.
  • Parallel then merge – run security, performance and functional at once, then one agent merges the results. Faster, and the merge step is where the bugs live.
  • Supervisor – one agent routes work to specialists. Flexible, hardest to reason about; do not start here.

Start sequential with fail-fast. You can always parallelise later; you cannot easily debug a supervisor you do not understand.

The orchestrator is ordinary code

// the loop that runs the agents is deterministic on purpose -
// only what happens INSIDE each agent is probabilistic
const pipeline = ['generate', 'execute', 'triage', 'report', 'gate'];

const state = { runId, started: Date.now(), results: {} };

for (const step of pipeline) {
  const t0 = Date.now();
  try {
    state.results[step] = await agents[step].run(state, { timeoutMs: 180000 });
  } catch (err) {
    state.results[step] = { status: 'error', message: String(err) };
    if (FAIL_FAST.includes(step)) break;      // do not report on a run that never executed
  }
  log(step, Date.now() - t0, state.results[step].status);
}

writeReport(state);   // always, even on a break - a half run is still evidence

What goes wrong, and the usual cause

  • Compounding error. Agent two trusts agent one's invented endpoint and the whole run is about something that does not exist. Fix: validate between steps, not only at the end.
  • Infinite handoff. Two agents pass work back and forth. Fix: a global step budget, not only a per-agent one.
  • Cost surprise. Five agents, each retrying, each with a long context. Fix: cap spend per run and log tokens per step.
  • Unfalsifiable reports. A confident summary of a run that half failed. Fix: the reporter must receive the raw status of every step, and say which ones did not finish.

Where the human belongs

At the gate, and at anything that writes. Let the agents generate, run, cluster and draft. A person reads the gate decision and a person accepts any change to the repository. That division keeps the speed and keeps the accountability where it can actually sit.

Key points

  • Narrow roles beat one clever agent with ten tools.
  • Sequential and fail-fast first; parallelise only when you can debug it.
  • The orchestrator should be plain deterministic code.
  • Validate between steps – compounding error is the characteristic failure of agentic systems.

Practise this on the free applications at jstestingacademy.co.in/qa-apps – no account needed.