Skip to main content

AgentFit

Living repository-native evals for coding agents.

Find which coding agent actually works for your codebase.

Quick Start

# Install
pipx install agentfit

# Initialize in your repo
cd my-project
agentfit init

# Analyze workload
agentfit analyze

# Build benchmark
agentfit benchmark build

# Run agents
agentfit run codex-local claude-local

# Get results
agentfit report

What is AgentFit?

AgentFit transforms your repository's real engineering history into a private, reproducible, representative benchmark for coding agents.

Instead of relying on public benchmarks that don't match your work, AgentFit mines your actual merged PRs to create evals that reflect what your team actually ships.

The Pipeline

Repository history
        │
        ▼
   DISCOVER    What happened here?
        │
        ▼
     FILTER    Can it become an eval?
        │
        ▼
    VALIDATE   Can we prove correctness?
        │
        ▼
  REPRESENT    Does the benchmark match
               the actual workload?
        │
        ▼
      RUN      Execute agent configurations
        │
        ▼
    MEASURE    Quality / cost / latency
        │
        ▼
    DECIDE     What should we use?

Commands

Command Description
agentfit doctor Check prerequisites
agentfit init Initialize in current repo
agentfit analyze Analyze repository workload
agentfit candidates View mined candidate tasks
agentfit task inspect <id> Inspect a candidate task
agentfit benchmark build Build representative benchmark
agentfit benchmark list List existing benchmarks
agentfit run <configs...> Run agents via Harbor
agentfit report Generate comparison report
agentfit config show Show current configuration

Configuration

AgentFit creates agentfit.yml in your repo:

version: 1

repository:
  provider: github
  lookback_days: 180

project:
  languages:
    - python
    - go
    - java
  install_command: pip install -e ".[dev]"
  test_command: pytest

benchmark:
  size: 24
  dimensions:
    task_type: 0.30
    subsystem: 0.40
    complexity: 0.30

execution:
  environment: docker
  concurrency: 4

agents:
  codex-default:
    agent: codex
    model: openai/gpt-4o

  claude-default:
    agent: claude-code
    model: anthropic/claude-opus-4

Supported Languages

  • Python
  • JavaScript / TypeScript
  • Go
  • Java (Maven / Gradle)

How it Works

1. Workload Analysis

AgentFit fetches your merged PRs via GitHub API and classifies each by:

  • Task type: bugfix, feature, refactor
  • Subsystem: payments, auth, frontend, etc.
  • Complexity: small, medium, large

2. Candidate Mining

From the workload, AgentFit identifies PRs that can become reliable evals:

  • Have linked issues or clear PR descriptions
  • Include test changes (verifier evidence)
  • Are within configurable size bounds
  • Don't require unsupported environments

3. Validation Pipeline

Each candidate passes rigorous validation:

  • Base health: tests pass before the change
  • No-op validation: new tests fail without the fix
  • Oracle validation: tests pass with the fix
  • Determinism: tests produce consistent results
  • Leakage protection: agent can't access gold solution

4. Representative Sampling

AgentFit selects benchmark tasks using stratified optimization to match your actual workload distribution across task type, subsystem, and complexity.

5. Execution via Harbor

Benchmarks are exported in Harbor format and executed via harbor run:

agentfit run codex-default claude-default

6. Decision Report

agentfit report
AGENTFIT REPORT
────────────────────────────────────────

Repository:    my-org/payments
Benchmark:     af_b_20260825_a84f
Tasks:         24
Health:        87/100

                      Solve    $/Solve
Codex                  82%       $0.71
Claude                 86%       $1.52

Quality
Claude +4pp vs Codex
95% CI: -7pp → +14pp

No conclusive quality difference.

Recommendation: Codex
Reason: lowest cost among statistically
indistinguishable configurations.

Development

# Clone
git clone https://github.com/agentfit/agentfit.git
cd agentfit

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Build package
python -m build

# Publish to PyPI
twine upload dist/*

License

Apache 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repobench-0.1.0.tar.gz (119.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repobench-0.1.0-py3-none-any.whl (87.1 kB view details)

Uploaded Python 3

File details

Details for the file repobench-0.1.0.tar.gz.

File metadata

  • Download URL: repobench-0.1.0.tar.gz
  • Upload date:
  • Size: 119.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for repobench-0.1.0.tar.gz
Algorithm Hash digest
SHA256 855ecdea4d52ce9f400cbc9c4c2b50c66926fc39851f16631e22e9be6699b6e3
MD5 cb630b15379a15604c688372c4b5b727
BLAKE2b-256 1e6f7ef5aa9fc82de0011d0d71eafed9c4f83cd1e276db454f894c8066724c0e

See more details on using hashes here.

File details

Details for the file repobench-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: repobench-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 87.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for repobench-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e78fa64d830a55c442cbf2ec7a13ee9d0f0ed4e04e141aa867eaabb88e530c05
MD5 00c7fa6c6be980fef94d3b846790b98c
BLAKE2b-256 16c5eaa28c43773af3c448a7eabb4b61424edb644eab59dfbd1f34803da1e029

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.1

2 files

0.8.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page