Evaluating AI agents entirely on the Hugging Face Hub

Overview of Hub-Based Agent Evaluation

Agentic AI evaluation has evolved beyond simple prompt-response testing to require complex, containerized environments that simulate real-world tasks. Hugging Face has standardized this process by enabling full-scale agent evaluation directly on the Hub. This approach uses HF Jobs for sandboxing, Inference Providers for model access, and private datasets for storing session traces, eliminating the need for local workstations or external vendor accounts.

The Technical Stack

The evaluation architecture leverages several integrated Hugging Face features to manage complexity and security:

  • HF Jobs Sandboxes: Provides isolated, ephemeral environments for agent execution. These sandboxes are configured with Landlock security policies to restrict network access, ensuring that agents and graders operate within defined boundaries.
  • Inference Providers: Allows seamless access to a wide range of open models without managing individual API keys, with costs billed directly to the organization.
  • Container Registry: Used to store and manage complex task images, including those requiring multi-stage Docker builds that exceed standard space-building capabilities.
  • Private Datasets: Acts as the central repository for session traces and results. This ensures that sensitive benchmark data remains private while allowing for transparent reporting of methods and scores.

Evaluating Physical-Engineering's Last Exam (PLE)

Hugging Face demonstrated this framework by evaluating six open models—including Hy4, Inkling-2-Mini, and GLM-5.3-Flash—on Google's Physical-Engineering's Last Exam (PLE) benchmark. The evaluation highlighted that the choice of agent harness (e.g., Terminus-2 vs. Codex) significantly impacts performance, sometimes by a factor of four. For instance, GLM-5.3-Flash performed better with Terminus-2, whereas Inkling models showed superior results with Codex, demonstrating that harness-model compatibility is a critical variable in agentic benchmarks.

Infrastructure Adapters

To bridge the gap between existing agent harnesses and the Hub's infrastructure, the team developed three key adapters:

  1. Harbor Environments: Custom adapters for the Harbor framework that interface with the HF Sandbox API, managing network rules and multi-stage Dockerfile execution.
  2. Image Handling: Using Kaniko within high-performance CPU jobs to build complex task images that are then streamed into sandboxes, bypassing limitations on private image access.
  3. Model Relays: A secure relay mechanism that allows agents running inside sealed sandboxes to communicate with model APIs without exposing credentials or violating network isolation.

Cost and Scalability

Running evaluations on the Hub is cost-effective and scalable. A full run of 29 tasks with 3 attempts each typically costs between $47 and $60, with inference being the primary driver of expense. The use of prompt caching significantly reduces costs for agents that resend context across multiple turns. Because the system utilizes a modular job-based architecture, partial failures can be addressed through targeted re-runs or regrading rather than restarting the entire benchmark, saving both time and compute resources.

Sources