agentic_test 0.3.1
agentic_test: ^0.3.1 copied to clipboard
Test agents without paying for every run: record real model answers once and replay them offline, and score agent behaviour with repeatable evals.
Changelog #
0.3.1 #
- Updated package documentation for the published 0.3.x release line.
0.3.0 #
Added #
EvalCheck.trajectory, withToolStepandTrajectoryMatch: assert the order tools ran in, not only that they ran.inOrderby default, because an agent that also called something else is odd rather than wrong;exactandanyOrderfor the cases where that is the contract. Arguments are contained rather than equal, so an extra optional argument does not fail a check.EvalReport.toJUnitXml(), so eval failures appear in CI beside unit-test failures rather than in a log. One entry per trial, so a case that passes four times in five reads as flaky instead of as a pass.EvalReport.fromJson,EvalReport.compareTo,EvalComparisonandEvalRegressionError: store a report as a baseline, and fail a build when the pass rate falls by more than a tolerance. The tolerance exists because a gate that fires on ordinary variance is a gate that gets disabled.EvalComparison.missingnames cases the baseline had and this run did not — the quiet way a suite stops testing something.EvalCaseReport.summary, the numbers-without-transcripts form a stored baseline restores to.
Changed #
EvalReport.passRateis counted per case rather than by walking trials, so a report restored from a baseline reports the rate it was saved with instead of zero.
0.2.0 #
- Released with the rest of the framework at 0.2.0, which it now depends on. No changes to this package's API or behaviour.
0.1.2 #
Initial release. The version follows the sibling packages it ships with.
- Cassettes.
RecordingChatModelrecords a real model's answers,ReplayChatModelplays them back offline, andcassetteModelchooses between them: it records when the file is missing orAGENTIC_RECORD=1is set, and replays otherwise. Replay fails with aCassetteMismatchErrornaming the first difference when a prompt or tool changes, andverifyExhaustedcatches a run that makes fewer calls. ARedactorkeeps secrets out of the file. - Evals.
EvalSuiterunsEvalCases repeatedly against an agent and reports pass rates. Checks cover success, answer text, tools called and not called, step and token limits, custom functions, and a model-graded rubric.EvalReportrenders as a summary, Markdown or JSON, andrequirePassRateturns it into a test assertion.