swink-agent-eval
Evaluation framework for swink-agent — trajectory tracing, golden-path matching, and cost/latency budget enforcement in one harness.
Features
EvalRunner— drives cases end-to-end against a user-providedAgentFactoryTrajectoryMatcher— match expected tool-call sequences with exact, subset, or ordered modes (MatchMode)ResponseMatcher— assertions on the assistant's final text (substring, regex, semantic)BudgetEvaluator/EfficiencyEvaluator— per-case cost, token, and latency governanceGateConfig— pass/fail gates on aggregate suite results (CI-friendly)FsEvalStore— persist trajectories and scores under a versioned directory layoutyamlfeature — loadEvalSets from YAML withload_eval_set_yaml- Audit log (
AuditedInvocation) — full request/response capture for replay and debugging
Quick Start
[]
= "0.8"
= { = "0.8", = ["yaml"] }
= { = "1", = ["full"] }
use ;
async
Architecture
A run is three staged components: a TrajectoryCollector captures every AgentEvent emitted by the loop, Evaluator implementations score the trajectory against an EvalCase's expectations, and EvalStore persists the result. Budget enforcement is attached at agent construction time by converting EvalCase.budget into BudgetPolicy / MaxTurnsPolicy via BudgetConstraints::to_policies(). Matchers are independent building blocks — you can run trajectory, response, and budget checks alone or compose them via EvaluatorRegistry.
No unsafe code (#![forbid(unsafe_code)]). Eval runs never mutate shared state outside the provided EvalStore.
Part of the swink-agent workspace — see the main README for workspace overview and setup.