Introduction to AgentCert

AI agents fail silently. A pod restarts, network packets drop, a downstream API slows to a crawl — and the agent either handles it cleanly, hallucinates a recovery path, or misses it entirely. You usually find out in production.

AgentCert was built to change that. Instead of discovering failure modes at runtime, you inject controlled faults into a test environment, observe the agent’s responses across dozens of independent runs, and produce a formal certification report before the agent ever sees production traffic.


The Core Problem

Traditional testing breaks down on AI agents for two fundamental reasons.

Non-determinism. The same fault, the same prompt, the same cluster state — the agent may take a different path every time. A single test run tells you almost nothing. You need to run the experiment 20 or 30 times and reason statistically about what you observe across those runs. Pass/fail testing, the default mode of all CI frameworks, simply doesn’t apply.

Operational failures. Unit tests and integration tests cannot surface the behaviours that actually matter in production: the agent that detects a pod deletion in 4 seconds on average but occasionally takes 45, the agent that performs well on network faults but quietly falls apart on DNS errors, the agent that handles tool failures safely in 29 out of 30 runs but not the 30th. These failure modes only emerge when you inject real chaos into a real environment and watch what happens.

AgentCert treats agent certification as an empirical problem, not a correctness problem.


How AgentCert Solves It

The platform has three components working together:

1 · Chaos injection. LitmusChaos injects defined infrastructure faults (pod deletions, network packet loss, CPU hogs, DNS errors) into a Kubernetes cluster. The agent under test is given no hints — it must detect, diagnose, and respond on its own.

2 · Trace capture. Every LLM call, tool invocation, and reasoning step the agent makes is captured via Langfuse’s OpenTelemetry integration. One trace file per run, containing the full agent behaviour.

3 · Statistical certification. The certifier pipeline consumes the traces from N runs and produces a 12-section certification report with statistical metrics (detection rate, p95 TTD, mitigation rate, RAI compliance score, hallucination score) backed by the raw evidence.


What This Section Covers

Why AgentCert

1.1 — Why AgentCert

The Problem We Were Trying to Solve

We were building AI agents to manage Kubernetes infrastructure — detecting faults, diagnosing root causes, running remediation. The agent worked well in our demos. It could spot a crashed pod, reason through the logs, and recover the service. Impressive, honestly.

But when it came time to hand it over to a customer and say “this is production-ready,” we hit a wall. We had no credible way to answer the questions that actually matter:

  • How often does the agent catch a fault? Not in one demo run — across 30 independent runs?
  • When it detects a fault, how fast is it? What’s the worst-case response time, not just the average?
  • Does it perform the same on network faults as it does on pod crashes? Or does it quietly fall apart on specific fault types?
  • Can we prove, with statistical confidence, that it meets an SLA?
  • Is it hallucinating? Is it exposing sensitive data? Is it safe to run?

Unit tests couldn’t answer these. Integration tests couldn’t either. And a human manually reviewing agent runs at scale wasn’t realistic. We needed something different.


Why Traditional Testing Isn’t Enough

The fundamental problem with AI agents is that they are non-deterministic by design. The same fault, the same environment, the same prompt — and the agent might take a different path every single time. Sometimes it’s faster. Sometimes it hallucinates. Sometimes it misses the root cause entirely.

This means a single test run tells you almost nothing. You got lucky or unlucky. To say anything meaningful about an agent’s reliability, you need to run it dozens of times, under controlled conditions, and reason statistically about what you observe.

Traditional testing frameworks aren’t built for this. They assume deterministic outputs. Pass or fail. Same input, same output. None of that holds for LLM agents.

On top of that, the kinds of failures we care about are operational failures — the agent doesn’t detect a pod deletion fast enough, it misdiagnoses a network fault as a resource issue, it escalates unnecessarily and takes down a healthy service. These failures only emerge when you inject real chaos into a real environment and watch what happens. You can’t unit test your way to that answer.


What We Built Instead

AgentCert is a fault injection + statistical certification pipeline. The idea is straightforward, even if the implementation has depth:

  1. Inject controlled infrastructure faults into a Kubernetes cluster using LitmusChaos
  2. Let the AI agent under test respond to those faults — completely on its own, with no hints
  3. Capture everything the agent does via Langfuse traces
  4. Run those traces through a measurement pipeline that extracts quantitative and qualitative metrics
  5. Repeat 30 times per fault type to get statistically meaningful results
  6. Aggregate, test hypotheses, and produce a certification report that tells you exactly what you can and cannot claim about this agent

The output is not a pass/fail test result. It is a certification report — the same kind of structured evidence you would want before deploying any safety-critical system. It tells you the detection rate with confidence intervals. It tells you where the agent is consistent and where it is erratic. It surfaces the hallucination patterns. It gives you concrete recommendations for what to fix before you deploy.


The Questions AgentCert Is Designed to Answer

These are the questions a principal engineer or a customer should be able to ask and get a data-backed answer to:

Question What AgentCert Provides
How reliably does this agent detect faults? Detection rate with Wilson confidence interval and certified lower-bound floor
How fast does it respond? Time-to-detect and time-to-mitigate: median, P95, bootstrap CI across 30 runs
Does it meet our SLA? Wilcoxon one-sample test against the SLA threshold — pass, conditional, or fail
Is it consistent, or all over the place? Coefficient of variation and Levene’s test per fault category
Does it handle network faults as well as pod crashes? Cross-category comparison with Kruskal-Wallis and effect sizes
Is it hallucinating? Hallucination score per run, aggregated with combined judge across all runs
Is it safe? RAI compliance rate, PII detection, adversarial prompt handling — worst-case propagation
What should we fix first? Evidence-based recommendations grounded in the actual experimental findings

One More Thing Worth Saying

AgentCert is not a silver bullet. It tells you how the agent performs under the specific fault conditions you tested, in the specific environment you set up, with the specific LLM version that was running at the time. Change the model, change the environment, change the fault configuration — and you should re-certify.

Think of it less like a unit test suite and more like a performance audit. It gives you an honest, reproducible snapshot of what this agent is capable of today. That snapshot is enormously useful — but it is a snapshot, not a guarantee.

That is the honest framing. Everything else in this wiki is about how we built the machinery to produce that snapshot reliably.

High-Level Workflow

1.2 — High-Level Workflow

The Short Version

You inject a fault into a Kubernetes cluster. An AI agent tries to detect and fix it. You capture everything the agent does. You repeat this 30 times. A pipeline measures what actually happened across all those runs and produces a certification report.

That is the entire thing. Everything else is implementation detail.


The Full Picture

Here is the end-to-end flow, from the moment you decide to test a fault to the moment you have a report in your hands.

Step 1Define the Experiment
Before any fault is injected, you write a fault configuration file. This is the ground truth — it says exactly what fault you are injecting, what the agent should ideally do, and what tools it should call in what order. The agent never sees this file. It is purely for evaluation. Think of it as the answer key that gets compared against the agent's actual answers after the fact.
→ fault_configuration.json (kept secret from the agent)
Step 2Inject the Fault — LitmusChaos
LitmusChaos injects a controlled fault into the Kubernetes cluster. This could be a pod deletion, a network packet loss, a CPU hog, a disk fill — any of the fault types in the taxonomy. The fault runs for a defined duration (typically 30–120 seconds) and then the cluster self-heals. The agent is not told anything about the fault. It has to figure it out from what it observes.
→ fault is live in the cluster; injection timestamp recorded
Step 3Agent Responds — The AI Agent Under Test
The AI agent monitors the cluster via MCP tools — kubectl, log queries, health checks, metrics. It detects the anomaly, diagnoses the root cause, and attempts remediation. Everything the agent does is automatically captured in Langfuse: every LLM call, every tool invocation, every reasoning step, every output. This becomes the raw trace for that run.
→ Langfuse trace JSON (one file per run)
Repeat steps 2–3 approximately 30 times for each fault type
Step 4Fault Bucketing — Phase 0 of the Certifier
A single trace file may contain events from multiple overlapping faults. The first thing the certifier does is separate them — assigning each trace event to the fault it belongs to. Deterministic where possible (events that clearly belong to one fault), LLM-assisted where there is ambiguity (events during periods when multiple faults were active simultaneously).
→ one JSON bucket per fault, per run
Step 5Metrics Extraction — Phase 1 of the Certifier
For each fault bucket, the certifier extracts the metrics that matter: how long did detection take, how long did mitigation take, how good was the reasoning, did the agent hallucinate, was it safe. An LLM reads the trace and pulls out observations. Python code handles all the arithmetic — the LLM is never asked to do math.
→ one ExtractionResult document per run, stored in MongoDB
After all ~30 runs are extracted
Step 6Aggregation — Phase 2 of the Certifier
Now we have ~30 measurements per fault type. The certifier aggregates them:

Numbers → statistical aggregation in Python code (mean, median, P95, confidence intervals)
Narratives → LLM Council (multiple independent judges read all 30 run summaries and produce a consensus assessment)
Safety → worst-case propagation (one failure in any run = category flagged)
→ certification scorecard per fault category
optional — when n ≥ 30 per fault category
Step 7Statistical Hypothesis Testing — Phase E
When you have enough data, the pipeline runs 9 formal statistical tests. These go beyond summary statistics — they give you confidence intervals, prove SLA compliance, detect cross-category weaknesses, and check whether the agent's performance is drifting over time. The results are packaged as Appendix A1–A5 and passed directly into Step 8, where they appear at the end of the report.
→ hypothesis test results (Appendix A1–A5)
Step 8Certification Report — Phase 3 of the Certifier
The scorecard — plus the hypothesis appendix if it was computed — is turned into a structured 12-section report. Deterministic builders create the tables, charts, and scoring cards. LLM narrative builders — running in parallel — write the prose. The output is validated against a strict schema. If anything is malformed, the pipeline errors rather than producing a bad report.
→ certification_report.json → HTML + PDF

Who Does What

It is worth being explicit about which parts are automated and which require human input.

Step Who Does It Human Input Required?
Define experiment You (the experiment designer) Yes — fault configuration and ground truth must be authored
Inject fault LitmusChaos (automated) Once, to configure the chaos experiment
Agent responds The AI agent under test (automated) No — agent operates autonomously
Capture trace Langfuse (automated) No
Fault bucketing AgentCert Phase 0 (automated) No
Metrics extraction AgentCert Phase 1 (automated) No
Aggregation AgentCert Phase 2 (automated) No
Hypothesis testing (optional, n ≥ 30) AgentCert Phase E (automated) No
Certification report AgentCert Phase 3 (automated) No
Review the report You (the certifier consumer) Yes — a human should always review before acting on results

The entire measurement pipeline runs without human involvement once the experiment is set up. The only things that require a human are writing the fault configuration upfront, and reading the certification report at the end.


What a Typical Experiment Looks Like

To make this concrete — here is what running a pod-delete certification experiment looks like in practice:

  1. Write the fault configuration for pod-delete: specify the target namespace, the injection timing, the ideal course of action, the ideal tool trajectory
  2. Configure LitmusChaos to inject a pod deletion every ~5 minutes
  3. Start the agent and let it run autonomously against the live cluster
  4. Collect 30 traces — this typically takes a few hours depending on chaos timing and agent response speed
  5. Run the certifier pipeline against all 30 traces
  6. Review the certification report

At the end you have a report that tells you, with statistical backing: this agent detects pod deletions reliably (or it doesn’t), it responds within a certain time window (or it doesn’t), and here is exactly where it falls short and what to do about it.


The Key Thing to Understand

The certifier does not evaluate a single run. It evaluates a distribution of runs. The insight is that a single run tells you very little about a non-deterministic system. What matters is the pattern across many runs — the central tendency, the variance, the tail behaviour, the safety record.

Everything in this pipeline is designed around that insight. Thirty runs per fault. Statistical aggregation. Confidence intervals on every key metric. Worst-case propagation for safety. That is why this works.

Certifier Assumptions

1.3 — Certifier Assumptions

What This Section Covers

These are the assumptions baked into the AgentCert pipeline itself — design decisions that affect how the certifier collects, interprets, and reports results. They apply regardless of which agent you are certifying or which experiment you are running.

For agent-specific and experiment-specific assumptions — SLA thresholds, environment setup, and onboarding checklist — see 2.0-Experiment-Assumptions.md in the Experiment Design section.


Reference Setup

This certification was validated against a specific configuration. Understanding what we used helps clarify where the assumptions come from — and what might need to change if you are onboarding a different agent.

Agent under test — Flash Agent We used Flash Agent, an extension of the AIops Lab’s Kubernetes operations tooling. Flash Agent monitors clusters, detects infrastructure anomalies, and attempts autonomous remediation via MCP tool calls. It was built specifically for this use case and is the primary agent this certification evidence covers.

The architecture was designed around Flash Agent. If you are onboarding a different agent, some components — particularly trace parsing and tool trajectory matching — may need tweaking to match how that agent structures its tool calls and reasoning steps.

Fault injection — chaos charts LitmusChaos experiment definitions (pod-delete, network-loss, cpu-hog, disk-fill) are published at github.com/AgentCert/chaos-charts. These are pre-configured with the metadata structure the certifier’s bucketing algorithm expects.

Trace dataset All Langfuse traces collected during the certification experiments are at github.com/AgentCert/AgentCert-Traces. This is the canonical data source for the results in this wiki.

Architecture and design artefacts


Infrastructure Assumptions

Langfuse is the trace store

The certifier consumes Langfuse trace JSON files. Every LLM call the agent makes, every tool invocation, every reasoning step — Langfuse captures this. The certifier reads timestamps, tool names, and LLM outputs directly from this trace structure.

If your agent doesn’t trace to Langfuse, you need to produce a trace format that matches the structure the certifier expects. That is possible but requires engineering work on the trace reader.

LitmusChaos is the fault injector

The bucketing algorithm (Phase 0) is designed around the timing and metadata that LitmusChaos produces — specifically, per-experiment start/end timestamps and a structured chaos engine name. The deterministic bucketing pass relies on these to assign trace events to the correct fault window.

If you replace LitmusChaos with a different fault injector, the metadata extraction step will need adaptation and LLM-assisted disambiguation may behave differently.

Fault configuration includes ground truth and ideal trajectory

Each fault experiment must have a corresponding fault configuration file. This is what the certifier evaluates against. It specifies:

  • What fault is being injected (type, target, parameters)
  • The ideal course of action the agent should take
  • The ideal tool trajectory — which tools, in what order
  • SLA thresholds — the maximum acceptable time-to-detect and time-to-mitigate for this fault type

Without a fault configuration, the pipeline can extract raw metrics but cannot score against expected behaviour or evaluate SLA adherence.

Ground truth is never shown to the agent

This is a hard requirement. The fault configuration file is used only during evaluation. If the agent can see it, you are not testing the agent — you are testing whether it can read an answer key. The pipeline cannot enforce this at runtime; it must be enforced operationally.

SLA thresholds are defined per fault type

The certifier evaluates SLA compliance based on thresholds you define in the fault configuration. A pod deletion SLA might be 30 seconds TTD; a network degradation SLA might be 90 seconds. The certifier does not impose universal thresholds — it evaluates the agent against the thresholds that are appropriate for each fault type. If SLA thresholds are not defined, Phase E SLA compliance tests will not run.


Design Principles

These are not configurable — they are the architecture.

LLMs never do arithmetic

The certifier uses LLMs for three things: classifying trace events (Phase 0), extracting qualitative observations (Phase 1), and synthesising narratives across runs (Phase 2). It never asks an LLM to compute a mean, compare a number against a threshold, or evaluate SLA compliance.

All arithmetic is pure Python. Every mean, every P95, every confidence interval, every hypothesis test is computed in code. If you see a numeric claim in the certification report, it was computed by code, not narrated by a model.

Safety uses worst-case propagation

The safety and RAI section does not aggregate failures — it propagates them. One hallucination involving sensitive data across 30 runs means the hallucination category is flagged. One adversarial prompt handling failure means that category is flagged.

This is intentional. For performance metrics, an occasional bad run is a tail-risk concern. For safety, an occasional bad run is a categorical failure. A 97% safety compliance rate is not acceptable.

LLM Council reduces single-model bias

Phase 2 uses a council of k independent judges (typically 3–5) plus a meta-judge that synthesises a consensus. No single model’s biases dominate the narrative assessment. The meta-judge reconciles diverging reads — not by picking a winner, but by producing an honest assessment that accounts for what multiple independent evaluators saw.


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