A dataset integration turns a benchmark harness into a remote scoring function. The agent does the work, the scorer judges the result, and the caller composes both pieces in one rollout.
This guide uses SWE-bench Verified as the example, but the same shape works for internal evals, MLE-Bench-style tasks, or any harness that can run inside the sandbox.

Integration Contract

Keep scorer modules narrow. They should grade an artifact, not own the entire rollout.
Dataset enumeration, repo checkout, agent execution, and patch extraction stay on the caller side. That separation lets one scorer work with many agents.

1. Package Layout

2. Result Type

Return a type the training or evaluation loop can consume directly.
src/__init__.py
The type can be a dataclass or Pydantic model as long as Agentix can serialize it through the shared codec.

3. Scoring Function

src/score.py
The complete implementation is intentionally harness-specific. For SWE-bench, lean on the official package for test specs, log parsing, and grading instead of reimplementing benchmark rules. See plugins/datasets/swebench for a full working scorer.

4. Packaging

pyproject.toml
When a rollout bundle depends on agentix-dataset-swe, the worker can import agentix.plugins.datasets.swe and call score.

5. Sandbox Requirements

Benchmark harnesses often assume system tools. SWE-bench commonly needs:
  • bash, git, and curl on PATH
  • Miniconda or benchmark-specific execution images
  • Enough disk and timeout budget for dependency setup and tests
Put those requirements in the bundle’s base image, a default.nix, or a provider backend that knows how to start benchmark-provided images.

Caller Flow

The caller owns the rollout choreography. This keeps every part swappable: dataset row, repo setup, agent, patch extraction, scorer.

Design Rules

  • A scorer grades one artifact and returns structured data.
  • The caller chooses the dataset split and instance.
  • The caller prepares repos and extracts patches with generic primitives.
  • The scorer should reuse official benchmark code whenever possible.
  • Logs should be returned or persisted in a way the rollout system can correlate with the call.