ATIF Trajectory Adapter
The ATIF adapter integrates ATIF (Agent Trajectory Interchange Format) trajectory evaluation with the eval-hub evaluation service using the evalhub-sdk framework adapter pattern.
Overview
Section titled “Overview”ATIF is a JSON schema for recording agent trajectories: the task, every model turn, tool call, and environment observation an agent produced while running. The adapter takes already-recorded trajectories and scores them with an OpenAI-compatible LLM judge. It never reruns an agent, never executes trajectory tools, and never substitutes for a benchmark’s verifier.
Typical uses:
- Agent regression testing: score a fixed corpus of recorded trajectories after a prompt, model, or tooling change and compare aggregate scores over time.
- Failure analysis: every low-scoring step is classified into a fixed failure taxonomy, so common failure modes surface across a collection.
- Training-data selection: an optional threshold produces eligible/ineligible cohorts with source-addressable, hash-verified manifests.
Key Features
Section titled “Key Features”- Four scoring modes:
autoderives criteria from the task,benchmarkselects a built-in rubric,referencescores against a registry of expected answers, andcustomuses an inline or mounted rubric - Nested subagent support: embedded
subagent_trajectoriesare scored up to a configurable depth, withflat,hierarchical, orseparateaggregation - Failure categorization: steps below a threshold are classified as
tool_selection_failure,context_loss,policy_boundary_violation, orreasoning_failure - Bounded, observable judging: per-request byte caps, job-wide request budgets, retries with exponential backoff, and OpenTelemetry metrics
- Provenance by design: input SHA-256 hashes, source URIs, JSON Pointer selectors, and criteria/prompt versions are persisted with every result
Architecture
Section titled “Architecture”The adapter follows the eval-hub framework adapter pattern:
Workflow:
- Discover JSON files under the mounted input path and identify ATIF candidates, recording accepted/ignored/invalid files
- Resolve criteria — derive per-task criteria with the judge (
auto), or load a benchmark, reference, or custom rubric - Score each step of every accepted trajectory with bounded context, sequentially within each trajectory and concurrently across roots
- Aggregate node and subtree scores, and categorize steps below the failure threshold
- Persist versioned details, training selections, and provenance to MLflow
- Return compact metrics and an artifact index through the SDK callbacks, together with the MLflow run ID
Execution Contract
Section titled “Execution Contract”The SDK entry point is run_benchmark_job(config, callbacks) -> JobResults. config.model is the judge: any OpenAI-compatible chat completions endpoint.
Quick Start
Section titled “Quick Start”Building the Container
Section titled “Building the Container”make image-atifRunning Locally
Section titled “Running Locally”For local testing without Kubernetes, point the adapter directly at a judge endpoint:
# Set environment for local modeexport EVALHUB_MODE=localexport EVALHUB_JOB_SPEC_PATH=/run/job.json
# Mount a job spec, the trajectory collection, and the judge auth directory# --network=host lets the container reach services on the host, such as the# MLflow tracking server; 127.0.0.1 would otherwise be the container itselfpodman run --rm \ --network=host \ -e EVALHUB_MODE=local \ -e EVALHUB_JOB_SPEC_PATH=/run/job.json \ -e MLFLOW_TRACKING_URI=http://127.0.0.1:5000 \ -v $(pwd)/job.json:/run/job.json:ro \ -v $(pwd)/test_data:/test_data:ro \ -v ~/.config/atif-judge-auth:/mnt/judge-auth:ro \ quay.io/evalhub/community-atif:latestThe job spec references the judge through model.url and a file-based model.auth.secret_ref pointing at the mounted auth directory. See Judge Routing and Authentication and Examples for complete job specs.
Container Image
Section titled “Container Image”# Pull from registrypodman pull quay.io/evalhub/community-atif:latest
# Run with a custom job spec (inputs mounted at the documented paths)podman run \ --network=host \ -e EVALHUB_MODE=local \ -e EVALHUB_JOB_SPEC_PATH=/meta/job.json \ -e MLFLOW_TRACKING_URI=http://127.0.0.1:5000 \ -v $(pwd)/job.json:/meta/job.json:ro \ -v $(pwd)/test_data:/test_data:ro \ -v ~/.config/atif-judge-auth:/mnt/judge-auth:ro \ quay.io/evalhub/community-atif:latestNext Steps
Section titled “Next Steps”- Configuration — full parameter reference, judge routing, and input validation rules
- Scoring Modes — auto-derived, benchmark, reference, and custom rubrics
- Metrics — score semantics, aggregation, and the failure taxonomy
- Artifacts — MLflow artifact layout and training-data selection
- Examples — ready-to-run job specs for every scoring mode