EvalSet schema. Harnest validates them during compilation and keeps them out of the deployed agent’s prompts, tools, and capabilities.
Custom questions do not require a custom Python metric. Use this page to author cases with built-in scoring, or follow Create custom evals when you need to implement your own scoring rule.
Directory contract
AGENT_DIR/evals/
Nested SubAgent eval assets may be reached while validating composition, but
harnest test --evals runs only the root agent’s eval sets.
Author a static case
A static case replays each authoreduserContent and records the actual agent response. The authored finalResponse and intermediateData are the golden values used by reference metrics.
evals/city-facts.evalset.json
history="session" by default, which includes earlier user and assistant turns from that session. See Agents and graphs before selecting history="turn" for a context-dependent eval.
The expected behavior is explicit per turn:
Run the case with response and trajectory metrics, then inspect
evalMetricResultPerInvocation to compare actual and expected content and tool events on each turn. sessionDetails contains the evaluator session, state, and recorded events. See Run and inspect evaluation results.
Case fields
Exactly one of
conversation and conversationScenario is required.
Invocation fields
For ADK agents, Harnest removes response parts marked as model thoughts before metrics inspect the actual result. This keeps hidden reasoning out of response matching while preserving visible text and tool events. LangGraph evaluation already consumes the neutral runtime’s public result.
Configure criteria
Every key undercriteria names a built-in or custom metric. A numeric value is a threshold. Metrics with judge, rubric, hallucination, simulation, or trajectory options use an object containing threshold and their additional fields.
evals/test_config.json
test_config.json is absent, ADK’s default criteria are:
Choose tool trajectory behavior
Harnest names two policies and applies the selected policy totool_trajectory_avg_score without changing its threshold or any other metric.
matchType for this metric. Use separate business and strict CI lanes when you need both behavioral confidence and exact orchestration.
Add rubrics
Rubric metrics require at least one testable property. The simplest reusable location is the metric criterion intest_config.json:
type to FINAL_RESPONSE_QUALITY, TOOL_USE_QUALITY, or TRAJECTORY_QUALITY so ADK routes them to the intended built-in rubric evaluator. Keep rubricId values unique within the effective set. Criterion-level rubrics do not need a type. See Metrics reference for judge configuration and score behavior.