hgym — Harness Gym
Environments for agents whose policy boundary is the tool surface.
hgym is a fresh start of LLM Gym, rebuilt
around one idea: the tool surface — the set of tools an agent can call — is the
program. Same environment, same model: {search, compose, terminate} is one research
program; {search, compose, draft, critique, revise, terminate} is draft-and-revise;
{answer, terminate} is one-shot. Surfaces compose as config diffs, not Python forks,
which makes them a target an optimizer can range over.
Environments are ToolUsingEnvs: a task loader, an initial observation, a pure
verifier, and a set of MCP servers. Tools are MCP
servers (in-process, stdio, or HTTP); episodes are session-keyed for safe concurrent
rollouts; termination is a reserved terminate tool or the horizon; verification is a
pure function over the recorded trajectory.
Design goals:
- Zero infrastructure.
pip install hgym, export an API key, run an episode. No Docker, no databases, no gateway servers. Traces are local JSONL files. - Provider-neutral. A thin model-client seam speaking the OpenAI-compatible wire schema; bring any provider, proxy, or local server.
- The optimizer workflow is first-class. Export an environment's harness as an editable directory (templates, model, tool manifest), let a human or an agent edit it, re-run, score.
Status
Pre-alpha. The core engine is ported and under active development; see the spec and roadmap. Not yet ready for use.
Quickstart (target API)
import hgym
rollouts = await hgym.run_episodes(
env_name="wordle_v1",
model="openai/gpt-5.2-mini",
num_tasks=50,
)
License
Apache-2.0. Portions derived from llmgym (© TensorZero, Apache-2.0) — see NOTICE.
Metadata
Release files for hgym 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hgym-0.0.1.tar.gz | 158.3 kB | Without provenance | Details for hgym-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hgym-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for hgym-0.0.1-py3-none-any.whl |
Total release size: 236.6 kB
Release files / hgym-0.0.1.tar.gz
| Download URL | hgym-0.0.1.tar.gz |
|---|---|
| Size | 158.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ce3046bd77eb5570878d6f512b6c0dd02e3afa46d01efebd85ae1e41493f347
|
|
BLAKE2b-256 checksum How to use checksums |
60158d6733d7f44e6799c83b6a89330b7d7e907268be018c47aa965b60108b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","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 / hgym-0.0.1-py3-none-any.whl
| Download URL | hgym-0.0.1-py3-none-any.whl |
|---|---|
| Size | 78.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ab8ace84582f6800d0153593515a774f3a07126986c92afea0bbf0c7d360172
|
|
BLAKE2b-256 checksum How to use checksums |
c5c15676e96227ced05556b20040ce7cfdb1af81b3138848982f09f4fc7130c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","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}
|
Security for hgym 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.