Parent: #1481 (Eval harness foundation — decomposed per owner request)
This is Step 2 of the eval harness. Depends on #1514 (Step 1: task set).
Scope (this issue — ≤200 lines)
Build the agent runner — a function that takes an EvalTask, executes the agent against it, and captures the full trajectory (all tool calls, arguments, results, model turns). This is the execution layer.
Specific changes
-
EvalTrajectory dataclass: captures the full execution record:
task_id: which task was run
tool_calls: list of {tool, args, result, timestamp} dicts
model_turns: number of model round-trips
final_answer: the agent's final text output
duration_seconds: wall-clock time
error: exception if the agent crashed, else None
-
run_eval_task(task: EvalTask, agent_config: dict) -> EvalTrajectory: the core runner function. Spins up a minimal agent session (pinned base config), feeds the task prompt, and records the trajectory.
-
Trajectory serialization: EvalTrajectory.to_dict() / .to_jsonl() for output to scores.jsonl.
-
Agent config pinning: accept a base config (model, tools, system prompt) so runs are reproducible.
What this issue does NOT do
Success criteria
Dependencies
Existing code checked
scripts/evolution_evaluator.py — scoring rubric only, does not execute agents
- No existing agent runner for eval in the codebase (verified by grep)
Parent: #1481 (Eval harness foundation — decomposed per owner request)
This is Step 2 of the eval harness. Depends on #1514 (Step 1: task set).
Scope (this issue — ≤200 lines)
Build the agent runner — a function that takes an
EvalTask, executes the agent against it, and captures the full trajectory (all tool calls, arguments, results, model turns). This is the execution layer.Specific changes
EvalTrajectorydataclass: captures the full execution record:task_id: which task was runtool_calls: list of{tool, args, result, timestamp}dictsmodel_turns: number of model round-tripsfinal_answer: the agent's final text outputduration_seconds: wall-clock timeerror: exception if the agent crashed, else Nonerun_eval_task(task: EvalTask, agent_config: dict) -> EvalTrajectory: the core runner function. Spins up a minimal agent session (pinned base config), feeds the task prompt, and records the trajectory.Trajectory serialization:
EvalTrajectory.to_dict()/.to_jsonl()for output toscores.jsonl.Agent config pinning: accept a base config (model, tools, system prompt) so runs are reproducible.
What this issue does NOT do
Success criteria
EvalTrajectorydataclass with all fieldsrun_eval_task()executes agent and captures trajectoryDependencies
EvalTaskExisting code checked
scripts/evolution_evaluator.py— scoring rubric only, does not execute agents