Task Structure
A Harbor task is a directory containing these components:Quick Start
Generate a task template using the CLI:Configuration File
Thetask.toml file defines task metadata and resource requirements:
task.toml
Configuration Options
Metadata
author_name- Task creator nameauthor_email- Contact emaildifficulty- Task difficulty level (easy/medium/hard)category- Task category (programming, reasoning, research, etc.)tags- List of relevant tags for filtering
Timeouts
verifier.timeout_sec- Maximum time for verification testsagent.timeout_sec- Maximum time for agent executionagent.setup_timeout_sec- Maximum time for agent setup (optional)
Environment Resources
cpus- Number of CPU cores (integer)memory- RAM allocation (e.g., “2G”, “4G”, “8G”)storage- Disk space (e.g., “10G”, “20G”)gpus- Number of GPUs (default: 0)gpu_types- Preferred GPU types (e.g., [“a100”, “h100”])allow_internet- Whether agent can access internetbuild_timeout_sec- Maximum time for Docker builddocker_image- Pre-built image to use (optional)
Instruction File
Theinstruction.md file contains the natural language task description:
instruction.md
Advanced Environments
For complex setups, install tools and configure the environment:environment/Dockerfile
Using Pre-built Images
For faster startup, specify a pre-built image:task.toml
GPU Support
For GPU-enabled tasks:task.toml
environment/Dockerfile
Verification Tests
The test script verifies the agent’s solution and writes a reward to/logs/verifier/reward.txt.
Simple Test Script
tests/test.sh
Using pytest
tests/test.sh
tests/test_solution.py
Partial Credit
For fine-grained evaluation, write a float reward (0.0 to 1.0):tests/test.sh
JSON Rewards with Metadata
Provide detailed feedback:tests/test.sh
tests/evaluate.py
Docker Compose Tasks
For multi-service tasks, use Docker Compose:environment/docker-compose.yaml
When using Docker Compose, the agent executes in the
main service. All other services are sidecars.MCP Server Integration
Provide Model Context Protocol servers to agents:task.toml
hello-mcp example task for a complete implementation.
Skills Integration
Provide reusable skills to agents:Reference Solutions
Provide a reference solution for testing:solution/solve.sh
Testing Your Task
Test Locally
Test the Environment
Test the Verifier
Best Practices
- Make instructions clear: Agents should understand the task from the instruction alone
- Specify exact paths: Use absolute paths in instructions and tests
- Test your verifier: Ensure tests pass with your reference solution
- Minimize environment size: Use slim base images and multi-stage builds
- Set appropriate timeouts: Allow enough time but not too much
- Handle edge cases: Test with missing files, invalid input, etc.
- Use deterministic tests: Avoid tests that depend on randomness or timing
- Document assumptions: Explain any non-obvious requirements
Examples
Explore example tasks in the Harbor repository:examples/tasks/hello-world- Basic file creation taskexamples/tasks/hello-mcp- MCP server integrationexamples/tasks/hello-skills- Skills integrationexamples/tasks/hello-cuda- GPU-enabled taskexamples/tasks/llm-judge-example- LLM-based evaluation
Next Steps
Running Evaluations
Run evaluations on your custom tasks
Benchmark Adapters
Convert existing benchmarks to Harbor format
Custom Agents
Test your tasks with custom agents