Overview
Harbor organizes evaluations into two hierarchical levels:- Trial: A single execution of one agent on one task
- Job: A collection of multiple trials across agents, tasks, and attempts
Trials
A trial represents one complete attempt by an agent to solve a task.Trial Lifecycle
Trial Phases
- Environment Setup: Build and start the execution environment
- Agent Setup: Install and configure the agent
- Agent Execution: Run the agent on the task
- Verification: Grade the agent’s solution
- Save Results: Persist trial results to disk
- Cleanup: Stop and optionally delete the environment
Trial Configuration
Trials are configured using theTrialConfig model:
Timeout Multipliers
Multipliers adjust phase-specific timeouts:timeout_multiplier: Applies to all phasesagent_timeout_multiplier: Agent execution onlyverifier_timeout_multiplier: Verification onlyagent_setup_timeout_multiplier: Agent setup onlyenvironment_build_timeout_multiplier: Environment build only
Multipliers are multiplicative with base timeouts from
task.toml.Trial Results
Each trial produces aTrialResult:
Timing Information
Each phase tracks start and end times:Exception Handling
When trials fail, exception details are captured:Trial Paths
Each trial has a dedicated directory structure:Jobs
A job orchestrates multiple trials, handling parallelization, retry logic, and result aggregation.Job Structure
TheJob class is the main entry point:
Job Configuration
Jobs are configured withJobConfig:
Running a Job
Via CLI:Trial Cartesian Product
Jobs generate trials as the cartesian product of:- Agents
- Tasks
- Attempts
- 2 agents × 10 tasks × 3 attempts = 60 trials
Parallel Execution
Control concurrency with--n-concurrent:
Job Results
Jobs produce aJobResult:
Job Statistics
TheJobStats class aggregates trial results:
Resuming Jobs
Jobs can be resumed if interrupted:- Loads existing trial results
- Identifies incomplete trials
- Runs only remaining trials
- Aggregates all results
Trial Hooks
Jobs expose lifecycle hooks for monitoring:Available Hooks
Hook Event
Registering Hooks
All Hook Methods
Orchestrators
Orchestrators manage trial execution and parallelization:Retry Configuration
Configure automatic retries for failed trials:Job Directory Structure
Best Practices
Concurrency
Concurrency
- Start with low concurrency (2-4) and increase gradually
- Monitor API rate limits
- Consider resource constraints (CPU, memory, network)
- Use cloud environments for high concurrency
Retry Strategy
Retry Strategy
- Enable retries for transient failures
- Set appropriate retry delays
- Limit max retries to avoid infinite loops
- Log retry attempts for debugging
Job Management
Job Management
- Use descriptive job names
- Include timestamps in job names for organization
- Archive completed jobs regularly
- Document job configurations
Result Handling
Result Handling
- Monitor jobs with hooks for real-time feedback
- Save intermediate results frequently
- Validate results after completion
- Export results to analysis tools
CLI Examples
Single Agent, Multiple Tasks
Multiple Agents, Comparison
With Custom Timeouts
Resume Interrupted Job
Related Topics
Tasks
Task structure and configuration
Agents
Agent implementation and execution
Verifiers
Verification and grading
Metrics
Result aggregation and metrics