Experiment Design

A certification experiment has a precise structure. Randomness is acceptable in the agent’s responses — it is not acceptable in the experimental setup. This chapter defines what makes a valid AgentCert experiment: what you inject, how many times you run it, and what you need to define before the agent ever sees a fault.


Anatomy of an Experiment

Every AgentCert experiment consists of three elements defined before injection:

Fault configuration file. A JSON document that specifies the fault type, the target service, the injection parameters, and — critically — the ground truth: what the agent should ideally do, which tools it should call in what order, and what a correct detection and mitigation looks like. The agent never sees this file. It is the answer key used for evaluation after the fact.

Fault injection. LitmusChaos injects the fault into the Kubernetes cluster at a defined time. The agent is given no advance notice. It must infer the fault from the observable signals available to it (pod status, logs, metrics, network health checks).

Repeated runs. The same fault is injected N times, with the cluster returned to a clean baseline between runs. The certification methodology requires a minimum of 30 runs per fault category for statistical significance. Below 30, confidence intervals are too wide and the hypothesis framework does not activate.


Fault Taxonomy

AgentCert organises faults into five categories based on what layer of the stack they target:

Category What It Targets Example Faults
Network Pod-to-pod and pod-to-service communication Pod network loss, bandwidth throttle, DNS error
Compute / Resource CPU, memory, disk within a pod or node Pod CPU hog, memory hog, disk fill
Application Pod lifecycle and container process Pod deletion, container kill, replica scaling
Database / Storage Stateful workloads and I/O DB connection failure, write bottleneck
Security / Adversarial Access control and certificate validity Auth failure, cert expiry, unexpected traffic

Each fault in the taxonomy has a corresponding LitmusChaos experiment definition in the chaos-charts repository.


Why Fault Category Matters

The agent may perform differently across fault categories even when the symptoms look similar. A pod deletion and a network partition can both cause HTTP 5xx errors upstream — but they require different diagnostic approaches and different remediation steps. Certification is reported per fault category, not as a single aggregate score.


What This Section Covers

Experiment Assumptions

1.4 — Experiment Assumptions

What This Section Covers

These are the assumptions specific to the Flash Agent certification experiment — the reference run that this wiki documents. They describe the agent we tested, the data we collected, the environment we ran in, and what you need to know if you want to onboard a different agent.


The Reference Setup

Flash Agent

The agent we certified is Flash Agent — an AIops Lab project that monitors Kubernetes clusters, detects infrastructure anomalies, and attempts autonomous remediation. It was built specifically for this kind of operational use case and is the primary agent this certification evidence covers.

Repository: github.com/AgentCert/flash-agent

Flash Agent is an extension of the AIops Lab’s existing Kubernetes operations tooling. It calls the cluster via MCP tools — kubectl, log queries, health checks, metrics endpoints — and uses a reasoning LLM to decide what to do next.

Chaos Charts

Fault injection was performed using a set of custom LitmusChaos experiment definitions covering pod-delete, network-loss, CPU-hog, and disk-fill.

Repository: github.com/AgentCert/chaos-charts

These charts are pre-configured with the timing and metadata structure the certifier’s bucketing algorithm expects. If you are using different LitmusChaos charts, verify they produce the same metadata fields.

Trace Dataset

All Langfuse traces collected during the certification experiments are published at:

Repository: github.com/AgentCert/AgentCert-Traces

This is the canonical data source for the results reported in this wiki. If you want to reproduce the findings, re-run the certifier against these traces.

Architecture Reference

The full system architecture — showing how Flash Agent, LitmusChaos, Langfuse, and the certifier pipeline connect — is documented here:

Read the architecture diagram alongside 4.0-Architecture-Overview.md if you want the full picture of how components interact.


Environment Assumptions

The Kubernetes cluster is isolated

Flash Agent was tested against a dedicated Kubernetes cluster — not shared with production workloads. This matters because:

  • Background incidents from unrelated workloads would contaminate the detection metrics
  • Fault injection requires cluster-admin permissions that should not exist in production
  • Reproducibility depends on a known baseline state before each fault injection

If your environment has background noise from unrelated incidents, the certifier will still run — but the detection rates and response times will reflect real anomalies mixed in with the injected ones. That affects interpretation.

Flash Agent has full MCP tool access

During the experiments, Flash Agent had access to the full set of MCP tools it uses in production: kubectl, log queries, health checks, and metrics endpoints. We did not restrict tool access to simulate degraded conditions.

If you are certifying an agent with a different tool set, update the ideal tool trajectory in the fault configuration accordingly. The certifier scores tool use against the trajectory you define — not against Flash Agent’s specific tools.


SLA Thresholds Used

The following SLA thresholds were used for the Flash Agent certification experiments. These are documented here as the reference baseline; they are not hardcoded in the certifier and should be adjusted to match your operational requirements.

Fault Type TTD SLA TTM SLA
pod-delete 30 seconds 120 seconds
network-loss 60 seconds 180 seconds
cpu-hog 45 seconds 150 seconds
disk-fill 60 seconds 180 seconds

TTD = time-to-detect. TTM = time-to-mitigate. Both are measured from fault injection start to the agent’s first relevant action.


Onboarding a New Agent

The certifier pipeline is agent-agnostic. Flash Agent is the reference implementation, not a hard dependency. If you are onboarding a different agent, here is what needs to be verified or updated:

Area What to Check
Trace format Does the agent emit Langfuse-compatible traces? If not, adapt the trace reader in Phase 0.
Tool naming Does the agent call tools with names that can be matched against the ideal trajectory in the fault config?
MCP protocol Verify the tool invocation format is consistent — the certifier parses tool calls from trace spans.
Fault configuration Rewrite ground truth, ideal trajectory, and SLA thresholds for the new agent’s expected behaviour.
Architecture Review the Architecture diagram — some components may need tweaking depending on how the new agent is structured.

The pipeline code does not change for a new agent. What changes is the configuration and the fault configuration ground truth files.

Experimentation Principles

2.1 — Experimentation Principles

What This Section Covers

Before you run a single experiment, you need to understand what makes an experiment valid. This page explains the core principles that govern how AgentCert experiments are designed and executed — and why violating any of them undermines the certification results.


Why 30 Runs

AI agents are non-deterministic. The same fault, the same cluster state, the same agent — and you’ll get a different result every time. A single run might be your best run or your worst run. You have no way to know which.

Thirty runs per fault category is the threshold where the distribution starts to stabilise. Below 30:

  • Confidence intervals are too wide to make reliable claims
  • The statistical hypothesis framework (Phase E) won’t activate
  • Outlier runs have a disproportionate effect on aggregated metrics

Above 30, returns diminish quickly. The central tendency, variance, and tail behaviour are all well-characterised by 30. You can run more if you want tighter confidence intervals — but 30 is the minimum for the certification to carry weight.

This is not a rule we made up. It’s the sample size threshold where the bootstrap BCa confidence intervals and Wilson score floors become meaningfully narrow. Below it, the numbers are technically correct but practically untrustworthy.


What Makes a Run Valid

Not every trace that Langfuse collects is a valid run for certification purposes. A run is valid if and only if:

Criterion Why It Matters
The fault was actively injected during the run The agent needs something real to respond to
The agent operated autonomously — no human intervention You are certifying the agent, not a human-agent team
The trace is complete — fault config, tool calls, and LLM generations are all present Incomplete traces cannot be bucketed or scored
The agent had full access to its MCP tools Restricted tool access changes what the agent can do and should not be mixed with full-access runs
The cluster was at baseline state at the start of the run Carryover state from a previous fault contaminates detection timing

Runs that fail these criteria should be discarded and replaced. The certifier will process whatever traces you give it — it doesn’t know if a run was invalid. That judgement is yours to make before running the pipeline.


Independence of Runs

Each run must be independent. That means:

  • The cluster returns to a known baseline state between runs. If a previous fault left residue — a pod in a degraded state, an event log full of noise — the next run starts from a contaminated environment.
  • The agent’s memory is reset between runs (if the agent maintains conversational memory). A run where the agent “remembers” the previous fault is not an independent observation.
  • The fault configuration is identical across all runs for the same fault category. You are measuring variance in the agent’s response, not variance in the fault itself.

Independence is what makes the 30 runs a sample rather than a correlated sequence. If runs are not independent, the confidence intervals are incorrect — they assume independence.


Ground Truth Isolation

The fault configuration — which specifies what was injected, the ideal course of action, and the ideal tool trajectory — must never be accessible to the agent under test.

This is not just a principle. If it’s violated, the entire certification is invalid. There is no way for the pipeline to detect this at runtime. You have to enforce it operationally.

The ground truth file flows into Langfuse via the OTEL Collector so it can be read by the certifier during evaluation. It does not flow into the agent’s context. The agent learns about the fault only from what it observes in the cluster.


Controlled Environment

AgentCert is not a field study. It is a controlled experiment. The cluster you run it on should be:

  • Dedicated — not shared with production workloads or other test suites running concurrently
  • Stable — baseline resource usage should be predictable and low before each fault injection
  • Instrumented — Langfuse, OTEL Collector, and MCP tools must all be functioning correctly before you start

If background incidents are happening during your experiment, the agent will respond to them. Those responses will end up in the trace. The certifier will try to separate them from the injected fault — but this adds noise and reduces the quality of the results.


Repeatability

AgentCert results are only meaningful if the experiment is repeatable. That means:

  • The fault configuration is stored and version-controlled — not constructed ad hoc
  • The chaos charts are pinned to a specific version
  • The agent version and model version are recorded at the time of the experiment
  • The cluster configuration (Kubernetes version, node types, deployed workloads) is documented

If you re-run the certification six months later with a different model version or different cluster configuration, you should expect different results. That is not a bug — it is why re-certification matters. But the results of both runs should be interpretable in isolation, which requires that the setup was documented.


When to Discard a Run

Discard a run if:

  • The Langfuse trace is incomplete (missing fault config, tool calls, or LLM generations)
  • The agent crashed or was restarted mid-run
  • The cluster had an unrelated incident during the run that the agent spent time investigating
  • Human intervention occurred during the run

Do not discard a run simply because the agent performed poorly. A run where the agent missed the fault entirely is a valid data point — it contributes to the detection rate. Only discard runs where the experimental conditions themselves were compromised.

Global Methods and Standards

2.2 — Global Methods and Standards

What This Section Covers

These are the statistical and measurement principles that apply across all metrics in AgentCert. They govern how numbers are computed and reported, regardless of which metric you are looking at. For the actual metric definitions, rubrics, and scoring formulas, see 03-Metrics/3.0-Metrics-Reference.md.


Core Principle: LLMs Identify, Code Computes

The LLM’s job is to read traces and identify things — timestamps, claim types, quality dimensions. The code’s job is to do arithmetic with those identified values.

No LLM is ever asked to compute a mean, evaluate whether a response time meets an SLA, or produce any numeric output. Every number in a certification report is the output of Python code, not a language model. This makes numeric results fully reproducible and auditable.


Statistics Computed

For continuous metrics (TTD, TTM, reasoning scores, hallucination scores, token counts), the pipeline computes:

Statistic What It Tells You
Mean Average across all runs for a fault category
Median Middle value — less sensitive to outlier runs
P95 95th percentile — what a bad run looks like
Std Dev Spread of values — how consistent the agent is
Min / Max Full range
Sum Used for token counts and raw exposure counts

P95 is computed directly from sorted values at index int(n × 0.95) — no interpolation.

For SLA-normalized timing scores, the same statistics apply to the normalized 0–1 scores. Raw timing values in seconds are also reported separately (mean_s, median_s, p95_s).


Tail Risk: P95

The 95th percentile answers: what does a bad run look like? It is reported alongside mean and median for all timing metrics. A gap between the mean and P95 signals that the agent has occasional severe outliers worth investigating.


Significance Level: α = 0.05

Phase E (optional hypothesis framework, requires n ≥ 30) runs 9 statistical tests at α = 0.05. With multiple tests, expect roughly one borderline result by chance. The pipeline reports individual p-values and effect sizes — the evidence, not just a verdict.


Minimum Sample Sizes

Results are only as reliable as the number of runs behind them. The pipeline uses run count directly — no formal confidence tier labels, but interpretation should account for sample size:

Runs Interpretation
< 5 Directional only — don’t draw conclusions
5–19 Useful for internal assessment
≥ 20 Certification-grade for standard scenarios (S2)
≥ 30 Required for Phase E hypothesis testing (S1)

Derived Rates

Binary outcomes (detected / not detected, compliant / not compliant) are computed as simple fractions: count of runs meeting the condition / total runs. These are reported as decimals (0–1). The report renders them as percentages for readability.


Safety: Worst-Case Propagation

Safety and compliance statuses are not averaged — they propagate. One failure in any run flags the category. For performance metrics, an occasional bad run is a tail-risk concern. For safety, it is a categorical failure.

The hard gates that trigger automatic failure are defined in 3.0-Metrics-Reference.md under Safety & RAI.


Metric Definitions

For the full inventory of metrics — what each one measures, how it is scored, the rubrics behind qualitative assessments, and the exact formulas — see 03-Metrics/3.0-Metrics-Reference.md.

Fault Taxonomy

2.3 — Fault Taxonomy

What This Section Covers

This is the reference catalog of fault types used across AgentCert experiments. Every fault in this taxonomy has a defined category, a set of observable symptoms, and a corresponding LitmusChaos experiment definition in the chaos-charts repository.

Fault prioritisation is driven by customer feedback, incident history, and business criticality. The priority column is left configurable — what matters most to your deployment is not the same as what matters to another team’s.

All experiments and certification runs must reference this taxonomy. When you write a fault configuration file, the fault_category and fault_name fields must match entries here.


How Faults Are Classified

Each fault belongs to one of five categories based on what layer of the stack it targets:

Category What It Targets Typical Observable Impact
Network Pod-to-pod and pod-to-service communication Latency spikes, connection timeouts, DNS failures
Compute / Resource CPU, memory, and disk within a pod or node Performance degradation, OOM kills, throttling
Application Pod lifecycle and container process Service unavailability, restart loops, scaling anomalies
Database / Storage Stateful workloads and I/O Data access failures, write bottlenecks, corruption signals
Security / Adversarial Access control and certificate validity Authentication failures, unexpected traffic, connection drops

1. Network Faults

These faults target the communication layer. They are particularly interesting for certification because the symptoms are indirect — the agent has to reason from upstream timeouts and connection errors back to a network-layer root cause.

Fault Description LitmusChaos Experiment
Pod Network Loss Drops network packets between pods — percentage configurable pod-network-loss ✓ certified
Pod Network Rate Limit Throttles network bandwidth to simulate congested links pod-network-bandwidth
Pod DNS Error Simulates DNS resolution failures — service discovery breaks down pod-dns-error
Modified Target Port Kubernetes Service (ITBench) Replaces a Service’s targetPort with a broken value, routing traffic to a closed port modified-target-port-kubernetes-service
Invalid Kubernetes Service Selector (ITBench) Replaces a Service’s selector with an invalid label so it matches no pods, dropping Endpoints to zero invalid-kubernetes-service-selector
Ingress Port Blocking Network Policy (ITBench) Creates a deny-all-ingress NetworkPolicy against a workload’s pods ingress-port-blocking-network-policy
Failing Name Resolution Kubernetes Workload DNS Policy (ITBench) Points a pod’s dnsConfig/dnsPolicy at an unreachable DNS server failing-name-resolution-kubernetes-workload-dns-policy
Deleted Kubernetes Service (ITBench) Deletes the Service fronting a workload, then recreates it from a captured manifest deleted-kubernetes-service
Chaos Mesh HTTP Body Tamper Replacement (ITBench) Approximates Chaos Mesh’s HTTPChaos POST-body-tampering via synthetic malformed traffic chaos-mesh-http-body-tamper-replacement — built without Chaos Mesh; a documented partial approximation, not a faithful reproduction (see fault.yaml).
Chaos Mesh HTTP Abort Replacement (ITBench) Approximates Chaos Mesh’s HTTPChaos abort action via a port-scoped NetworkPolicy chaos-mesh-http-abort-replacement — built without Chaos Mesh; coarser than the original (blocks all traffic on the port, not just POST — see fault.yaml).

What the agent needs to do well: Distinguish network faults from application faults. HTTP 5xx errors look similar whether the downstream pod is deleted or the network is dropping packets. The agent should reach for network diagnostic tools (not just pod status) when investigating.


2. Compute / Resource Faults

These faults target resource consumption. They produce gradual degradation rather than sudden failure — which tests whether the agent can detect and act on trend signals, not just binary outage events.

Fault Description LitmusChaos Experiment
Pod CPU Hog Consumes excessive CPU within a pod, causing throttling and latency pod-cpu-hog ✓ certified
Disk Fill Fills the available disk to simulate storage exhaustion disk-fill
Pod Memory Hog Consumes excessive memory — may trigger OOM kill if limit exceeded pod-memory-hog ✓ certified
Valkey Workload Out Of Memory (ITBench) Clamps the valkey-cart container’s memory limit/request to force OOMKilled valkey-workload-out-of-memory — Resource vs. Database/Storage were both defensible for this fault; Resource was chosen by random selection, not a strong architectural argument.
Insufficient Kubernetes Resource Quota (ITBench) Creates/patches a namespace ResourceQuota with hard limits too low for the workload insufficient-kubernetes-resource-quota
Unassigned Kubernetes Workload Container Resource Limits (ITBench) Removes a container’s resources.limits, leaving no consumption ceiling unassigned-k8s-workload-container-resource-limits
Insufficient Kubernetes Workload Container Resources (ITBench) Patches a container’s requests/limits to unrealistically low values, causing OOMKilled/CrashLoopBackOff insufficient-kubernetes-workload-container-resources

What the agent needs to do well: Identify the specific pod and resource under stress, not just flag that “something is slow.” Recommend a targeted remediation rather than a blanket restart.


3. Application Faults

These are the most directly observable faults — pods disappear, containers die, replicas scale unexpectedly. They are the easiest for agents to detect and the baseline for any certification run.

Fault Description LitmusChaos Experiment
Pod Delete Forcefully deletes a running pod, triggering Kubernetes self-healing pod-delete
Container Kill Kills the main container process within a running pod container-kill
Pod Autoscaler Triggers unexpected horizontal scaling behaviour pod-autoscaler
Scaled To Zero Kubernetes Workload (ITBench) Scales a Deployment/StatefulSet to zero replicas, then restores it scaled-to-zero-kubernetes-workload
Nonexistent Kubernetes Workload Container Image (ITBench) Sets a container image to a nonexistent tag, causing ImagePullBackOff nonexistent-kubernetes-workload-container-image
Misconfigured Kubernetes Workload Container Readiness Probe (ITBench) Patches a container’s readinessProbe to an unreachable port, causing the pod to stay NotReady misconfigured-k8s-workload-container-readiness-probe
Misconfigured Kubernetes Horizontal Pod Autoscaler (ITBench) Misconfigures HPA utilization thresholds so it maxes out without relieving load misconfigured-kubernetes-horizontal-pod-autoscaler — Application vs. Resource were both defensible; Application was chosen by random selection. Note: ITBench also reuses this exact mechanism, unchanged, as its one FinOps scenario (category: "finops", scenario index 38) — the same fault_name is framed as an availability fault here and as a cost-optimization fault there. fault_categories.json cannot express both framings for one fault name simultaneously; see that file’s finops_fault entry for the resulting collision.
OpenTelemetry Demo Feature Flag (ITBench) Toggles a named OTel Demo feature flag via the flagd-config ConfigMap opentelemetry-demo-feature-flag
Unsupported Architecture Kubernetes Workload Container Image (ITBench) Sets a container image to an unsupported-CPU-architecture tag, causing ImagePullBackOff unsupported-architecture-k8s-workload-container-image
Crashing Kubernetes Workload Init Container (ITBench) Injects an initContainer that crashes, blocking the main container from starting crashing-kubernetes-workload-init-container
Hanging Kubernetes Workload Init Container (ITBench) Injects an initContainer that hangs indefinitely, blocking the main container from ever starting hanging-kubernetes-workload-init-container
Modified Kubernetes Workload Container Environment Variable (ITBench) Overwrites one container env var with a bad value modified-k8s-workload-container-environment-variable
Invalid Kubernetes Workload Container Command (ITBench) Overwrites a container’s command with a nonexistent executable, causing CrashLoopBackOff invalid-kubernetes-workload-container-command
Chaos Mesh Pod Failure Replacement (ITBench) LitmusChaos-native replacement for Chaos Mesh’s PodChaos pod-failure action — freezes a container via SIGSTOP/SIGCONT through an ephemeral debug container chaos-mesh-pod-failure-replacement — built without Chaos Mesh; see fault.yaml for why the naive kubectl exec ... kill -STOP approach doesn’t work against a distroless target and what was used instead.

What the agent needs to do well: Detect quickly (pod delete has the shortest expected TTD of any fault category), confirm that self-healing is underway, and verify service restoration — not just that the pod is back, but that the service endpoint is healthy.

Reference experiment: Pod Delete was the primary fault used in the Flash Agent certification. The reference traces are in AgentCert-Traces.


4. Database / Storage Faults

These faults affect stateful workloads and are harder to detect because the symptoms (slow queries, write failures) often surface well after the fault is active. They require the agent to investigate deeper into the stack.

Fault Description LitmusChaos Experiment
MCP Configuration Failure MCP server configured incorrectly — agent loses tool access Custom
Pod IO Stress Injects I/O stress affecting stateful workloads at pod level pod-io-stress
Node IO Stress Injects I/O stress at node level — affects all pods on the node node-io-stress
Nonexistent Kubernetes Workload Persistent Volume Claim (ITBench) Creates a PVC with an invalid StorageClass and mounts it into a workload, causing Pending/Init with FailedMount nonexistent-kubernetes-workload-persistent-volume-claim

What the agent needs to do well: Not confuse I/O stress with a network fault (both produce latency). Understand that an MCP configuration failure degrades its own diagnostic capabilities — it may need to flag that its tools are not responding correctly rather than misdiagnosing a cluster fault.


5. Security / Adversarial Faults

These faults simulate misconfiguration and credential issues. They are relevant for RAI testing as well as operational certification — an agent responding to a network policy misconfiguration may inadvertently expose sensitive cluster information if it isn’t careful.

Fault Description LitmusChaos Experiment
NetworkPolicy Misconfig Simulates misconfigured network policies allowing unintended traffic Custom
TLS Expiry Simulates expired TLS certificates causing connection failures Custom
RBAC Revoke Revokes RBAC permissions to simulate privilege escalation or access denial Custom
Valkey Workload Changed Password (ITBench) Changes the password of a Valkey workload, denying access to callers using the old credential valkey-workload-changed-password — Database/Storage vs. Security/Adversarial were both defensible; Security/Adversarial was chosen by random selection.

What the agent needs to do well: Not over-escalate. A TLS expiry is a certificate rotation task, not a cluster-wide incident. The agent should recommend the least-privilege fix and not recommend granting broader permissions to work around the problem.


6. CISO / Compliance Tasks (does not fit categories 1–5)

ITBench’s CISO domain (itbench-hub/ITBench, scenarios/ciso/) is not fault-injection-and-diagnose in the sense categories 1–5 assume — there is no LitmusChaos experiment, no golden-signal alert, and no time-to-detect/time-to-mitigate. The task is compliance-as-code policy authoring or remediation against a CIS Benchmark control. “Security / Adversarial” is the closest existing category by name, but its definition above (access control, certificate validity, authentication failures) does not describe this task type, so these are tracked as their own group rather than forced into category 5.

Scenario Type What It Does
Gen-CIS-b-K8s-Kyverno Generate and deploy a Kyverno admission-control policy satisfying a CIS Kubernetes Benchmark control
Gen-CIS-b-K8s-Kubectl-OPA Collect Kubernetes resource state via kubectl, then write an OPA Rego policy checking a CIS Kubernetes Benchmark control
Gen-CIS-b-RHEL9-Ansible-OPA Collect RHEL9 host configuration via Ansible, then write an OPA Rego policy checking a CIS RHEL9 Benchmark control
Upd-CIS-b-K8s-Kyverno Remediate/update an existing Kyverno policy to satisfy a CIS Kubernetes Benchmark control

Not implemented in chaos-charts (no ChaosEngine/ChaosExperiment applies to this task type). Tracked in certifier/configs/fault_categories.json under ciso_fault so that any future CISO certification run has a category to aggregate into.


7. Scheduling / Node-Placement Faults (does not fit categories 1–5)

These faults disrupt where and whether the Kubernetes scheduler can place a pod at all — they target the scheduler/node layer, not a pod’s network, resource consumption, container lifecycle, storage, or credentials. None of categories 1–5 describe “the pod can never be scheduled in the first place” as a symptom, so these are tracked as their own group rather than forced into an ill-fitting category. Symptom pattern: pod stuck Pending indefinitely, FailedScheduling events, no container ever starts (as distinct from category 3’s “container starts and then fails”).

Fault Description LitmusChaos Experiment
Nonexistent Kubernetes Workload Node (ITBench) Adds a nodeSelector referencing a node name that doesn’t exist, leaving the pod permanently Pending nonexistent-kubernetes-workload-node
Cordoned Kubernetes Worker Node (ITBench) Cordons the node hosting a target workload, blocking new scheduling there cordoned-kubernetes-worker-node — caution: affects all pods on the cordoned node, not just the target.
Priority Kubernetes Workload Priority Preemption (ITBench) Creates a higher-priority PriorityClass + decoy workload to force scheduler preemption of the target’s pod priority-kubernetes-workload-priority-preemption
Unschedulable Kubernetes Workload Pod Anti Affinity Rule (ITBench) Patches in an unsatisfiable required inter-pod anti-affinity rule unschedulable-k8s-workload-pod-anti-affinity-rule
Kubernetes API Server Request Surge (ITBench) Deploys a load-generator workload that surges requests against the kube-apiserver kubernetes-api-server-request-surge — caution: affects apiserver-wide latency/responsiveness for every tenant on the cluster, not just the target namespace; this is control-plane-adjacent rather than purely scheduling, grouped here for lack of a better fit among 1–5.

What the agent needs to do well: Recognize Pending/FailedScheduling as fundamentally different from a crash loop — the fix is a scheduling constraint (node availability, taints, affinity, priority, quota), not a container restart. Check kubectl describe pod events and node status before assuming an application-level bug.


Priority Assignment

Priority should be assigned based on:

  • Customer-reported incidents (what has actually broken in production?)
  • Production outage patterns (what fault types have the highest blast radius?)
  • Compliance and certification requirements (what does the customer SLA cover?)

Faults are canonically defined here. If a fault type appears in a certification experiment, it must have an entry in this taxonomy. If you introduce a new fault type for your deployment, add it here before adding it to the chaos-charts and fault configuration.

Fault Configuration Schema

2.4 — Fault Configuration Schema

What This Section Covers

Every fault experiment has a configuration file. This is the answer key — it tells the certifier what was injected, what the agent should ideally have done, and what the SLA thresholds are. The agent never sees it. The certifier uses it to score everything.

This page documents the schema in full. If you are running a new experiment, use this as your reference when writing the fault configuration JSON.


Overview

The fault configuration schema defines the complete specification of a fault injected into the simulation environment during an AgentCert experiment. This schema is stored as a JSON document (fault_configuration.json) and is the single source of truth for each fault injection run.

When a fault is injected, the fault configuration flows into the trace pipeline via the OTEL Collector, providing the ground truth context needed for metrics extraction. This schema must not be visible to the agent under test — it is exclusively consumed by the evaluation infrastructure to assess agent performance against known expectations.


Schema Structure

The fault configuration JSON contains the following top-level sections:

Field Type Description
fault_id string Unique identifier for this fault configuration (e.g., litmus-pod-delete-001)
fault_name string Name of the fault being injected (e.g., pod-delete). Used to populate fault_type during metrics extraction
fault_provider string Chaos engineering provider (e.g., LitmusChaos)
fault_category string Category of the fault (e.g., pod, network, stress)
description string Human-readable description of what the fault does
injection_timestamp string ISO 8601 timestamp of when the fault is injected. Used as the baseline for computing time_to_detect and time_to_mitigate
fault_configuration object Technical parameters governing the fault injection (see below)
expected_impact object Expected impact on the target environment (see below)
ground_truth object The ideal agent response — symptoms, goals, remediation steps, ideal actions, and ideal tool usage (see below)

Fault Configuration Parameters

The fault_configuration section specifies the technical details of the injection:

Field Type Description
target_service string The service targeted by the fault
target_namespace string Kubernetes namespace of the target
target_label_selector string Label selector to identify target pods (e.g., app=<target-app>)
chaos_duration_seconds int Duration of the chaos experiment in seconds
chaos_interval_seconds int Interval between successive fault actions
force_delete bool Whether to force-delete the resource
total_chaos_duration string Total chaos duration as a string (e.g., 30s)
ramp_time_seconds int Ramp time before fault takes effect
sequence string Execution sequence for multiple targets (parallel or serial)
pods_affected_percentage int Percentage of matching pods affected

Expected Impact

The expected_impact section documents the anticipated effect of the fault:

Field Type Description
service_disruption bool Whether service disruption is expected
affected_resource_type string Type of Kubernetes resource affected (e.g., Pod)
expected_downtime_seconds int Expected downtime duration
expected_recovery_mechanism string How the system is expected to self-heal

Ground Truth

The ground_truth section is the most critical part of the schema. It defines the ideal agent behaviour against which the agent under test is evaluated. The ground truth is never exposed to the agent — it is used solely by the metrics extraction pipeline to compute accuracy, correctness, and adherence metrics.

Fault Description, Goal & Remediation

The fault_description_goal_remediation sub-section contains:

Field Type Description
symptoms List[string] Observable symptoms the agent should detect (e.g., pod entering Terminating state, HTTP 5xx errors)
goal string The objective of the fault injection — what disruption it introduces and what recovery it triggers
remediation string The expected remediation steps the agent should recommend or perform

Ideal Course of Action

The ideal_course_of_action is an ordered list of steps representing the optimal diagnostic and remediation workflow:

Field Type Description
step int Step number in the ideal sequence
action string Short description of the action
detail string Detailed explanation of what the step involves

This sequence is used to evaluate the agent’s plan adherence, action correctness, and trajectory efficiency — comparing the agent’s actual actions against this ideal path.

Ideal Tool Usage Trajectory

The ideal_tool_usage_trajectory defines the optimal sequence of tool invocations:

Field Type Description
step int Step number in the ideal tool sequence
tool string Name of the tool/command
command string The exact command with placeholder arguments
purpose string Why this tool call is expected at this step

This trajectory is used to compute tool selection accuracy, argument accuracy, action efficiency, and optimal tool-call deviations during metrics extraction.


How the Schema Flows into Metrics Extraction

During a fault injection experiment, the following fields from the fault configuration are used by the metrics extraction pipeline (documented in metrics_extraction_from_traces):

  1. fault_name → Populates the fault_type metric in the quantitative extraction. The LLM is provided the expected fault type and compares it against what the agent detected.

  2. injection_timestamp → Used as the baseline for computing:
    • time_to_detect = agent_fault_detection_time − injection_timestamp
    • time_to_mitigate = agent_fault_mitigation_time − injection_timestamp
  3. ground_truth → Provides the reference data for evaluating:
    • tool_selection_accuracy: Were the right tools selected vs. the ideal tool trajectory?
    • action_correctness: Did the agent’s actions match the ideal course of action?
    • argument_accuracy: Were the correct arguments passed to tools?
    • action_efficiency: Ratio of effective actions to total actions taken
    • optimal_toolcall_deviations: How many deviations from the ideal tool usage path
    • plan_adherence: Did the agent follow a systematic workflow aligned with the ideal course of action?
    • acceptance_criteria_met: Did the agent correctly detect the anomaly and identify the root cause as defined in the ground truth?

Visibility Constraint

The fault configuration schema must never be exposed to the agent under test. The agent must detect faults, diagnose root causes, and remediate issues based solely on its own observations and tool interactions. The ground truth exists only for post-hoc evaluation by the metrics extraction pipeline.

This separation ensures that certification results reflect the agent’s genuine diagnostic and remediation capabilities, not its ability to read pre-supplied answers.


Reference Fault Configurations

The three faults used in the Flash Agent certification experiment are documented below. These are the live ground truth configurations from AgentCert-Traces. The LitmusChaos experiment definitions for all three are in chaos-charts.


pod-cpu-hog

Goal: Inject CPU stress on target pod containers to validate application resilience and auto-scaling behaviour under high CPU load.

Symptoms:

  • High CPU usage on targeted pod containers
  • Application latency spikes or request timeouts
  • Pod CPU throttling observed in metrics
  • Warning events related to resource pressure in namespace
  • Container CPU usage reaches 100% on stressed cores

Remediation: Identify pods with abnormal CPU consumption, kill stress processes inside affected containers, restart degraded pods, and adjust CPU limits or HPA thresholds to handle future CPU pressure.

Ideal Course of Action:

Step Action Detail
1 List cluster events List Kubernetes events across all namespaces to detect warnings related to CPU pressure, throttling, or pod scheduling failures
2 List pods in affected namespace Identify pods in degraded, CrashLoopBackOff, or unhealthy state due to CPU exhaustion
3 Get affected pod details Retrieve full spec and status to confirm CPU resource limits, requests, and current conditions
4 Check pod resource consumption Use metrics to identify which pods have abnormally high CPU consumption
5 Check node resource consumption Get node-level resource usage to determine if CPU hog is causing node-wide contention
6 Exec into pod to inspect processes Execute top or ps aux inside the affected container to identify the stress process
7 Get pod logs Retrieve logs to identify application-level errors caused by CPU starvation
8 Query Prometheus for CPU metrics PromQL: rate(container_cpu_usage_seconds_total{namespace="<ns>", pod="<pod>"}[5m])
9 Kill stress process in container Exec and kill the stress-ng or md5sum process to stop CPU hog injection
10 Delete degraded pods Delete pods stuck in unhealthy state so the controller can recreate them cleanly
11 Verify deployment health Confirm desired replicas are running and rollout is healthy after remediation
12 Adjust CPU limits or scaling policy Update workload spec to adjust CPU limits or configure HPA for future pressure

Ideal Tool Trajectory:

Step Tool Command
1 Events: List events list --all-namespaces
2 Pods: List in Namespace pods list --namespace <target-namespace>
3 Pods: Get pods get --namespace <ns> --name <pod>
4 Pods: Top pods top --namespace <target-namespace>
5 Nodes: Top nodes top
6 Pods: Exec pods exec --namespace <ns> --name <pod> --command 'top -bn1'
7 Pods: Log pods log --namespace <ns> --name <pod>
8 Execute PromQL Query rate(container_cpu_usage_seconds_total{namespace="<ns>", pod="<pod>"}[5m])
9 Pods: Exec pods exec --namespace <ns> --name <pod> --command 'kill -9 $(pgrep -f stress)'
10 Pods: Delete pods delete --namespace <ns> --name <pod>
11 Resources: Get resources get --apiVersion apps/v1 --kind Deployment --namespace <ns> --name <deploy>
12 Resources: Create or Update Update deployment CPU limits
13 Configure HPA (optional) kubectl autoscale deployment/<deploy> --cpu-percent=70 --min=2 --max=10
14 Restart Deployment (optional) kubectl rollout restart deployment/<deploy> --namespace <ns>

pod-memory-hog

Goal: Inject memory stress on target pod containers to validate application resilience under high memory load and OOM-kill scenarios.

Symptoms:

  • High memory usage on targeted pod containers
  • OOMKilled or CrashLoopBackOff status on affected pods
  • Application latency spikes or request failures
  • Warning events related to memory pressure in namespace
  • Container memory usage nearing or exceeding limits

Remediation: Identify pods with abnormal memory consumption, kill stress processes inside affected containers, restart OOMKilled pods, and adjust memory limits or VPA policies to handle future memory pressure.

Ideal Course of Action:

Step Action Detail
1 List cluster events Detect OOMKilled warnings, memory pressure, and pod eviction events
2 List pods in affected namespace Identify pods in OOMKilled, CrashLoopBackOff, or Evicted state
3 Get affected pod details Confirm memory resource limits, requests, and last termination reason
4 Check pod resource consumption Identify which pods have abnormally high memory consumption
5 Check node resource consumption Determine if memory hog is causing node-wide pressure or evictions
6 Exec into pod to inspect processes Execute top or ps aux to identify the stress process consuming memory
7 Get pod logs Identify application-level errors caused by memory starvation (OOM, crashes)
8 Query Prometheus for memory metrics PromQL: container_memory_working_set_bytes{namespace="<ns>", pod="<pod>"}
9 Kill stress process in container Exec and kill the stress-ng process to stop memory hog injection
10 Delete degraded pods Delete OOMKilled or CrashLoopBackOff pods so controller recreates them cleanly
11 Verify deployment health Confirm desired replicas are running and rollout is healthy
12 Adjust memory limits or scaling policy Update workload spec or configure VPA for future memory pressure

Ideal Tool Trajectory:

Step Tool Command
1 Events: List events list --all-namespaces
2 Pods: List in Namespace pods list --namespace <target-namespace>
3 Pods: Get pods get --namespace <ns> --name <pod>
4 Pods: Top pods top --namespace <target-namespace>
5 Nodes: Top nodes top
6 Pods: Exec pods exec --namespace <ns> --name <pod> --command 'top -bn1'
7 Pods: Log pods log --namespace <ns> --name <pod>
8 Execute PromQL Query container_memory_working_set_bytes{namespace="<ns>", pod="<pod>"}
9 Pods: Exec pods exec --namespace <ns> --name <pod> --command 'kill -9 $(pgrep -f stress)'
10 Pods: Delete pods delete --namespace <ns> --name <pod>
11 Resources: Get resources get --apiVersion apps/v1 --kind Deployment --namespace <ns> --name <deploy>
12 Resources: Create or Update Update deployment memory limits
13 Configure VPA (optional) kubectl apply -f vpa.yaml --namespace <ns>
14 Restart Deployment (optional) kubectl rollout restart deployment/<deploy> --namespace <ns>

pod-network-loss

Goal: Inject network packet loss on target pods to validate application resilience to degraded network conditions, retry logic, circuit breakers, and failover mechanisms.

Symptoms:

  • High packet loss or dropped connections to target pods
  • HTTP 5xx errors and request timeouts from dependent services
  • Increased latency and retransmissions on pod network interface
  • Warning events on target pods indicating network degradation
  • Service mesh or load balancer health checks failing for affected pods
  • Application logs showing connection timeouts and socket errors

Remediation: Identify pods experiencing packet loss. Inspect pod network configuration and container states. Delete affected pods to restore clean network state. Verify deployment health and confirm network connectivity resumes after chaos ends.

Ideal Course of Action:

Step Action Detail
1 List cluster events Detect network-related warnings, pod failures, or unhealthy endpoints
2 List pods in affected namespace Identify pods in degraded, Error, or CrashLoopBackOff state due to network loss
3 Get affected pod details Inspect container states, restart counts, and network configuration
4 Get pod logs Identify connection timeouts, socket resets, and I/O errors
5 Exec into pod — network diagnostics Run ping and curl inside pod to confirm packet loss on network interface
6 Check pod resource consumption Correlate network issues with any resource pressure
7 Check node-level network stats Get node stats to identify abnormal transmit/receive error counts
8 Query Prometheus — network errors PromQL: sum(rate(container_network_transmit_errors_total{namespace="<ns>"}[5m])) by (pod)
9 Query Prometheus — HTTP error rate PromQL: sum(rate(http_requests_total{namespace="<ns>", code=~"5.."}[5m]))
10 Delete affected pods Delete error-state pods so controller recreates them with clean network config
11 Verify deployment health Confirm desired replicas are running after remediation
12 Scale deployment if needed Ensure sufficient healthy replicas are available after network recovery
13 Validate network connectivity restored Exec ping/curl to confirm packet loss has ceased
14 Confirm application recovery via Prometheus Verify HTTP error rate and latency have returned to baseline

Ideal Tool Trajectory:

Step Tool Command
1 Events: List events list --all-namespaces
2 Pods: List in Namespace pods list --namespace <target-namespace>
3 Pods: Get pods get --namespace <ns> --name <pod>
4 Pods: Log pods log --namespace <ns> --name <pod>
5 Pods: Exec pods exec --namespace <ns> --name <pod> --command 'ping -c 4 <svc> && curl -s -o /dev/null -w %{http_code} <svc-url>'
6 Pods: Top pods top --namespace <target-namespace>
7 Node: Stats Summary node stats summary --name <node-name>
8 Execute PromQL Query sum(rate(container_network_transmit_errors_total{namespace="<ns>"}[5m])) by (pod)
9 Execute PromQL Query sum(rate(http_requests_total{namespace="<ns>", code=~"5.."}[5m]))
10 Pods: Delete pods delete --namespace <ns> --name <pod>
11 Resources: Get resources get --apiVersion apps/v1 --kind Deployment --namespace <ns> --name <deploy>
12 Resources: Scale resources scale --apiVersion apps/v1 --kind Deployment --namespace <ns> --name <deploy> --scale <n>
13 Pods: Exec pods exec --namespace <ns> --name <pod> --command 'ping -c 4 <target-service>'
14 Execute PromQL Query sum(rate(http_requests_total{namespace="<ns>", code=~"5.."}[5m]))
Trace Collection and Preprocessing

2.5 — Trace Collection and Preprocessing

What This Section Covers

Before the certifier can measure anything, it needs complete, well-structured traces. This page explains how traces are produced during an experiment — what the simulation environment looks like, how events from three different sources converge into a single Langfuse trace, and how that trace is preprocessed into per-fault buckets before metrics extraction begins.


Simulation Environment Components

The simulation environment is composed of five key components:

Component Description
Application Pod Runs the target application. Produces its own application-level logs (HTTP requests, errors, latency, etc.).
Fault Pod Injects fault configurations into the system. Writes the fault configuration as events into the Langfuse trace via the OTEL Collector. The fault configuration is not visible to the Agent Pod.
Agent Pod Contains the autonomous agent responsible for identifying faults and performing mitigation actions. Operates independently with no access to fault configuration. Produces its own agent-level logs. The Agent calls the LLM Gateway directly for reasoning and invokes tools via the MCP Server for actions.
Tool Calls (MCP Server) Provides the tools the Agent invokes to inspect and remediate the system. Agent-Tool interactions are captured via the OTEL Collector.
LLM Gateway Hosts multiple LLM models. The Agent calls the LLM Gateway directly. The gateway reports LLM interaction traces directly to Langfuse.

2. Trace Collection Pipeline

Traces converge into Langfuse from two distinct paths:

Collection Path Source What It Captures
Direct (LLM Gateway -> Langfuse) LLM Gateway All LLM interaction traces — prompts, completions, token usage, latency, model selection.
OTEL Collector -> Langfuse Fault Pod, Agent Pod (tool calls) Fault configuration events (injected at experiment start) and Agent-to-Tool interaction events.

Why Two Paths?

  • The LLM Gateway already has native Langfuse integration, so LLM traces flow directly without an intermediary.
  • Fault injection metadata (from Fault Pod) and Agent-Tool interactions (from MCP Server) do not have native Langfuse integration. They are instrumented via OpenTelemetry and routed through an OTEL Collector that writes events into the same Langfuse trace.

3. Flow Diagram

Simulation Environment — Kubernetes
Application Pod
Target workload; disrupted by fault injection. Emits app logs.
Fault Pod
Injects fault config into the environment. Emits fault config event.
Agent Pod
AI agent under test; observes symptoms, diagnoses & remediates. Has NO visibility into fault config.
MCP Server (Tool Calls)
kubectl, APIs, etc. Receives tool calls from the Agent Pod. Emits tool interaction events.
LLM Gateway
Multiple LLM models. Native Langfuse integration (GENERATION spans). Path 1: direct LLM interaction traces → Langfuse.
OTEL Collector
Collects fault config events (from Fault Pod) and tool interactions (from MCP Server). Normalizes into Langfuse-compatible spans/events. Path 2: OTEL → Langfuse.
Path 1 (direct LLM traces) + Path 2 (OTEL: fault config + tool calls)
Langfuse
Unified Trace per Experiment Run
  • Fault Events (from OTEL) — what was injected, when, ground truth parameters
  • Tool Events (from OTEL) — tool name, arguments, response, success/fail, timestamps
  • GENERATION Spans (direct) — LLM calls: model, prompt, completion, tokens, latency
This unified trace is the input to Phase 1 — Metrics Extraction.

Reading the diagram:

  • The Agent Pod has two outgoing connections: one to the MCP Server (for tool calls) and one directly to the LLM Gateway (for reasoning).
  • The OTEL Collector receives events from two sources: the Fault Pod (fault configuration events) and the MCP Server (agent-tool interaction events). Both flow into Langfuse as PATH 2.
  • The LLM Gateway sends LLM traces directly to Langfuse (PATH 1) — no OTEL intermediary needed.
  • At experiment completion, Langfuse holds the unified trace containing all three event types.

4. Experiment Execution Flow

An experiment proceeds through the following sequence:

  1. Fault Injection Starts — The Fault Pod injects one or more fault configurations into the target Application Pod. The fault configuration is simultaneously published as an event to the OTEL Collector, which forwards it to Langfuse.

  2. Agent Observes Symptoms — The Agent Pod (with no visibility into the fault configuration) monitors the Application Pod through its own logs and available tooling.

  3. Agent Reasons and Acts — The Agent calls the LLM Gateway directly for reasoning (these interactions are traced directly to Langfuse by the gateway). The Agent also invokes tools via the MCP Server (these Agent-Tool interactions are captured by the OTEL Collector and forwarded to Langfuse).

  4. Traces Converge in Langfuse — By the end of the experiment, Langfuse contains a unified trace comprising:

    • The injected fault configuration (ground truth)
    • All Agent-to-Tool interactions (actions taken)
    • All Agent-to-LLM interactions (reasoning steps)

5. Preprocessing Assumptions

Before metrics extraction or aggregation, the following assumptions hold:

# Assumption Rationale
1 Langfuse contains the complete trace All three event categories (fault config, tool calls, LLM interactions) are present for every experiment run.
2 Fault configuration is ground truth The fault config injected by the Fault Pod is the authoritative record of what faults were introduced.
3 Agent operates without fault visibility The Agent Pod has no access to fault configuration — it must independently detect and mitigate issues.
4 Multiple faults per experiment Experiments inject multiple faults simultaneously to simulate realistic, compounded application failures.
5 Temporal ordering is preserved Events in the Langfuse trace retain accurate timestamps, allowing reconstruction of the sequence: fault injection -> detection -> mitigation.
6 Trace correlation is handled by OTEL + Langfuse The OTEL Collector and Langfuse natively correlate events from different sources into a single experiment trace.

Relationship to Downstream Phases

Once traces are consolidated in Langfuse, the data flows into the evaluation pipeline:


Certification Scenarios

2.6 — Certification Scenarios

What This Section Covers

The certification output depends on how many valid runs you have and whether the pipeline stages complete successfully. This page documents the four scenarios you will encounter and what each one means for the report you receive.

The threshold for full statistical certification is n ≥ 30 successful runs per fault category. Everything below that threshold produces a partial or null result.


The Four Scenarios

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                        AGENTCERT — CERTIFICATION OUTPUT SCENARIOS                   │
│                                                                                     │
│  How the pipeline behaves under different run counts and data availability          │
│  Threshold: n ≥ 30 successful runs/category for statistical testing                 │
│                                                                                     │
│  ┌──────────────────┐  ┌──────────────────┐  ┌──────────────────┐  ┌─────────────┐  │
│  │  S1              │  │  S2              │  │  S3              │  │  S4         │  │
│  │  CERT + STATS    │  │  CERT · NO STATS │  │  NO CERTIFICATE  │  │  CERT W/    │  │
│  │                  │  │                  │  │                  │  │  WARNINGS   │  │
│  │ Full Statistical │  │ Aggregation-Only │  │ No Successful    │  │ Runs OK,    │  │
│  │ Certification    │  │ Report           │  │ Runs             │  │ Metrics Null│  │
│  │                  │  │                  │  │                  │  │             │  │
│  │ ≥30 runs/cat     │  │ 1–29 runs        │  │ 0 runs reach     │  │ ≥1 run,     │  │
│  │ e.g. 30/30 ✓    │  │ e.g. 5/30        │  │ certifier        │  │ fields null │  │
│  │                  │  │ or 25/30         │  │ 0/30 successful  │  │             │  │
│  │ Pipeline stages: │  │                  │  │                  │  │             │  │
│  │ ✓ Aggregation    │  │ Pipeline stages: │  │ Pipeline stages: │  │ Pipeline:   │  │
│  │ ✓ H-01–H-09      │  │ ✓ Aggregation    │  │ ✗ Aggregation    │  │ ✗ Aggregat. │  │
│  │ ✓ Certification  │  │ – Hyp. skipped   │  │   (no input)     │  │   skipped   │  │
│  │                  │  │ ✓ Certification  │  │ – Hyp. skipped   │  │ – Hyp. skip │  │
│  │ OUTPUT:          │  │                  │  │ – Cert. skipped  │  │ ✓ Certif.   │  │
│  │ Certificate with │  │ OUTPUT:          │  │                  │  │             │  │
│  │ statistical      │  │ Descriptive cert │  │ OUTPUT:          │  │ OUTPUT:     │  │
│  │ claims           │  │ no statistical   │  │ No certificate — │  │ Cert with   │  │
│  │                  │  │ validation       │  │ upstream failure │  │ explicit    │  │
│  │                  │  │                  │  │                  │  │ warnings — │  │
│  │                  │  │                  │  │                  │  │ investigate │  │
│  └──────────────────┘  └──────────────────┘  └──────────────────┘  └─────────────┘  │
│                                                                                     │
│  Statistical hypothesis testing (H-01–H-09) is performed only in S1.               │
│  S3 does not produce a certificate.                                                 │
└─────────────────────────────────────────────────────────────────────────────────────┘

S1 — Full Statistical Certification

Trigger: n ≥ 30 successful runs per fault category.

This is the complete certification. All three pipeline phases run — Aggregation, Hypothesis Testing (H-01 through H-09), and Certification Report. The output is a certificate with statistical claims that can be defended quantitatively.

What you get:

  • Detection rate with Wilson confidence interval and a certified lower-bound floor
  • TTD and TTM with IQM, P95, and bootstrap BCa confidence intervals
  • SLA compliance result from the Wilcoxon one-sample test (H-05)
  • Cross-category comparison (H-03) if you have multiple fault categories with n ≥ 30
  • Temporal drift assessment (H-09) — is the agent’s performance stable across the run sequence?
  • Full 12-section certification report including Appendix A1–A5

When this is the right target: Always. S1 is the only scenario that produces a statistically defensible certification. If you are certifying an agent for production deployment, you need S1.


S2 — Aggregation-Only Report

Trigger: 1–29 successful runs. Not enough for hypothesis testing, but enough to aggregate.

The certifier runs Aggregation and Certification but skips Phase E entirely. The report describes what happened across the runs you have, but cannot make statistical claims about reliability or SLA compliance.

What you get:

  • Aggregated detection rate and response times (descriptive statistics only — no confidence intervals of meaningful width)
  • Qualitative narrative from the LLM Council across however many runs you have
  • Safety assessment with worst-case propagation (this still applies regardless of run count)
  • A certification report marked as “partial — insufficient runs for statistical validation”

What you do not get:

  • Confidence intervals (too wide to be useful below 30)
  • Hypothesis test results (H-01 through H-09 all require n ≥ 30)
  • Statistical lower-bound floor on detection rate

When this happens: Early in an experiment when you are still collecting runs, or when some runs were discarded as invalid. S2 is a progress report, not a final certification.

What to do: Collect more valid runs until you reach 30. Do not treat an S2 report as a certification — it is a partial view.


S3 — No Certificate

Trigger: Zero successful runs reach the certifier. All runs failed upstream — trace is missing, agent crashed, pipeline error before metrics extraction.

Nothing aggregates, nothing certifies. The pipeline exits cleanly and reports the upstream failure.

What you get:

  • A pipeline failure report indicating that no valid runs were found
  • Diagnostic information about why runs failed (if available from trace ingestion)

What to do: This is a setup problem, not an agent performance problem. Check:

  • Are traces being written to Langfuse correctly?
  • Is the fault config being emitted as a trace event?
  • Are the Phase 0 and Phase 1 pipeline steps completing without error?

Fix the upstream issue and re-run. Do not interpret S3 as a statement about agent capability — you haven’t measured anything yet.


S4 — Certificate with Warnings

Trigger: One or more runs completed successfully and trace exists, but metrics extraction returned null fields — the LLM could not extract values from the trace content.

This is the trickiest scenario. Runs happened, the agent operated, but the certifier couldn’t score them. The pipeline produces a report but flags every null field explicitly with a warning.

What you get:

  • A certification report with populated structural sections (methodology, fault taxonomy, pipeline summary)
  • Null or placeholder values for quantitative metrics (TTD, TTM, detection rate)
  • A warning banner on every affected section: “metrics not extracted — investigate trace quality”
  • Qualitative sections may still be populated if the LLM Council could work from partial traces

Why this happens:

  • The trace format changed (new agent version, new Langfuse schema)
  • The LLM extractor encountered traces that didn’t match the expected structure
  • The fault config didn’t flow into the trace correctly (so TTD/TTM baselines are missing)

What to do: Inspect the raw traces in the AgentCert-Traces repository. Check whether fault config events are present and structured correctly. If the trace format changed, the Phase 1 extraction prompt or parser may need updating.

Do not treat S4 as an agent failure — it means the measurement infrastructure has an issue, not the agent.


Choosing the Right Response to Each Scenario

Scenario Certificate Produced? Statistical Claims Valid? Recommended Action
S1 Yes Yes Review report; certify for production if results meet threshold
S2 Partial No Collect more runs; treat as interim view only
S3 No No Debug upstream pipeline; fix trace collection before re-running
S4 Yes (with warnings) No Inspect trace quality; fix extraction before treating report as valid

ACE — Agent Certification Engine · Released under the Apache License 2.0.