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-sonnet-5"
files = ["/app/main.py"]

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

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, 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.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 harbor-rewardkit 0.2.1
File Size Uploaded
harbor_rewardkit-0.2.1.tar.gz 46.3 kB Details

Built distribution (wheel)

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

Total release size: 109.4 kB

Release files / harbor_rewardkit-0.2.1.tar.gz

Download URL harbor_rewardkit-0.2.1.tar.gz
Size 46.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2d9a3719fc509d9598f39eb0eff5e0b3b43d4040cada1e0a3fa7f79ff7b60561
BLAKE2b-256 checksum
How to use checksums
bd476709ab9df3496d63f9859ee7aa936e6327b96733b76e76a41ed0904ec489
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.1-py3-none-any.whl

Download URL harbor_rewardkit-0.2.1-py3-none-any.whl
Size 63.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0108e9c4367f9850c77feea50ee7428ce6e443dc91c5d73c0fc19b9de56936b
BLAKE2b-256 checksum
How to use checksums
80a229c8a1c863f479eb79b29a4c9acb9f8c6a1b2b3ddd33cd5ba911fba48a23
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