Quickstart
Run your first task and read its reward.
Follow the Introduction for definitions of tasks, agents, trials, and jobs.
The example runs a task locally, saves an immutable revision in Hatchery, and runs that revision in a hosted job. It needs no model key.
Before you begin
Install Bun 1.4 or later and Git. Then install the CLI from npm:
npm install -g htchry
The package installs hatchery and the shorter htchry alias. The commands in this guide use hatchery.
Local run, check, and regrade commands also require Docker and a compatible Python environment containing the Hatchery Python bridge supplied by the Hatchery team. To run only on Hatchery, skip the local run below; you need neither Python nor Docker on your computer.
Confirm that the CLI is available:
hatchery --help
Connect the CLI
Open Hatchery and sign in. Your default project holds your team's tasks, jobs, and results. You can rename it in Studio.
The CLI login must select the WorkOS organization that owns the project. Ask your organization owner for its org_... id, then run:
hatchery login --organization org_...
hatchery projects list
The second command lists the projects in that account. Copy the default project id for the next command. The task template saves it locally, so commands inside the task directory select the same project.
Make your first task
Create the example and select the project listed above:
hatchery init hello --project your-project-id
cd hello
The hello directory contains the complete task:
instruction.mdtells an agent to writehelloto/workspace/answer.txt.task.tomldescribes the container environments used for the work and the score.solution/solve.shis the reference solution. Theoracleagent runs it.tests/test.shis the verifier. It examines the agent's output and assigns a reward of 1 for the expected answer or 0 otherwise.
The generated hatchery.json contains only the selected project:
{
"project": "your-project-id"
}
Project commands use --project, then HATCHERY_PROJECT, then the nearest hatchery.json in the current directory or an ancestor. Commands inside hello select its project automatically. Initialization without --project writes {}; set its project or pass an override before using a project command.
Run locally
Start Docker and run the task with the oracle agent, which executes the reference solution:
hatchery run --path . --agent oracle \
--python /path/to/compatible/python --output ../results
The runtime creates the environment, runs the reference solution, and asks the verifier to score the outcome. A successful command creates a result under ../results with reward 1.
This complete run is a job. The example job contains one trial, meaning one agent attempt at the task. The reward is the verifier's score for that trial.
Run on Hatchery
Add --remote to run the same task on Hatchery:
hatchery run --path . --remote --agent oracle
The command pushes the task as an immutable revision, submits it to the native Harbor driver on Daytona, and waits for the job to finish. The hosted job continues if your computer disconnects.
Use the printed job id to inspect the job and its trial:
hatchery jobs printed-job-id
hatchery trials printed-job-id
hatchery open printed-job-id --kind jobs
The final command prints a Studio link. The verifier assigns a reward to each measured outcome. Coverage is the share of planned trials that produced valid measurements. A job can have a high average reward and low coverage when some trials are missing or invalid.
Continue
- Tasks and datasets explains package layout, stable names, revisions, and benchmark datasets.
- Jobs covers other agents, repeated trials, local and hosted runs, secrets, and evidence.
- Checks adds dataset-wide lint, rubric, and custom checks.
- Pages publishes selected benchmark results and task samples.