Abort mechanism shares failed dependency
Detect: The experiment cannot stop when the tested service fails.
Recover: Keep an independent control path and rehearse emergency shutdown.
Test explicit resilience hypotheses by injecting controlled infrastructure and AI-specific faults, then measuring whether workflow invariants survive.
Chaos engineering evaluates system behavior under deliberately introduced faults. For AI agents, faults include slow model responses, malformed tool output, stale retrieval, dropped streaming connections, duplicate events, and process termination between an external effect and its recorded receipt. The experiment tests an architectural claim, not simply whether the service can be made to fail.
A useful experiment names a steady-state measure, a fault, an expected containment boundary, and an automatic stop condition. Begin with deterministic fixtures and isolated environments; expand exposure only after observability and recovery are credible. Testing hallucination handling requires labeled semantic perturbations, not random text presented as a realistic failure model.
A prototype can inject a deterministic timeout into one tool and verify a visible, bounded failure response.
Production-readiness testing combines seeded replay, contract violations, crash injection, and assertions about duplicate effects and data boundaries.
Enterprise programs schedule controlled exercises, limit affected tenants, rehearse rollback, and convert every discovered weakness into a repeatable regression scenario.
Selects scope, fault duration, eligible traffic, and emergency stop conditions.
Introduces transport, process, dependency, or semantic faults at known boundaries.
Measures user-visible completion, latency, queue growth, and business invariants.
Provide reproducible tasks with expected evidence and allowed outcomes.
Verifies that the system returns to acceptable operation after injection stops.
flowchart TD
H["Hypothesis and stop conditions"] --> B["Baseline task replay"]
B --> I["Inject duplicate delivery"]
I --> W["Agent workflow"]
W --> L["Effect ledger"]
L --> V["Assert one business effect"]
V --> R["Remove fault and verify recovery"]
W --> S["Abort on unsafe invariant"]Specify which workflow should remain available or recoverable under one concrete fault.
Run representative tasks and confirm telemetry can distinguish normal variability from failure.
Select an isolated test tenant or small approved traffic slice and configure abort thresholds.
Apply the failure at a documented point with an experiment identifier in traces.
Check duplicate actions, missing evidence, deadline behavior, and recovery status alongside availability.
Remove the fault, verify recovery, and preserve the failing case as a regression test.
Travel operations · Illustrative enterprise scenario, not a reported customer outcome.
A travel-service agent proposes rebooking options and reserves approved alternatives.
A timeout after reservation can trigger a duplicate booking during retry.
Demonstrate that recovery reconciles the original reservation before issuing another command.
A test supplier adapter creates a reservation but suppresses its response; the agent uses an effect ledger and stable booking key.
If two bookings appear, the experiment stops, releases test reservations, and records the exact event sequence.
Measure invariant violations, detection time, and recovery duration; passing one experiment supports only the tested fault and workload conditions.
| Decision | Benefit | Cost |
|---|---|---|
| Deterministic fault replay | Makes failures reproducible. | May miss interactions present only in live traffic. |
| Production experiments | Reveal real dependency and capacity behavior. | Require tight scope, stop controls, and operational ownership. |
| Semantic corruption tests | Exercise evidence and validation boundaries. | Need carefully labeled expected outcomes to avoid subjective scoring. |
Detect: The experiment cannot stop when the tested service fails.
Recover: Keep an independent control path and rehearse emergency shutdown.
Detect: Service remains degraded after the injector stops.
Recover: Drain bounded queues and verify recovery before ending the exercise.
Define measurable expected behavior first.
Include duplicate events, malformed content, and ambiguous side effects.
Assert business invariants and recovery time explicitly.