Skip to main content

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 with metric_name, threshold, config, invocations, and optional expected_invocations
  • EvalResult -- output payload with score (0.0-1.0), optional status, per_invocation_scores, and details (dict)
  • InvocationData -- a single agent turn with user_content, final_response, and intermediate_steps
  • IntermediateStepData -- the steps between user input and final response: tool_calls and tool_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)

Source distribution for agentevals-evaluator-sdk 0.2.0
File Size Uploaded
agentevals_evaluator_sdk-0.2.0.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentevals-evaluator-sdk 0.2.0
File Interpreter ABI Platform
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}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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