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

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.2
File Size Uploaded
harbor_rewardkit-0.2.2.tar.gz 50.7 kB Details

Built distribution (wheel)

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

Total release size: 118.7 kB

Release files / harbor_rewardkit-0.2.2.tar.gz

Download URL harbor_rewardkit-0.2.2.tar.gz
Size 50.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2da53119de6e4d95034c5db019c8aaaf073ecd259b8ab8e702c5bc8604b3806e
BLAKE2b-256 checksum
How to use checksums
73ad96fea9aafa94562d50ab56729950469ff947f279099b86bcee10a80562d0
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.2-py3-none-any.whl

Download URL harbor_rewardkit-0.2.2-py3-none-any.whl
Size 68.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cebbffa4f7a56241adfe8d40dd7a7e34168a526a0c72d5fec7610b60f7f57f6
BLAKE2b-256 checksum
How to use checksums
f0fe0c1432a742255c799932111bf37ffb46d3ff3db3185b6aa0d580c9996b5f
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