Configuration
Experiment configuration lives in ahive.yaml file that you pass explicitly to hive create exp -c hive.yaml.
Field reference
Below, we document the fields that can be specified in a configuration YAML.Top level fields
-
apiversion(string, default:v1alpha1)
Configuration schema version. -
experiment_name(string, required)
Name of the experiment. Must be a valid DNS label ([a-z0-9-], max 63 characters, no leading-). If it ends with-, a random suffix is appended for uniqueness.
repo
Repository configuration for the experiment source code.
-
source(string)
Where the experiment source code comes from. Can be:- A remote git URL —
https://,ssh://, orgit@. - A local directory path (absolute or relative;
~and environment variables are expanded). The directory is uploaded directly, so you can run experiments on uncommitted local changes.
null), no source is uploaded — the base image must already contain the code at the sandboxworkdir. - A remote git URL —
-
files(list of strings, default:[])
Files and directories to include fromsource. An empty list includes everything. Patterns are applied in order; prefix an entry with!to exclude. Globs (*,?,[…]) are supported. Hidden files and symlinks are skipped. -
branch(string, default:main)
Branch to use when cloning a remote source. -
evaluation_script(string, default:evaluation.py)
Script that evaluates experiment results (path relative to repo root). -
evaluation_arguments(list, default:[])
Splits the evaluation into a multi-evaluator, with one entry per evaluator. Each entry is passed toevaluation_scriptas its command-line arguments. Write a single value for one argument, or a list for several. Requiresaggregation_script. -
aggregation_script(string, default:null)
Script that combines the per-evaluator results into the experiment’s final result. Only valid together withevaluation_arguments. See multi-evaluator. -
target_code(list of strings, default:[])
Code for agents to evolve. Must be a YAML list — see file list syntax. An empty list allows the Hive to evolve any file in the specified codebase (except for the evaluation script). Prefix an entry!to exclude it from evolution, e.g.,allows the Hive to evolve any file except forfixed.pyand the evaluation script. -
additional_context(list of strings, default:[])
Additional files to include as context. Must be a YAML list — see file list syntax.
The clone happens client-side. For private repos, consider using SSH (e.g.
git@github.com:<org>/<repo>.git).File list syntax
Thetarget_code and additional_context fields must be YAML lists. Each entry is a file path with an optional line range:
Multi-evaluator
By default a single evaluator produces the fitness. Settingevaluation_arguments splits the evaluation into several sub-evaluators that run concurrently on the available sandboxes, and an aggregation_script combines their results. This is useful when the objective decomposes into independent pieces (e.g. slices of a dataset, or several benchmarks) that can be scored in parallel.
How it works:
- For each entry in
evaluation_arguments, the Hive runsevaluation_scriptwith those arguments. Each sub-evaluator emits the usual final-line JSON:{"status": "success", "result": {"fitness": ...}}on success, or{"status": "failed", "error": ...}on failure. - The
aggregation_scriptreceives a single argument: the path to a JSON file holding the list of per-evaluator results, inevaluation_argumentsorder. Failed evaluators appear in that list too, so the aggregator must check eachstatusfield. - The aggregation script’s own output follows the same contract as
evaluation_script, and itsfitnessbecomes the experiment’s fitness.
The sub-evaluators run in parallel across sandboxes, so set
runtime.num_sandboxes
high enough to realise the parallelism. A good rule of thumb is one sandbox per
sub-evaluation times the number of parallel sub-evaluations.runtime
Controls experiment execution.
-
num_sandboxes(integer, default:1)
Number of parallel sandboxes to run. (Formerlynum_agents, now deprecated but still accepted.) -
max_runtime_seconds(integer, default:-1)
Maximum execution time in seconds.-1= unlimited. -
max_iterations(integer, default:-1)
Maximum iterations per agent.-1= unlimited. -
stochastic_evaluator(boolean, default:false)
Whether the evaluator is stochastic. Whentrue, the Hive accounts for evaluation noise by re-evaluating high-variance candidates so fitnesses can be compared reliably.
sandbox
Container environment configuration.
-
base_image(string, required)
Docker base image (e.g.python:3.14-slim). -
workdir(string, default:/app)
Working directory inside the container. -
setup_script(string, default:null)
Shell script to run before the experiment starts (e.g. install dependencies). Omit or set tonullif no setup is needed. -
evaluation_timeout(integer, default:60)
Maximum time (seconds) for the evaluation script to run. -
envs(list)
Environment variables to set in the container. Each entry has anameandvalue: -
services(list)
Sidecar services to run alongside the sandbox. Seesandbox.servicesbelow.
sandbox.resources
-
cpu(string, default:"1")
CPU limit (e.g."2","500m"). -
memory(string, default:"2Gi")
Memory limit (e.g."4Gi","512Mi"). -
accelerators(string)
GPU resources (e.g.a100-80gb:8). -
shmsize(string)
Size of/dev/shm(e.g."1Gi"). This is only supported ifacceleratorsis unspecified, or if an AWS accelerator is specified.
sandbox.services[]
Each entry defines a sidecar container that runs alongside the sandbox.
-
name(string, required)
Service name. -
image(string, required)
Docker image for the service. -
ports(list)
Ports to expose. Each entry has aport(integer) and optionalprotocol(TCPorUDP, defaults toTCP). -
envs(list)
Environment variables (same format assandbox.envs). -
command(list of strings)
Container entrypoint override. -
args(list of strings)
Arguments to the entrypoint. -
resources.cpu(string, default:"1")
CPU limit for this service. -
resources.memory(string, default:"2Gi")
Memory limit for this service.
provider.regions
-
regions(string or list of strings, default:us)
Where the sandboxes run, and so where the experiment’s code and data are processed:usfor only the US region, orallfor every region. Settingallmay help with GPU availability, since sandboxes can land on capacity in any region. Only setallif your code and data may leave the US.
prompt
Optional prompt configuration for the Hive agents. Omit this section entirely to use defaults.
-
context(string)
Experiment-specific context to provide to agents. -
ideas(list of strings)
Ideas that will be randomly sampled and injected into the Hive. -
attachments(list of strings, default:null) PDF reference material for agents. Accepts local PDF files, local directories, and PDF URLs.
PDF attachments
PDFs provide reference material for agents and are not included in candidate code.hive. Directories are searched recursively for PDFs.
Each PDF can be up to 20 MiB. URLs must return a PDF. The CLI validates attachments before creating the experiment.
agents
Which agents generate new versions of your code. Omit this section to run the default preset, medium-effort.
You can either specify a preset agent configuration, or choose a custom weighted list of models yourself.
-
preset(string)
A preset tier of agents, by name. One oflow-effort,medium-effort, orhigh-effort. -
models(list)
A custom ensemble of models. Each entry takes:model(string, required) — The model to run. Runhive list modelsto see the names.weight(float, default:1) — How likely the model is to be used, relative to the rest of the ensemble. Must be greater than 0.
hive get exp <name> reports the ensemble an experiment was created with.
Full example
hive.yaml
Next steps
Managing experiments
Create, monitor, and manage your Hive experiments.