InfraBench: A Benchmark for AI Agents on Infrastructure Operations

InfraBench evaluates AI agents on real systems work — provisioning machines, bringing distributed services up from blank state, diagnosing and remediating faults under realistic failure conditions, and tearing environments down cleanly. Unlike ITBench or DevOps Gym, we model infrastructure as a six-layer stack (L1 hardware → L6 service), provide a layered fault injector that exercises each layer through its native Linux primitives, and run each trial in its own isolated KVM virtual machine so thousands of tasks can execute concurrently without interference.

6
infrastructure layers
4
provisioning levels
3
environment types
6+
fault injectors

1. InfraSpecification

The vocabulary InfraBench uses to describe an infrastructure system: its physical substrate, the layers it runs on, and the dependencies between them.

Environment types

Bare metal / physical
CloudLab nodes

Dedicated hardware with kernel-level access, real NICs and disks. Used when virtualization itself is under test.

src/syscraft/infra/baremetal/cloudlab.py
Virtual machine
KVM via libvirt

Single-node or multi-node VM clusters. Per-trial isolation by disk, NIC, and bridge. Required when tasks need kernel modules or block devices.

src/syscraft/infra/vm/standalone.py src/syscraft/infra/vm/cluster.py
Container
Docker

Default for application-layer tasks. Fastest start-up; shared kernel limits the fault classes that can be exercised.

src/syscraft/infra/container/docker.py

Layers L1–L6 (click a row to expand)

Each layer has its own representative fault classes, its own networked-fault flavor, and a typical substrate it runs on. Click any row to see which fault injector and which provisioning engine cover that layer in code.

Layer Representative fault classes Networked faults Typical substrate

Dependency view

A higher layer's faults can only manifest if every layer below it is up.

L6 — Service
L5 — Platform (orchestrators)
L4 — Storage / Data
L3 — Kernel
L2 — Virtualization
L1 — Hardware

2. Provisioning Engine / Manager

Different layers of the stack need different provisioning machinery. InfraBench exposes a uniform BaseEnvironment interface, but underneath each level talks to a distinct API.

Hardware level
CloudLab / bare metal

Allocates physical nodes from a CloudLab profile and exposes them over SSH. Isolation is hardware-grade; concurrency is bounded by the pool size.

API: CloudLab portal + SSH · src/syscraft/infra/baremetal/cloudlab.py
Hypervisor level
libvirt + KVM

Single-node and multi-node VM clusters. Each trial gets a unique VM name syscraft-{safe_id}, its own qcow2 disk under _work_dir/{vm}/disk.qcow2, and its own libvirt network whose bridge name is derived from a hash of the session id (Linux's 15-char bridge limit).

API: libvirt XML, virt-customize, Netplan, cloud-init seed ISO · src/syscraft/infra/vm/standalone.py
Container level
Docker

Default substrate. One container per trial; image build is cached. Cheapest concurrency but shared kernel.

API: Docker SDK · src/syscraft/infra/container/docker.py
Application bootstrap
setup.sh + bootstrap.sh

setup.sh runs once on image build (apt install, image caching, machine prep). bootstrap.sh runs after the machine boots, every trial — starts the application infrastructure (Redis, Ceph, HDFS, etcd, Cassandra…) and drives the system into the desired testing state (e.g. broken config, OSD down, partitioned cluster).

Per-task: tasks/<task>/environment/{setup.sh,bootstrap.sh}
Concurrency model. The TrialQueue (src/syscraft/trial/queue.py:13) bounds concurrency with an asyncio.Semaphore(n_concurrent) at line 39. Trials run on isolated environments (VM, container, or bare-metal node) so thousands can execute in parallel without sharing state.

3. InfraLifecycle

Three phases, each with its own evaluation question and its own runtime machinery.

3.1 Deployment

Implemented
Can the agent provision and configure infrastructure from a known blank state to a working state?

InfraBench separates provisioning into two stages, run by InfraBench itself (not the agent) when the task author wants a known starting state, or assigned to the agent when provisioning itself is the task:

  • Setup — bring the machine(s) up: CPU/memory/network, cache Ubuntu / application images, install OS-level packages.
  • Bootstrap — start the application infrastructure (Redis / Ceph / HDFS / etcd / Cassandra) and drive it to the desired testing state (broken config, OSD down, partitioned replicas).

Multiple trials run concurrently on fully isolated environments — distinct KVM VMs with their own disks, NICs, and libvirt networks — coordinated by TrialQueue.

3.2 Management

Implemented
Can the agent operate live infrastructure under realistic failure conditions — detecting, diagnosing, and remediating faults while maintaining service availability?
Scenario engine

Orchestrates concurrent execution of agent and fault timeline. A ScenarioController implements execute(api); the ScenarioExecutor runs it alongside the agent. Three completion modes: AGENT_EXIT, TIMEBOXED, SCENARIO_DRIVEN.

src/syscraft/fault/scenario/{controller.py,executor.py,api.py,completion.py}
Fault injectors
  • Process kill (pkill) — injection.py:71
  • Network partition (iptables DROP) — injection.py:95
  • Disk delay (tc) — injection.py:159
  • Disk fill (dd) — injection.py:223
  • CPU stressinjection.py:268
  • Network shaping (tc/netem latency, loss, bandwidth) — src/syscraft/fault/network.py

All are reversible via heal_all() at injection.py:320.

Verification executor

PeriodicVerifierRunner runs the task's tests/test.sh on a configurable interval during the scenario, parses the reward, and reports back to the scenario engine.

src/syscraft/fault/scenario/periodic_verifier.py:20
Event / timeline logger

ScenarioEventLog is an append-only log of ScenarioEvents (timestamp, elapsed_sec, name, data). It captures the full timeline of agent actions, injected faults, and score changes for each trial.

src/syscraft/fault/scenario/events.py

3.3 Decommission

Implemented (core)

Clean teardown after every trial keeps the host reusable and prevents resource leaks across the thousands of concurrent runs in a benchmark sweep.

  • BaseEnvironment.stop(delete=bool) at src/syscraft/infra/base.py:291delete=True destroys the VM, removes the qcow2 disk, drops the libvirt network; delete=False preserves them for post-mortem debugging.
  • FaultInjector.heal_all() (injection.py:320) reverts every active fault before stop.
  • Stale bridges / networks are reaped by src/syscraft/infra/vm/network_cleanup.py on the next start.
  • Optional on_teardown(api) hook on the scenario controller for custom cleanup.
Planned — not yet implemented

Data migration / backup on decommission. The current teardown deletes per-trial state; we plan to add hooks that snapshot logs, application state, or evicted data to a long-term store before the environment is destroyed, so post-hoc analysis can compare the system's final state across many trials.

4. TaskScenario

Concrete units of evaluation. A task pairs an instruction with a reproducible environment and a verifier.

Task types

Deployment
Provision a service from scratch (e.g. NFS, LVM, etcd cluster).
Failure handling
Redis fault recovery, Cassandra replica corruption.
Debugging
Pelican namespace key mismatch, etcd slow leader election.
Migration
Move services or data between nodes without downtime.
Configuration
Fix broken service configs, RBAC, feature flags.
Storage / Network
Cassandra read-repair, network partition recovery.

Anatomy of a task

tasks/<task-name>/
├── task.toml              # environment type, resources, timeouts, metadata
├── instruction.md         # what the agent is asked to do (natural language)
├── environment/
│   ├── setup.sh           # one-time machine prep (apt install, image cache)
│   └── bootstrap.sh       # per-trial: start services, drive to test state
├── tests/
│   └── test.sh            # verifier; writes reward to /logs/verifier/reward.txt|.json
├── solution/              # optional reference solution
└── scenario.py            # optional: ScenarioController for fault timeline

Ground truth & scoring

Differences from related work

Scope

InfraBench prefers the smallest unit that still captures the operational concern — smaller than most ITBench tasks, and explicitly composable. Larger, more autonomous tasks are still supported by chaining scenarios, but the unit of measurement stays small.

Layered composition

Because tasks declare the layer they target (L1–L6) and the fault classes they exercise, tasks can be composed across layers via the scenario engine — e.g. an L3 kernel fault that triggers an L4 storage fault that propagates to an L6 service.

Reversible faults only

Like prior incident-response benchmarks, InfraBench currently rewards temporary fixes — the score measures whether the system returns to a healthy state, not whether the fix is the long-term correct one. Long-term impact evaluation is on the roadmap (see §5).

Task author workflow

An author writes task.toml, instruction.md, setup.sh / bootstrap.sh, and a verifier script. Adding a fault timeline is opt-in via scenario.py.

Planned — not yet implemented

Formal task taxonomy. Today, task category / tags in task.toml are free-form strings (currently a mix of systems_administration, programming, security, gpu, and so on). We plan to publish a closed taxonomy keyed on the L1–L6 layer, the fault class, and the lifecycle phase (deployment / management / decommission) so coverage can be reported per cell.

5. Long-Term Monitoring & Environmental Impact

Planned — not yet implemented

The current benchmark verifies the system once at the end of a trial (and periodically during the scenario). What it does not yet measure is what happens after the agent claims success: does the fix survive a restart, sustained load, or weeks of operation? Does it degrade a neighbouring tenant on the same physical host? This whole section is part of the design roadmap; it is not yet implemented in the framework.

  • Multi-task / background scoring. Run a continuous health probe on the repaired system after the agent exits; record a background score over hours or days.
  • Lifecycle impact. Restart the host, the service, or the entire cluster after the agent's fix and re-verify — does the fix survive?
  • Longevity tests. Replay realistic workloads against the repaired system to surface latent regressions the immediate verifier misses.
  • Multi-tenant impact. Co-locate independent trials on shared infrastructure and measure noisy-neighbour effects — did the agent's fix steal resources from another tenant?
  • Scheduling & resource provisioning. Track CPU / memory / disk / network consumed by the agent's actions and the resulting system, so a "correct" fix that 10× the resource cost is scored accordingly.

Listed here so contributors and reviewers can see the intended scope of InfraBench beyond what the current implementation exercises.

6. Roadmap (Planned items in one place)