Agent Eval Contract
Pydantic contracts and JSON Schemas for portable agent evaluation records.
Use this package when you are experimenting with agents, harnesses, CI checks, or benchmark runners and need a stable record shape for tasks, runs, scores, failures, and normalized external results. It does not run evaluations, call model providers, store dashboards, or orchestrate agents. It gives those tools a shared contract.
Install
pip install agent-eval-contract
For local development from this repo:
uv sync --dev
Validate A Record
from agent_eval_contract import validate_eval_run
run = validate_eval_run(
{
"run_id": "run-login-flow-001",
"task_id": "task-login-flow-001",
"harness": "pytest",
"model": "gpt-5",
"mode": "autonomous",
"context_profile": "repo_only",
"final_status": "success",
"checks": ["pytest tests/test_auth_redirect.py -q"],
}
)
print(run.model_dump(mode="json"))
Validation returns typed Pydantic model instances. Invalid records raise pydantic.ValidationError with structured field errors.
CLI
agent-eval-contract validate --kind run --file examples/eval_run.json
agent-eval-contract schemas --output-dir /tmp/agent-eval-contract-schemas
agent-eval-contract fixtures --output-dir /tmp/agent-eval-contract-fixtures
agent-eval-contract normalize --harness terminal-bench --file examples/terminal_bench_result.json --task-id task-login-flow-001 --model gpt-5
agent-eval-contract normalize --harness swe-bench --file examples/swe_bench_result.json
The legacy agent-eval-contract-fixtures command still writes fixture bundles for one release.
What It Provides
- Pydantic models for eval tasks, runs, scores, failures, external results, normalized runs, and fixture manifests
- runtime validators that return typed model instances
- JSON Schema export for all public models
- bundled sample records and markdown templates
- Terminal-Bench and SWE-bench oriented normalization helpers
- a small CLI for validation, schema export, fixture generation, and normalization
Contract Vocabulary
The public core uses generic vocabulary only. Project-specific concepts should live in metadata or a separate adapter package.
context_profile:repo_only,provided_context,clean_room,tool_augmented,full_workspacesource:manual,ci,benchmark,production_trace,syntheticmode:interactive,autonomous,shadow,replay,benchmarkfinal_status:success,partial,failed,abandoned,error
See docs/contract.md, docs/field-reference.md, and docs/adapters.md for the model contract and adapter guidance.
Development
uv run ruff check agent_eval_contract tests
uv run ruff format --check agent_eval_contract tests
uv run basedpyright agent_eval_contract tests
uv run pytest -q
uv build --out-dir /tmp/agent-eval-contract-dist
Metadata
Release files for agent-eval-contract 0.2.0
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 |
|---|---|---|---|---|
| agent_eval_contract-0.2.0.tar.gz | 21.4 kB | Without provenance | Details for agent_eval_contract-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_eval_contract-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for agent_eval_contract-0.2.0-py3-none-any.whl |
Total release size: 41.9 kB
Release files / agent_eval_contract-0.2.0.tar.gz
| Download URL | agent_eval_contract-0.2.0.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b345a6b67d08e8afa86e9bb2a27ace9d65446db72dcb7589482db163725f5f3
|
|
BLAKE2b-256 checksum How to use checksums |
235e63d9c428598fe73c5d445933378ada8d6aae76a69e0d89211fc5693cd22c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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 / agent_eval_contract-0.2.0-py3-none-any.whl
| Download URL | agent_eval_contract-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a6e2994945b920985e566f3627184c8a584305027b3675f8e65d038afc86cbd
|
|
BLAKE2b-256 checksum How to use checksums |
6b03e502f3561f1e991fd1d5b4ca4b9e916d0e18335719a048b43814cb92a628
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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 agent-eval-contract 0.2.0
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.