Skip to main content
By default, harnest test --evals compiles the agent, runs the selected Python test lanes, evaluates every valid root eval set, and returns a nonzero status when the quality gate fails. To run a team-owned evaluation framework alone or alongside ADK, configure runner packages.

Run evaluations

The unit lane runs first. Add --smoke to run smoke tests before evaluation:
A failed Python lane stops later lanes. Scored failures do not stop other eval sets from running. Suites run once, in filename order. Judge metrics may make multiple calls according to numSamples. ADK evaluations have Harnest invocation identity, skills, assigned sandboxes, resources, and credentials. ADK owns the evaluation runner, so lifecycle and plugin behavior can differ from serving. Context expires when the invocation ends. Evaluation sessions are in-memory and separate from deployed sessions. The CLI owns its evaluation resources; the playground reuses serving resources. The CLI ADK runtime does not start task workers or cron schedules—use smoke or integration tests for queued workflows. Tools and external services can still have real side effects.
For native ADK workflow roots that use its legacy runner, such as SequentialAgent or a non-LlmAgent BaseAgent, Harnest rejects a plugin’s before_run_callback that returns replacement Content. Interrupting that response stream can skip invocation cleanup. Return None from the callback and produce the response from the agent or a tool instead. This restriction does not apply to the normal LlmAgent/node execution path.

Select the trajectory policy

business is the default. The flag affects only tool_trajectory_avg_score.

Save the complete result

Without --no-output, Harnest prints detailed evaluator output and a complete structured JSON EvalRunResult after evaluation. Select a machine-readable file instead of parsing mixed terminal output:
Harnest creates parent directories and atomically replaces the result file. For quiet CI output, combine the explicit file with --no-output:
--no-output suppresses unit, smoke, evaluator, and final result output in the terminal. It does not suppress an explicitly selected result file. --eval-output requires --evals.

Understand EvalRunResult

Check apiVersion, overall status, and scored-turn evidence. error indicates execution or scoring failure; an entirely unscored metric does not pass. See the EvalRunResult envelope reference. Infrastructure failures may leave partial results. Failures before evaluation starts may leave no file. Fix the runtime issue before assessing task quality.

Inspect in the playground

Run harnest serve AGENT_DIR, open /, and select Evals. The workspace lists root suites, configured and supported metrics, and the business and strict policies. You can run one suite and inspect case, metric, response, and tool-call evidence. Use the CLI result file for complete results; the playground is designed for interactive inspection.
For final-turn-only multi-turn metrics, the playground can currently mark a run as failed when earlier rows are not_evaluated, even if the CLI’s scored-turn gate passes. Use the CLI quality gate for CI and inspect the final scored turn when diagnosing this difference.

Use results in CI

The command exit status is the primary quality gate. You can also inspect a retained result after the command completes:
Configure your CI artifact-upload step to run even when harnest test fails. Otherwise the most useful failure diagnostics may be discarded.
Complete results can contain prompts, responses, tool arguments and results, rubric rationales, user IDs, and session state. Treat the file as sensitive. Apply short retention, restricted access, and your normal secret and personal-data controls. Do not publish it as an unrestricted build artifact.

Troubleshoot a run