agentevals-evaluator-sdk
Lightweight SDK for building custom agentevals evaluators.
An evaluator is a standalone program that scores agent traces. It reads EvalInput JSON from stdin and writes EvalResult JSON to stdout. This SDK provides the Python types and a @evaluator decorator that handles all the plumbing.
Installation
pip install agentevals-evaluator-sdk
Usage
from agentevals_evaluator_sdk import evaluator, EvalInput, EvalResult
@evaluator
def my_evaluator(input: EvalInput) -> EvalResult:
scores = []
for inv in input.invocations:
score = 1.0 if inv.final_response else 0.0
scores.append(score)
return EvalResult(
score=sum(scores) / len(scores) if scores else 0.0,
per_invocation_scores=scores,
)
if __name__ == "__main__":
my_evaluator.run()
The @evaluator decorator marks your function as a runnable evaluator. Call .run() to execute it as a stdin/stdout script -- it reads JSON from stdin, calls your function, and writes the result to stdout. The decorated function can still be called directly in tests.
Types
EvalInput-- input payload withmetric_name,threshold,config,invocations, and optionalexpected_invocationsEvalResult-- output payload withscore(0.0-1.0), optionalstatus,per_invocation_scores, anddetails(dict)InvocationData-- a single agent turn withuser_content,final_response, andintermediate_stepsIntermediateStepData-- the steps between user input and final response:tool_callsandtool_responses
Documentation
See the custom evaluators documentation for the full protocol reference and examples in other languages.
Metadata
Release files for agentevals-evaluator-sdk 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 | |
|---|---|---|---|
| agentevals_evaluator_sdk-0.2.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentevals_evaluator_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / agentevals_evaluator_sdk-0.2.0.tar.gz
| Download URL | agentevals_evaluator_sdk-0.2.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
940560dd75359e0652039276dfe66a38667d7610aa98aea4f1f2cbc8c2881088
|
|
BLAKE2b-256 checksum How to use checksums |
b89f732b8bd033b77eada76eb8e54ef37ca8f8dd83cd8adfba530e36366c3e23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / agentevals_evaluator_sdk-0.2.0-py3-none-any.whl
| Download URL | agentevals_evaluator_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85f074b7e1b2fbb16b4d97e75e75c13dda77573d012914a20fb867f1bdcfdb86
|
|
BLAKE2b-256 checksum How to use checksums |
e86090f1607bf1c59ec20335196c9495fac82fa3081d7ef944431bd185069bd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|