Skip to main content

Harbor Rewardkit

Docs

Rewardkit is a lightweight verifier package for Harbor tasks or standalone use.

Installation

uv tool install alpen

Programmatic verifier

# tests/checks.py
from rewardkit import criteria

criteria.file_exists("output.txt")
criteria.file_contains("output.txt", "hello")

Run it with:

uvx --from alpen rewardkit /tests

Rewardkit runs the criteria against /app and writes /logs/verifier/reward.json. With files directly under tests/, their scores are combined into one reward automatically.

Configure scoring

Each Python file that registers criteria is one equal-weighted component named after its filename stem. Use [scoring.<stem>] in reward.toml to change how the criteria within that file combine:

# tests/reward.toml
[scoring.checks]
aggregation = "all-pass"

Files that only provide imports or shared=True criterion definitions and register no checks are ignored.

Judge verifier

# tests/quality.toml
[judge]
judge = "anthropic/claude-opus-5-5"
files = ["/app/main.py"]

[[criterion]]
description = "Is the code correct?"
type = "binary"

judge is a LiteLLM model, an agent such as claude-code, or jev for JEV, a new type of language model from TypeSafe (install alpen[jev]).

Python files and judge TOMLs can coexist. A judge TOML is also a component named after its stem and has its own optional [scoring] section.

To change how these flat components combine, add a named reward aggregation:

# tests/reward.toml
[[reward]]
name = "reward"
aggregation = "weighted-mean"
weights = { checks = 2.0, quality = 1.0 }

Multi-reward verifier

Put scoring inputs in subdirectories to emit separate dimensions:

tests/
├── correctness/
│   └── checks.py
├── structure/
│   └── files.py
└── quality/
    └── judge.toml

This emits correctness, structure, and quality. Add a root tests/reward.toml to combine them into a main reward:

[[reward]]
name = "reward"
aggregation = "weighted-mean"
weights = { correctness = 2.0, structure = 1.0, quality = 1.0 }

Inside a dimension, one unnamed [[reward]] can set weights across local Python files, judge TOMLs, and child directories. Reference files by stem and child groups by directory name.

See the documentation for custom criteria, agent judges, the JEV judge, MCP servers, nested groups, and the complete config reference. A working Harbor task shows the full layout.

Metadata

Release files for alpen 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alpen 0.2.1
File Size Uploaded
alpen-0.2.1.tar.gz 53.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for alpen 0.2.1
File Interpreter ABI Platform
alpen-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 124.0 kB

Release files / alpen-0.2.1.tar.gz

Download URL alpen-0.2.1.tar.gz
Size 53.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4875d776a16981501dc677f4be73c28be41e2643d4bb20d00594be2825a565f3
BLAKE2b-256 checksum
How to use checksums
d83ded08d06c755b168d5bbebb85d1efd0d2a6b3b1ec93835cfce1b9741c49c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / alpen-0.2.1-py3-none-any.whl

Download URL alpen-0.2.1-py3-none-any.whl
Size 70.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e7ef4e21b1f65334a6d44f6d02a1aa06fd86d337610ef82caee959579f66189
BLAKE2b-256 checksum
How to use checksums
18f76d03c92b44d641072094a5686bffc9225608f56e5d29acf17f14ad5d532b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release 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