Skip to main content

Harbor Rewardkit

Docs

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

Installation

uv tool install harbor-rewardkit

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 harbor-rewardkit 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 harbor-rewardkit[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 harbor-rewardkit 0.2.3

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

Source distribution (sdist)

Source distribution for harbor-rewardkit 0.2.3
File Size Uploaded
harbor_rewardkit-0.2.3.tar.gz 53.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for harbor-rewardkit 0.2.3
File Interpreter ABI Platform
harbor_rewardkit-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 124.1 kB

Release files / harbor_rewardkit-0.2.3.tar.gz

Download URL harbor_rewardkit-0.2.3.tar.gz
Size 53.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b3e87a6c887057d5fa90fdaff308e5a520007041605a947f6ea73d5f8a44d10e
BLAKE2b-256 checksum
How to use checksums
efa515d4020ab061517cbc1eaa217a9eb96b48388d44e514530514c70d2f95c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","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 / harbor_rewardkit-0.2.3-py3-none-any.whl

Download URL harbor_rewardkit-0.2.3-py3-none-any.whl
Size 70.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f42f115961769cdb835db395751fa9bf7c7ad3b5088200d245e0e8c6954dc25f
BLAKE2b-256 checksum
How to use checksums
89466b58824fa2a53c25ca3220a04ccab8e93656800a798a4e11364349b05e8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","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}
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