zeroclaw-eval
Agent evaluation harness for ZeroClaw.
Phase 0 — deterministic replay. Runs the real agent loop against scripted
LLM responses (an LlmTrace fixture) and grades the outcome against declarative
expectations. Because the model output is fixed, a replay eval is free, fast, and
fully deterministic: it proves the agent machinery (tool parsing, dispatch,
multi-turn looping) behaves correctly given a known model output. It does not
measure model quality — that is the live mode added in a later phase.
CLI
# Replay every *.json fixture in the suite directory (defaults to ./evals)
# Point at an explicit suite, emit machine-readable JSON
Exits non-zero if any case fails, so it can gate CI. --mode live is reserved for
a later phase and currently returns a clear error.
Case format
A case is a JSON trace fixture: scripted LLM response steps per turn, plus
declarative expects the run is graded against.
Supported expectations: response_contains, response_not_contains,
response_matches (regex), tools_used, tools_not_used, max_tool_calls,
all_tools_succeeded.
Replay fixtures may only call tools the harness registers; Phase 0 ships a
side-effect-free echo tool (see tools::default_tools). Wiring the real
sandboxed tool registry for live evals is a later phase.
Library shape
case— theLlmTracefixture format + suite loading.replay::TraceLlmProvider— aModelProviderthat replays trace steps in FIFO order.tools— deterministic built-in tools the replay agent can dispatch.observer::RecordingObserver— captures tool-call outcomes and token usage.grader— non-panickingGradeResultchecks (theGradertrait is the extension point for side-effect/budget/LLM-judge graders in later phases).runner— builds an isolated agent per case, drives it, grades it.report— pass/fail aggregation, table + JSON rendering.