AI Agents Need Evidence Before Fixing Infrastructure

Your checkout is failing, and an operations agent offers to restart the application. But the only evidence it has is an alert saying requests are failing. If the real problem is a database connection limit or a dependency outside your control, that restart may add disruption without fixing anything.
An agent can help during an incident. It cannot safely diagnose infrastructure from an alert alone. The useful question for a small team is not “Can an AI agent run our operations?” It is “What evidence must it have before we let it act?”
An alert tells you what broke, not why
An operations agent should treat an alert as a symptom that starts an investigation, not as permission to execute a fix. It needs to establish what users are experiencing, which systems changed, and whether the available evidence supports a specific cause.
That distinction matters because the same outward symptom can come from different places. A rise in failed checkout requests might reflect an application error, an unavailable payment provider, exhausted database connections, or a network problem. Restarting the application is a plausible response to some failures and a distraction for others.
Google’s SRE guidance on monitoring distinguishes symptoms from causes. It also gives a compact starting point for observing a service: “The four golden signals of monitoring are latency, traffic, errors, and saturation.” Those signals help answer whether a service is struggling. They do not, by themselves, prove why.
The gap between alerting and diagnosis is visible in larger organizations too. In Virtana’s U.S. survey of enterprise decision-makers and practitioners, 59% of respondents said their organizations could not automatically identify the root cause across all infrastructure domains when an AI workload alert fired. Virtana also reports that one in four U.S. enterprises begins responding to an underperforming or failed AI workload with a manual investigation across tools, and that two-thirds operated AI factory infrastructure without reliable performance baselines.
Those are enterprise survey findings, not measured failure rates for small businesses. They are still a useful warning about the design problem: automated alerting is easier to build than reliable diagnosis. VentureBeat’s Virtana-presented article on infrastructure failures frames the same issue, but the operational test is straightforward. If your agent cannot show the evidence behind its proposed action, it should not take that action.
Give the agent a small, dependable evidence set
For a small team, the right starting point is not a sprawling observability project. Give the agent dependable telemetry for the customer-facing workflow it is expected to protect, then expand only where investigation repeatedly hits a blind spot.
Start with the path that matters: for example, a customer submits an order, the application records it, a payment service responds, and a confirmation is sent. For each step, record what succeeded, what failed, and where the request went next. The agent needs enough context to distinguish a failure inside your application from one reported by a dependency.
OpenTelemetry’s observability primer describes traces, metrics, and logs as telemetry an application can emit for troubleshooting. Each has a different job:
| Evidence | What it can tell the agent | What it cannot establish alone |
|---|---|---|
| Metrics | Whether errors, latency, traffic, or resource pressure changed | Which individual request failed and why |
| Traces | Which parts of a request path ran and where time or errors appeared | Whether a downstream error was the original cause |
| Logs | What an application recorded at a particular step | Whether missing or inconsistent records tell the full story |
Collection is only half the work. The records must also be joinable. A checkout failure is much easier to investigate when an application log, a trace, and a dependency error share consistent identifiers and service names. OpenTelemetry’s semantic conventions provide common names for telemetry across codebases and platforms. Its logging guidance makes an equally important point: encoding a log as JSON does not, on its own, give it a stable schema that can be parsed consistently.
For an agent, consistency beats volume. A smaller set of records with stable fields is more useful than a large collection of free-text messages it has to interpret differently for every service. Record what the user-facing operation was, which service handled it, whether it succeeded, and how to find related telemetry. Keep sensitive customer data out of diagnostic context unless the investigation genuinely requires it.
Before connecting an agent, ask a human operator to investigate a representative failure using the same dashboards and records. If that person cannot follow the request across the workflow, the agent will not acquire that missing visibility by reasoning harder.
Separate observations, hypotheses, and actions
A safe diagnostic agent should report three different things separately: what it observed, what it thinks may explain those observations, and what it proposes to do. Combining them into a confident-sounding sentence hides uncertainty at exactly the point where an operator needs to see it.
Suppose checkout errors rise after a deployment. The deployment is relevant evidence, but timing alone does not prove causation. The agent should look for affected request traces, compare them with unaffected requests, inspect dependency responses, and check whether the error appears in the newly deployed code path. If the payment provider is rejecting requests, rolling back your application may not restore checkout. If errors began in the changed application path while the dependency remains healthy, rollback becomes a more credible option.
The same discipline applies to missing data. “No database errors found” is not useful evidence if database logs stopped arriving before the incident. A missing signal should lower confidence, not silently count as a healthy signal.
A concise agent report could look like this:
Observed:
- Checkout requests are failing.
- Affected traces stop at the payment-provider call.
- Payment-provider responses show an error.
- Application logs are arriving; dependency health data is unavailable.
Hypothesis:
- The payment-provider interaction is involved.
- The available evidence does not establish whether our request
caused the error or the provider is unavailable.
Proposed next step:
- Notify the operator with affected request references.
- Do not restart the application or retry payments automatically.
- Investigate provider status and request handling before remediation.
This is not a failure of automation. It is a useful diagnostic result: the agent has narrowed the investigation, preserved the uncertainty, and avoided an action that could create duplicate work or additional customer impact.
Virtana’s UK enterprise survey reinforces why that distinction matters. In that survey, 75% of respondents said automated alerting was their first response to an AI workload failure, while 47% reported automatic root-cause identification across all infrastructure domains. Executives and infrastructure engineers also assessed that capability differently: 59% of executives, versus 34% of infrastructure engineers, said their organization could identify the root cause automatically across systems. These findings concern UK enterprises, not SMBs; they show why an agent’s diagnostic claims should be tested against the evidence an operator can actually inspect.
Put a gate between diagnosis and remediation
The agent’s ability to read telemetry should not automatically give it authority to change infrastructure. Define an action policy that distinguishes investigation, low-risk response, and potentially disruptive remediation before the first incident.
A practical policy asks: What is the proposed action? What evidence supports it? What could it affect? Can it be reversed? Who must approve it? What will stop further execution if the result is worse than expected?
| Agent proposal | Sensible default | Reason |
|---|---|---|
| Gather related traces and logs | Allow | Read-only investigation |
| Summarize evidence and page an operator | Allow | Keeps a person informed without changing production |
| Restart a service | Require approval | May disrupt healthy requests and obscure the original failure |
| Retry a customer-facing transaction | Require a workflow-specific review | May repeat an action the customer already completed |
| Change routing or scale multiple resources | Require approval and a bounded rollout | Can spread a mistaken diagnosis across the system |
These are starting decisions, not universal rules. A restart that is safe for an isolated worker may be risky for the service handling checkout. The policy should describe the actual workflow and its failure modes.
The control needs to exist in the execution path, not just in the agent’s instructions. An agent that has credentials to perform an unrestricted change can still make that change after producing a cautious-looking explanation. Restrict its permissions to the actions it is allowed to take, and make approval a separate system step for actions that need a person’s judgment.
This is an established runbook pattern. AWS Systems Manager Automation supports an approval step that pauses an automation until designated people approve or reject it. Its scale controls can limit concurrent execution and stop sending an automation to additional resources when an error threshold is reached. You do not need to use AWS Systems Manager to adopt the principle: separate the diagnosis from the authority to act, and limit the reach of every approved change.
Write the runbook for uncertainty, not just the happy path
A useful agent runbook tells the system when to stop. If it describes only the ideal signal and the ideal fix, it will be most dangerous during the messy incidents for which operators wanted help.
Below is an illustrative policy sketch, not a configuration file for a particular product. It makes missing evidence and ambiguous causes explicit outcomes:
workflow: checkout_incident
read_only_checks:
- confirm_customer_facing_errors
- inspect_affected_request_traces
- compare_application_and_dependency_errors
- check_telemetry_freshness
- identify_recent_changes
decision:
if_telemetry_is_missing_or_stale: escalate_without_remediation
if_multiple_causes_fit_evidence: escalate_with_hypotheses
if_cause_is_supported: propose_bounded_action
execution:
read_only_investigation: allowed
customer_notification: operator_review
service_restart: approval_required
transaction_retry: approval_required
broad_infrastructure_change: approval_required
after_action:
- verify_customer_facing_signal
- record_what_changed
- stop_and_escalate_if_result_is_unclear
The important line is if_telemetry_is_missing_or_stale. Without it, an agent may treat an empty dashboard as proof that a dependency is healthy. The after_action block matters just as much: an executed command is not a resolved incident. The agent must check the customer-facing symptom again and tell the operator whether the result supports the original hypothesis.
Keep the runbook narrow at first. Pick one recurring incident type with observable symptoms and a known escalation path. Define exactly which records the agent can read, what it must include in its report, and which actions remain human-controlled. When an incident falls outside that boundary, the agent should say so and hand it over.
For a founder or solo developer, this can be more useful than promising autonomous operations. A dependable report that gathers the relevant evidence and identifies what is missing reduces the work of starting an investigation, even when a human still makes the decision.
Test the handoff before trusting the agent
An operations agent is ready for production only when it behaves sensibly with incomplete or misleading evidence, not merely when it identifies an obvious error in a clean test. Exercise the handoff under the conditions that tend to confuse real investigations.
Use a non-production environment or a controlled test workflow. Give the agent cases such as a visible application error with healthy dependencies, a dependency failure that appears as an application error, stale telemetry, an unrelated deployment near the incident, and conflicting signals from different services. Ask it to produce the same report it would give during a live incident.
Review its behavior against a short checklist:
- Evidence: Can an operator open the records behind each important claim?
- Uncertainty: Does the agent distinguish a supported cause from a plausible hypothesis?
- Missing data: Does it notice when telemetry is absent or stale?
- Authority: Does it stop at the approval boundary?
- Verification: After an approved action, does it check the original customer-facing symptom?
- Escalation: Does its handoff tell the operator what to inspect next?
Do not mark a test successful because the agent produced a fluent explanation. Check whether its observations match the underlying records and whether its proposed action would have been safe if its hypothesis were wrong. Keep the failed tests; they are inputs for improving instrumentation, permissions, and the runbook.
If the agent repeatedly cannot distinguish causes, the next task is usually not prompt tuning. Find the missing signal, inconsistent field, or unobservable handoff. Improve that part of the system, then test again.
A practical starting point
Start with the workflow and the evidence: what failed, what telemetry exists, which checks are reliable, and where an operator needs to take over. Use those answers to define a narrow automation with explicit permissions, approval points, and an escalation report an operator can act on. Do not give an agent broad access and hope it diagnoses correctly.
If you are considering an operations agent, begin with one real incident or recurring failure. The outcome to look for is a clear boundary between what the agent can verify, what it can only suggest, and what a person must decide.
Work with BizFlowAI
If you'd rather have this built for you, that's what we do: production AI automation for solo founders and small teams — agents, integrations, and document pipelines that actually ship.
Request a free discovery call — 30 minutes, we map the highest-ROI automation in your workflow. No pitch deck, just engineering.
More guides like this on the BizFlowAI blog.
Frequently asked questions
What evidence should an AI agent check before fixing a production incident?
It should check customer-facing errors, latency, traffic, and resource saturation, then examine related traces, logs, and dependency responses. It should also verify that the telemetry is current and that records can be linked across services. An alert alone shows a symptom, not the cause or the right fix.
Can an AI operations agent diagnose a failure from an alert alone?
No. The same alert could result from an application bug, an exhausted database connection pool, a network fault, or an external provider. The agent needs request-level and service-level evidence before it can make a credible diagnosis.
How do I make logs, metrics, and traces useful to an incident-response agent?
Instrument the customer-facing workflow and use consistent service names, fields, and identifiers across telemetry. Metrics show changes in service behavior, traces follow requests, and logs record events at individual steps. Test whether a human can follow a failed request with those records before relying on an agent to do it.
When should an AI agent restart an application during an incident?
Only when the available evidence supports a problem that a restart could resolve and the action is permitted by an established policy. A restart may add disruption if the real cause is a payment provider, database limit, or other dependency. For potentially disruptive actions, the agent should present its evidence and seek the required approval.
How should an AI agent report an uncertain root cause?
It should separate observed facts, possible explanations, and proposed next steps. Missing telemetry should reduce its confidence rather than be treated as proof that a component is healthy. If the cause remains uncertain, the agent can gather more evidence and notify an operator without attempting remediation.