Aether Evals
Aether Evals is a Rust library that makes writing agent evals easier to express as ordinary cargo-nextest tests.
Table of Contents
- Quick Start
- Test organization
- Core API
- Dockerized evals
- Assertions
- Debugging failed evals
- Git-backed evals
- Development
Quick Start
use ;
async
Run evals with nextest:
The CI profile writes JUnit XML to target/nextest/ci/junit.xml.
Test organization
Aether Evals' fake-agent coverage should use normal test names. Reserve _eval suffixes for real provider-backed evals selected by the repository evals nextest group.
Core API
Task::new(prompt)describes the problem to solve.Agent::run(task)streamsAgentMessages from an agent's configured execution environment.Transcript::from_stream(agent.run(task))collects the stream into aTranscript.Transcript::default()plustranscript.add(message)supports observing each streamed message while building the transcript manually.Container::builder(image).start(&workspace)starts a caller-owned Docker container with the workspace mounted at/workspace.DockerAgent::new(container, command)runs an in-container command whose stdout is newline-delimitedAgentMessageJSON.Container::exec_shell(script)runs follow-up assertions or test commands in the same caller-owned container.default_eval_env_vars()forwards provider credentials and Aether-related environment into Docker while settingAETHER_HOME=/root/.aether.Workspace::empty()creates an isolated temp directory.Workspace::from_dir(path)copies fixture directory contents into a temp directory.Workspace::from_git_repo(GitRepoSpec { url, start_commit, gold_commit, subdir })clones and checks out a git repository.Transcriptexposes collected agent messages, token usage, and tool-call helpers.
Dockerized evals
Aether Evals mounts the workspace root at /workspace and runs the command from the effective eval cwd. It does not wrap or alter prompts; the command receives the caller-provided prompt verbatim:
AETHER_EVAL_TASK_PROMPT— the caller-provided prompt to send to the agent unchanged.AETHER_EVAL_WORKSPACE_ROOT=/workspace— the mounted workspace root.AETHER_EVAL_CWD— the command's effective cwd inside the workspace.
Stdout is reserved for AgentMessage JSON lines and must end with a terminal message such as {"type":"done"}. Diagnostic logging should go to stderr.
use ;
let workspace = from_git_repo?;
let container = builder
.with_env_vars
.with_ephemeral_mount
.start
.await?;
let agent = new;
let prompt = "fix the failing test";
let transcript = from_stream.await?;
let tests = container.exec_shell.await?;
assert_eq!;
assert!;
Run follow-up container.exec_shell(...) assertions before dropping the caller-owned container and workspace.
A wrapper script for evaluating Aether itself can delegate to headless JSON output:
#!/bin/sh
A declarative eval:
Assertions
Use normal Rust assertions over the returned Transcript and files on disk:
let workspace = empty?;
let transcript = from_stream.await?;
assert!;
assert_eq!;
assert_eq!;
Aether Evals also exports small #[track_caller] helpers for common tool assertions:
assert_tool_called;
assert_tool_call_count;
assert_tool_call_with_args;
LLM judging runs through declarative eval files: add a rubric judge block to expect in a *.eval.json file. Each criterion is scored 0.0–1.0 by the judge model, weighted into an overall score, and blocking criteria below their threshold fail the eval. See the evals documentation for the file format.
Judge faults — transient LLM stream failures, unparseable responses, criterion sets that don't match the rubric — are recorded as failures on the eval's outcome rather than conflated with a "the agent didn't do it" verdict.
Debugging failed evals
TranscriptError preserves the partial transcript if an agent stream returns an error. Use error.transcript().messages() or error.into_parts() to inspect messages that were emitted before the failure.
Workspace removes its temporary directory when dropped. To retain files for debugging, call workspace.persist() and remove the returned path manually when finished.
For git-backed workspaces, workspace.capture_git_diffs() returns the agent-produced diff and the reference diff when available.
Git-backed evals
use ;
let workspace = from_git_repo?;
let prompt = "Make the test pass";
let transcript = from_stream.await?;
assert!;
Development