Reliability, Non-Functional Requirements and Migration

Say how good it must be, design for the day it fails, and move old processes across without a leap of faith.

BeginnerIntermediateExpert · 13 min read · Last updated:

In short

Reliability for an agent means correct outcomes, not only a service that responds. Set measurable targets, classify actions by how reversible they are, design fallbacks and recovery before launch, and write non-functional requirements that can be tested. Migrate existing automation in small slices: observe, run in shadow, pilot, expand and keep a way back.

What you will learn: reliability targets, dependency arithmetic, reversibility, recovery design, a non-functional requirements checklist and migration patterns with shadow testing.
Prerequisites: Reliable Tool Execution and Error Recovery and Enterprise Agent and Platform Reference Architectures.

Beginner What reliable means

Several kinds of reliability

DimensionQuestionExample measure
AvailabilityCan people use it?Share of requests answered
LatencyIs it quick enough?Time to complete, at high percentiles
CorrectnessIs the outcome right?Task success on reviewed samples
SafetyDoes it stay within bounds?Unauthorized or harmful actions
ConsistencyDo similar cases get similar treatment?Variation across repeated runs
RecoverabilityCan we repair damage?Time to restore and reconcile

A service can be fully available while answering wrongly. Give correctness and safety their own targets and owners.

Targets and error budgets

A service level indicator is what you measure; an objective is the value you aim for over a period. The gap between the objective and 100 percent is an error budget that guides how fast to change things. For quality, define precisely who judges success, how samples are chosen and the minimum sample size. Treat severe safety events separately: they trigger action immediately, not after a budget is used.

Measuring correctness

Availability can be counted automatically; correctness usually cannot. Combine checks that code can make on every task, such as whether the record matches the request, with expert review of a sample. Include a random sample, because reviewing only complaints shows only the failures people noticed. Report by case type and channel, with the number reviewed. Compare with the previous process measured the same way, since people and rules also make mistakes and the fair question is whether outcomes improve without adding worse kinds of error.

ObjectiveWeak wordingTestable wording
SuccessAnswers are accurateAgreed share of sampled tasks pass a written rubric each week
SafetyThe agent is safeNo action outside the permitted list; any breach pages the owner
LatencyQuick responsesA stated percentile completes within a stated time at peak
RecoveryWe can restoreRestore and reconcile within an agreed time, rehearsed quarterly

Dependencies set the ceiling

If a request needs several services, their availabilities multiply. Alternatives and optional parts change the result.

"""How dependencies and fallbacks change what you can promise."""
from math import prod

def serial(*parts):
    return prod(parts)                      # all must work

def either(*parts):
    return 1 - prod(1 - p for p in parts)   # independent alternatives

def minutes_down(availability, days=30):
    return (1 - availability) * days * 24 * 60

model, search, database, app = 0.995, 0.999, 0.9995, 0.999
designs = {
    "everything required": serial(app, model, search, database),
    "second model": serial(app, either(model, 0.99), search, database),
    "search optional": serial(app, either(model, 0.99), database),
}
for name, value in designs.items():
    print(f"{name:<20} {value:.4%}  "
          f"{minutes_down(value):6.0f} min per 30 days")

target = 0.995
print(f"error budget at {target:.1%}: "
      f"{minutes_down(target):.0f} min per 30 days")

Output:

everything required  99.2514%     323 min per 30 days
second model         99.7452%     110 min per 30 days
search optional      99.8451%      67 min per 30 days
error budget at 99.5%: 216 min per 30 days

With everything required, the example misses a 99.5 percent objective before counting any wrong answers. A second model brings it within the budget, and an answer path that works without search improves it further. These are idealized figures: they assume failures are independent and switching always works. Two models from one provider or region can fail together, a fallback may give poorer answers and "search optional" is useful only if users are told that evidence is missing. Use measured data and test the switch.

Where retries help and where they hurt

Retries can turn a brief fault into a success, and can turn an overload into an outage when every layer retries at once. Give one layer the job, use increasing random delays, cap the total attempts and respect the task's deadline. Do not retry refusals or invalid input. For model output that fails a check, a single corrected attempt is often reasonable; beyond that, hand over. Count retries in your cost and capacity estimates.

Intermediate Reversibility and recovery

Classify actions by reversibility

ClassExamplesDesign response
No effectRead, calculateRetry freely within limits
Easily undoneCreate a draft, add a tagOffer undo; sample review
CompensatableReserve stock, book a slotDefined cancel step with deadline
Costly to correctPay money, change entitlementsApproval, limits, delayed release
IrreversibleSend a message, delete permanently, disclose dataStrongest checks; avoid if possible

Move actions into safer classes by design: draft before send, soft delete with a retention period, hold payments briefly before release, change a small batch first. Compensation is a new action that can itself fail, and it does not make earlier effects disappear.

Build undo before you need it

For each change the agent can make, write the reversing step beside it and test it. Store the previous value, the operation reference and who asked, so that correction does not depend on guesswork. Check that reversal is still safe at the time it runs: another person may have changed the record since. State how long reversal remains possible, and show users that window.

Degrade deliberately

Normalfull capability
Reducedalternative model or fewer features
Read onlyanswers, no changes
Queue or hand overwork waits for people or recovery
Offclear message and manual process
Decide in advance what triggers each step and who may force it.

A fallback must never relax permissions, approvals or data rules. Test the alternative model on the same evaluation set before relying on it.

Recovery plan

  1. Contain: stop new actions, revoke credentials if needed.
  2. Scope: list affected tasks, users and records from traces.
  3. Reconcile: compare records with downstream systems.
  4. Repair: compensate or correct, with approval.
  5. Restore: bring service back in stages.
  6. Learn: add tests and update the design.

Set a recovery time objective and a recovery point objective for state, and rehearse restoring it. See High Availability and Disaster Recovery.

Change is a reliability risk

New instructions, models, tool descriptions, indexes and policies can each alter behavior without any code failure. Version them, test them together, release to a small share first and watch outcome measures long enough for slow problems to appear. Keep the previous combination ready to restore. Note external changes you do not control, such as a provider retiring a model, and track the announced dates.

Non-functional requirements checklist

Non-functional requirements describe qualities. Write each with a number or a testable condition, an owner and a way to verify it. ISO/IEC 25010 offers a general product quality model that helps check coverage.

AreaRequirement to state
PerformanceCompletion time targets and peak concurrent tasks
Capacity and costVolume, rate limits, cost ceiling per task and month
AvailabilityObjective, hours that matter, maintenance
QualityTask success and evidence requirements by case type
SafetyForbidden actions; limits; approval rules
SecurityAuthentication, authorization, isolation, secrets
PrivacyData classes, location, retention, deletion, consent where relevant
AuditabilityWhat is recorded, for how long, who may read it
ExplainabilityWhat users and reviewers must be shown
AccessibilityInterface standard to meet, such as WCAG
OperabilityAlerts, runbooks, stop control, support hours
ChangeabilityHow models, prompts and tools are changed and rolled back
PortabilityWhat it takes to switch provider and export data
ComplianceApplicable laws, contracts and internal policy

For example, replace "responses must be fast" with a stated percentile and load, such as ninety-five percent of answers within an agreed number of seconds at expected peak volume. The right number comes from your users, not from a template.

Requirements conflict

Stronger checking raises latency and cost. Longer retention helps investigation and increases privacy exposure. A second model improves availability and doubles evaluation work. Write the trade-off beside each requirement, rank requirements by the harm of missing them and ask the accountable owner to choose. Revisit the ranking when real measurements arrive, and record changes as in Architecture Decision Records and Reviews.

Expert Migration and modernization

Check the reason first

Do not replace a dependable rule-based process with an agent merely to modernize it. Agents help where inputs vary, text must be understood or exceptions are common. Keep exact calculations, entitlements and limits in code.

Understand the process you are replacing

Existing automation often contains rules nobody wrote down: an overnight delay that lets corrections arrive, a manual glance that catches odd amounts or a field that another team depends on. Before changing anything, collect real cases, watch the people doing the work, list every input, output and downstream consumer and note the exceptions. Measure volume, handling time, error rate and rework. That baseline is what you will compare against, and it often reveals fixes that need no model at all. See Process Discovery and Use Case Selection.

Migration patterns

PatternHow it worksGood for
Front door assistantAgent collects and structures requests; old process executesMessy intake
Exception handlerRules handle normal cases; agent prepares exceptions for peopleStable core, varied edges
Strangler slicesA router moves one case type at a time to the new pathLarge processes
Shadow runAgent proposes without effect; results comparedMeasuring before trusting
Parallel with approvalAgent acts only after a person acceptsFirst real use
Tool wrapperExisting functions become narrow toolsReusing proven logic

Shadow testing by case type

"""Shadow mode: the agent proposes, the old process still decides."""
from collections import Counter

# (category, old system decision, agent decision, reviewed correct answer)
CASES = (
    [("address change", "apply", "apply", "apply")] * 57
    + [("address change", "apply", "hold", "hold")] * 3
    + [("refund", "pay", "pay", "pay")] * 30
    + [("refund", "hold", "pay", "hold")] * 4
    + [("account closure", "hold", "hold", "hold")] * 6
)

def report(category):
    rows = [c for c in CASES if c[0] == category]
    tally = Counter()
    for _, old, new, truth in rows:
        tally["old"] += old == truth
        tally["new"] += new == truth
        tally["unsafe"] += new != truth and new != "hold"
    return len(rows), tally

print("category          cases   old   agent  unsafe  decision")
for category in dict.fromkeys(c[0] for c in CASES):
    n, t = report(category)
    ready = n >= 50 and t["unsafe"] == 0 and t["new"] >= t["old"]
    why = ("pilot" if ready else
           "stay: unsafe errors" if t["unsafe"] else "stay: too few cases")
    print(f"{category:<17}{n:>6} {t['old'] / n:>6.0%} {t['new'] / n:>6.0%}"
          f" {t['unsafe']:>6}  {why}")

Output:

category          cases   old   agent  unsafe  decision
address change       60    95%   100%      0  pilot
refund               34   100%    88%      4  stay: unsafe errors
account closure       6   100%   100%      0  stay: too few cases

Address changes may go to a pilot. Refunds stay because the agent would have paid four cases that should be held, although its overall figure might look respectable. Account closure shows perfect results on only six cases, which proves little. The threshold of 50 and zero unsafe errors is an example, not a statistical guarantee: with no errors in a sample of n independent cases, a common rough 95 percent upper bound on the error rate is about 3 divided by n, which for 60 cases is still around 5 percent. Choose sample sizes from the harm an error causes. Shadow runs must not write anywhere, and the reviewed answer matters because the old system can be wrong too.

Reviewing disagreements

Where old and new answers differ, have someone who does not know which system produced which answer judge them, using a written rule. Classify each difference as a new-system error, an old-system error, an unclear policy or an acceptable variation. The classification often matters more than the totals, because unclear policy needs a business decision and not a better model.

Move in stages

Baselinemeasure today
Shadowno effects
Pilotapproval, few users
Expandone case type at a time
Retireafter a stable period
↺ Any stage can return to the previous one
Define entry, exit and rollback criteria for each.
  • Never let old and new paths both execute the same case.
  • Migrate data and permissions explicitly.
  • Keep staff able to run the manual process during transition.
  • Plan what happens to tasks in flight when you roll back.
Illustrative example: claims intake

A team places an agent in front of an existing claims system to extract fields from emails. It runs in shadow, then suggests entries that staff confirm. Decisions on payment stay with the old rules. When extraction proves dependable for two claim types, only those move to automatic entry, with sampling and a switch back.

Rollback that works

A switch is only useful if the old path can still handle the work. Keep its access, capacity and trained people until the retirement criteria are met. Record which path handled each case so that you can find and review those processed by the new one. Practice the switch during normal hours, including tasks that are halfway through: finish them, hand them to a person or cancel them with compensation. Agree who may trigger a rollback without a meeting, and which measures justify it. Afterward, reconcile both systems before moving forward again.

Bring the people with you

Those who run the process today know its traps. Involve them in choosing cases, judging results and designing the handover. Explain how roles will change and what they can do when the new path is wrong. Give them a fast way to report problems and show what was fixed as a result.

Common mistakes

  • Reporting uptime while ignoring wrong results.
  • Assuming fallbacks fail independently.
  • Calling compensation "undo".
  • Requirements without numbers or owners.
  • Replacing everything at once.
  • Judging shadow results by one average.
  • Retiring the manual route too early.

Checklist

  • Targets exist for availability, latency, correctness and safety.
  • Dependency limits are calculated and measured.
  • Actions are classified by reversibility.
  • Degradation steps are defined and tested.
  • Recovery includes reconciliation.
  • Non-functional requirements are testable and owned.
  • Migration has stages, criteria and rollback.
  • Results are judged per case type.

Frequently asked questions

What availability should an agent have?

The level users and the process need, which you can afford to deliver through its dependencies. Start from the cost of an outage.

Is rolling back a model enough to recover?

It stops new faults from that change. Records already altered still need finding and correcting.

How long should a shadow run last?

Until it covers enough cases of each type, including periodic peaks and unusual cases, for the decision you need to make.

Do all requirements need numbers?

They need a testable condition. Some are yes or no, such as a data location rule, and still need evidence.

References and further reading

Next steps