Environment variables#
2026-08-27
42 min read time
User-configurable environment variables for Hyperloom, grouped by purpose. Runtime parameters such as framework, tensor parallelism, prompt lengths, and phase toggles are configured with CLI flags; internal subprocess handoff envs are intentionally not listed as user configuration.
Variables marked Required must be set (using shell or $REPO_ROOT/.env)
or the CLI will exit fast at startup. Variables marked Optional have
sensible defaults; the default is shown in the Default column.
Precedence rule (applies everywhere): shell-exported env wins over .env.
See Hyperloom authentication and credentials.
Credentials#
These variables configure LLM gateway access and optional backend credentials. See Authentication and credentials for the accepted provider-side combinations and what each one enables.
Variable |
Required |
Default |
Description |
|---|---|---|---|
|
Conditional |
— |
Anthropic-side endpoint. Required together with |
|
Conditional |
— |
Anthropic-side key. Pairs with |
|
No |
— |
Claude CLI auth token alias, accepted in place of |
|
No |
— |
Extra request headers for the Anthropic side, for gateways that authenticate on a header of their own (for example Azure API Management). Newline-delimited |
|
No |
— |
Claude Max/Pro subscription token from |
|
Conditional |
— |
OpenAI-side endpoint. Required together with |
|
Conditional |
— |
OpenAI-side key. Pairs with |
|
No |
— |
Extra request headers for the OpenAI side. Same shape as |
|
No |
Derived from |
Orchestration model id on the Anthropic side. Falls back to the endpoint default, then the project-wide |
|
No |
Derived from |
Model id on the OpenAI side, used by the Codex backend. |
|
No |
— |
Internal alias, never derived from either side. GEAK runs on the Anthropic side ( |
|
No |
— |
Internal alias, never derived from either side. Set it only to point GEAK at a different endpoint than the Anthropic side. |
|
No |
Inherits |
GEAKv4 Claude Code workflow model id. |
|
No |
Inherits |
Forge Claude backend model id (fusion, rewrite, collective). Set when Forge should use a different Claude model than orchestration. |
|
No |
Inherits |
Forge Codex backend model id (fusion, rewrite, collective). Set when Forge should use a different Codex model than the OpenAI-side default. |
|
No (required |
Unset |
Base URL of your Langfuse deployment (for example, |
|
No (required |
Unset |
Langfuse project public key ( |
|
No (required |
Unset |
Langfuse project secret key ( |
Path environment#
The following variables configure filesystem paths for Hyperloom’s runtime dependencies and session data.
Variable |
Required |
Default |
Description |
|---|---|---|---|
|
No (recommended) |
|
This Hyperloom checkout. Used to locate |
|
Conditional |
Auto-cloned by |
Path to the SemiAnalysisAI/InferenceX repo, used by baseline / target analysis. |
|
No (installer auto-clones) |
|
|
|
No (installer auto-resolves) |
First of |
Pins the Claude Code binary the GEAK SDK path uses, so |
|
No |
|
Session directory root (logs, runs, mirrors, breakdown). Container images ship a writable |
|
No |
|
Private writable runtime state. Codex SDK turns create a unique mode- |
|
No (set by CLI) |
Set at session boot |
Absolute path to the active session directory. Written by the CLI when a session starts and inherited by every benchmark subprocess; session-path resolution prefers it over scanning |
|
No |
|
Legacy source-mirror root kept for compatibility. Current open-source dependency checkouts default to the repo-local cache root ( |
|
No |
|
Writable, repo-local base for auto-cloned open-source deps (TraceLens, Magpie, etc.), cloned per revision as |
|
No |
Resolved from installed |
Magpie package root for benchmark wrappers and patch inspection. |
|
Conditional |
Unset |
KernelForge checkout root, and the single canonical variable for it. Required whenever the forge kernel backend is enabled ( |
|
No |
Built-in model roots such as |
|
|
No (robustness-agent) |
Scan known paths |
Path containing |
|
No (monitor / multi-node) |
Unset |
Explicit session directory for the Robustness Monitor ( |
Workload configuration#
Set with CLI flags, not env vars. Pre-set ISL / OSL / CONC / PRECISION /
TP / EP env vars are ignored and overwritten (GPU_TYPE is a fallback when
--gpu-type is omitted).
Model / workload shape:
--model,--model-class,--framework,--framework-version,--precision,--tp,--ep,--isl,--osl,--conc,--max-model-len,--profile-osl.Goal / budget:
--target-gain,--max-hours,--target-summary,--target-tput,--compare-against-gpu.Cluster topology & multi-node backend:
--nodes,--gpus-per-node,--gpu-type,--mn-backend(rayjob/infera),--server-args(rayjob). Per-pod sizing, the pod image and pod-side env are the provisioning platform’s inputs, notoptimizeflags — the cluster already exists by the time the optimizer runs.PD disaggregation (infera):
--pd-mode disaggregated,--pd-prefill-nodes/--pd-prefill-tp/--pd-prefill-ep/--pd-prefill-extra-args,--pd-decode-nodes/--pd-decode-tp/--pd-decode-ep/--pd-decode-extra-args,--pd-transfer-backend,--pd-ib-device.Phase toggles:
--enable-roofline/--no-enable-roofline,--enable-conc-sweep/--no-enable-conc-sweep,--conc-sweep-concs,--no-framework-agent,--no-framework-local-explore,--no-kernel,--no-explore,--no-eval.Agent models:
--claude-model,--codex-model.Session / resume:
--resume-from,--force-resume,--reset-state.Quantization:
--quantize,--quantize-scheme.
Run inference_optimizer optimize --help for the exhaustive flag list.
Accuracy gates#
A candidate that clears the throughput bar must also hold accuracy before it is kept. Grading runs only after the throughput bar is cleared, and reads the score back from the run’s own eval output, so a gate never costs an extra eval and a regressing candidate never spends a verdict on itself.
In every lane a measured drop beyond the tolerance is a REVERT. A missing
verdict while a positive baseline accuracy is on record drops to
NEEDS_REVIEW — eval should have worked and didn’t. No baseline accuracy at
all degrades to a throughput-only KEEP rather than blocking every candidate,
so eval-less environments still make progress. Pass --no-eval to turn the
eval off for the whole run: the baseline anchors on throughput instead of
halting on a missing accuracy reference, and every candidate then lands on
that degraded path.
Variable |
Default |
Description |
|---|---|---|
|
|
Whether a serving benchmark runs the GSM8K eval. Turning it off removes the per-candidate accuracy signal entirely — accuracy regressions stop being caught. Ignored by scriptable workloads, whose correctness signal is the |
|
Derived under the session dir |
The scriptable quality gate’s reference artifact: |
|
On |
Gates the |
|
On |
Same gate for a framework source patch authored by a specialist. Same disable spellings. |
|
Unset (full task set) |
Caps the number of eval problems ( |
The tolerance is deliberately not an env knob: ACCURACY_THRESHOLD in
src/hyperloom/orchestrator/actions/executors/_accuracy_gate.py is a fixed
0.05, that is, a candidate must stay within 5 percentage points of the recorded
baseline accuracy.
Note that the score is measured once per candidate, not averaged over repeats.
On a full GSM8K run (1319 problems) the 5-point tolerance sits several standard
errors away from the baseline, so single-run noise does not trip it. Capping the
eval with a small MAGPIE_EVAL_LIMIT shrinks that margin sharply and can make
the gate noise-sensitive — prefer the full task set whenever a gate decision
depends on the result.
Eval generation bounds#
InferenceX runs lm-eval with max_tokens=min(16384, ctx-4096), so a sample that
does not converge spends that entire budget, and 1319 of them can consume the
whole baseline timeout. Every generation request is therefore capped, and the
terminators the model declares are supplied with it — lm-eval carries a single
eos_string and its concurrent request path does not send even that one, so a
model like Qwen3, which declares eos_token_id [151645, 151643], would
otherwise run with no end-of-turn stop condition at all.
Both are applied inside the eval process rather than passed in, which is what keeps them equal across the baseline and candidate arms. That symmetry is the whole point: the gate compares a difference of two scores, so a bound or a terminator that reaches only one arm biases the verdict instead of merely limiting it. Prefer leaving these alone; if you do change one, change it for the whole session rather than a single round.
Each run reports what it applied, to stderr as HYPERLOOM_EVAL_BOUNDS_SUMMARY
and to hyperloom_eval_bounds.json in the result dir, including how many
generations hit the ceiling. Check truncated there before concluding a score
is low for any other reason.
Variable |
Default |
Description |
|---|---|---|
|
|
Per-request generation ceiling. Never raises a lower ceiling a task already asked for. |
|
On |
Whether to read the model’s |
|
Unset (derived) |
Explicit terminators, separated by ASCII unit separator |
Set explicit terminators like this, quoting so the separator is a real 0x1f
byte:
export HYPERLOOM_EVAL_STOP_STRINGS=$'<|im_end|>\x1f<|endoftext|>'
Upstream keeps at most four stop strings, and the task’s own until list is what
its answer extraction depends on, so that list is never displaced: an explicit
HYPERLOOM_EVAL_STOP_STRINGS goes first, the task’s list next, and derived
terminators last. Derived token ids travel separately as stop_token_ids, which
has no such limit, so nothing is lost on a server that supports it.
Kernel-opt backend selection#
The following variables control the kernel optimization backend ladder.
Variable |
Default |
Description |
|---|---|---|
|
Unset (resolves to |
Selects the kernel-opt backend. Unset resolves to |
|
|
Max parallel kernel-opt attempts per request (per-kernel race fan-out). The runtime caps this by visible GPUs and per-attempt GPU reservation when it can detect them. |
|
|
Enables automatic runtime GEMM-shape capture for eligible single-node dense vLLM Forge tuning when no explicit shape input is available. Block-FP8 first reuses shapes from the TraceLens-selected steady-state trace of a successful Roofline with exactly matching model, workload, server arguments, environment, and backend controls. Missing or stale evidence triggers the same standard Roofline/ProfileExecutor/TraceLens steady-state pipeline as a fallback. Set to |
|
|
Timeout in seconds for the dense vLLM TunableOp recording benchmark. Block-FP8 fallback uses the standard Roofline/ProfileExecutor timeout. Values below |
|
Unset |
Cap on how many |
|
|
Wall-clock budget in minutes for one optimization, mirrored by the |
|
|
Makes aiter log each tuned-config lookup it hits, not only the ones it misses. Two checks have no input without it: the GEMM demand list, which learns the shapes the runtime actually asks for (config-derived shapes covered 0.4% of them), and the apply verdict, which cannot tell “the tuned table was never read” from “it was read and did not help”. A scan of 60 production logs found it set in none of them, so it is now injected by default. An operator value wins — set |
|
|
How many interleaved baseline/tuned pairs to re-measure before a GEMM tuning KEEP is reported as confirmed. One end-to-end measurement cannot separate a gain from drift on this fleet: three rounds of a single unchanged configuration spanned 58%, and one controlled repeat moved 16%. Each pair costs two extra benchmark rounds. When |
Fusion lane#
The fusion lane is Coordinator-owned and forge-only: it runs at KERNEL entry on
the forge branch, never as an agent request, and the default geak backend
returns before reaching it. Its gate needs a fusion-eligible framework
(sglang, vllm or vllm-aiter), a decode trace to discover from, and no
fusion that already succeeded this session.
Variable |
Default |
Description |
|---|---|---|
|
Unset (lane enabled) |
Truthy ( |
|
|
Wrapper timeout in seconds for one forge-fusion run. A payload |
|
|
Agent turn cap handed to forge-fusion for one run. A payload |
Collective optimization lane#
The collective lane is Coordinator-owned: it is dispatched directly at KERNEL
entry, never as an agent request. It requires TP > 1, a latest-snapshot
Exposed Communication % of at least 1% as parsed from the TraceLens executive
summary, a trace_analyze snapshot, and a source-resolved custom collective
candidate (all_reduce, reduce_scatter or all_gather) — vendor RCCL/NCCL
symbols are opaque binaries and never qualify.
Variable |
Default |
Description |
|---|---|---|
|
Unset (lane enabled) |
Truthy ( |
|
Unset |
Truthy runs ONLY the collective lane at KERNEL entry — GEAK, fusion, and per-kernel |
|
|
E2E |
|
Unset (disabled) |
Truthy allows a source-resolved collective to borrow shapes from the trace’s sole all-reduce workload family. The default rejects this inference because those shapes were not observed on that device symbol. |
|
|
Wrapper timeout in seconds for one forge-collective campaign; a collective iterates over N ranks per benchmark, hence the wide default. A payload |
|
Unset (wrapper default) |
Per-agent timeout in seconds, forwarded to forge-collective as |
Kernel source resolution#
A kernel candidate must resolve to a real source file before any backend can rewrite it. Resolution runs as a ladder: curated dictionary, then the trace-derived launcher frame, then a name grep. All three are deterministic and require no configuration. Agent analysis might add the model-backed tiers below.
Every run writes kernel_source_resolution.json next to the candidate report.
It answers one question per hot kernel — which file defines it, and which tier
decided that — in a versioned schema (schema_version, currently 1.0.0), so
consumers and triage read a contract rather than candidate internals.
Two model-backed tiers might sit on top of the deterministic ladder when
--analysis-route agent is used. The deterministic route never invokes either
tier. Agent-route network calls require an explicit
HYPERLOOM_LLM_SOURCE_PROVIDER; a model name alone never implies a provider or
endpoint. The tiers differ in scope, authority, and data exposure; the
constraints of one do not apply to the other.
Neither can fail a run: no model configured, a gateway error, a timeout or an unparseable reply all leave the deterministic result standing.
Fallback tier#
When it runs. Only for a candidate whose source_file is still empty after
all three deterministic tiers, and whose GPU share is at least 5%.
What it sends. One chat completion per such candidate, containing the kernel
symbol and every shortlisted path. The shortlist comes from a relaxed grep over
the known framework roots. File contents are not sent unless
HYPERLOOM_LLM_SOURCE_PREVIEW authorises it (see Source egress);
with it, each path is accompanied by its first 40 lines, capped at 2000
characters.
What it costs. One call per qualifying candidate, 60-second ceiling, no
retry. HYPERLOOM_LLM_SOURCE_MODEL overrides the selected provider’s model
setting. Claude uses CLAUDE_MODEL, then the project-wide
DEFAULT_CLAUDE_MODEL. Model settings are never borrowed across providers.
Authority: selection only. The model might return one of the exact shortlist
strings and nothing else. An invented path is rejected, as is any answer below
0.7 confidence. This is deliberate — an LLM-produced sentinel written into
source_file is what broke this pipeline originally.
Review tier#
The fallback only fires on an empty source_file, so it cannot catch the
deterministic tiers’ actual failure mode: not coming up empty, but coming up
confidently wrong. Measured across historical sessions, only 59% of
verifiable resolutions mention the kernel they claim to define, and
aten::fill_ alone has been resolved to four unrelated business files — each a
real, existing, root-resident source file passing every mechanical check.
When it runs. On the whole resolution table, including entries already filled in by the deterministic tiers. Entries below 1% GPU share are skipped.
What it sends. A single chat completion carrying up to 40 entries at once.
For each entry it includes the kernel symbol, GPU share, current path and
deciding tier. File contents follow the same rule as the fallback tier: nothing
is sent unless HYPERLOOM_LLM_SOURCE_PREVIEW authorises it. When it does, one
call can ship up to 40 file heads, considerably more than the fallback tier
sends per call — which is why the switch is global rather than per-tier.
What it costs. One call per run (not per candidate), 180-second ceiling, no
retry. Same provider and model resolution as the fallback tier. The response
must include every sent kernel_id exactly once. A missing, duplicate or extra
ID rejects the whole batch so a truncated response cannot masquerade as a
complete review.
Authority: it might rewrite, and it has no confidence threshold. Unlike the
fallback tier, this one is not restricted to a shortlist — it can replace any
entry’s path with any path, or drop a resolved entry back to unresolved. There
is no 0.7 confidence gate. The mechanical limit is that a rewritten path must
exist on disk and its resolved target must sit under a known framework root.
Symlinks cannot escape that boundary. TraceLens-style
path.py(247): function answers are split into a bare, openable path plus line
and function metadata. An unverifiable path is rejected and the original
stands. Curated op_to_source verdicts — including non_rewritable and
no_kernel — are authoritative and cannot be replaced by model review.
Every revision records previous_source_file and previous_method, so a bad
review is auditable and reversible, and review_notes lists every applied and
rejected change. The batch is staged before it is committed, so an exception
while validating one revision leaves every entry untouched. Failures — no model
configured, gateway error, timeout, unparseable reply — leave the deterministic
table untouched and are recorded in review_notes.
Accepted revisions are folded back into hot_kernels, all metadata derived from
the old path is cleared, and patchability is recomputed. The resolution JSON is
the audit view of the same effective candidate state, not a detached suggestion.
Source egress#
Both tiers call an external model provider, so what leaves the host is a deliberate boundary rather than a side effect of building a useful prompt.
Provider routing is explicit. Set HYPERLOOM_LLM_SOURCE_PROVIDER to
claude_agent_sdk. Claude requests use the native Claude
Agent SDK with all repository, shell, and web tools denied.
kernel_source_resolution.json records the provider, model, source-preview
decision, outcome and endpoint hostname. It never records keys, custom
headers, URL userinfo, query parameters or the full prompt.
Repository source is not sent by default. The file heads described above are
withheld unless HYPERLOOM_LLM_SOURCE_PREVIEW is set to 1/true/yes/on.
Without it both tiers still see candidate paths, which carry most of the
selection signal; with it, a review call can ship up to 40 file heads.
The serving command line is never forwarded verbatim. The tiers need backend
flags — the same MoE operator dispatches differently under
--moe-runner-backend triton and aiter — but EXTRA_*_ARGS also carries
credentials, model paths and user data. It is therefore tokenised, and only
flags on an explicit allowlist of backend selectors survive. A denied flag
consumes its value too, so the value cannot reappear as a stray token. Every
surviving value is dropped unless it is a short selector token. URL userinfo or
queries, authorization headers, JWTs, control characters, non-finite numbers,
vendor prefixes such as sk-, and long opaque strings are rejected. An
unbalanced quote discards the whole line rather than risking a partial parse.
Environment variables follow the same discipline: an explicit allowlist of path-selecting names, with the secret-name pattern applied on top.
Model config is allowlisted too. Only fields that select architecture,
expert layout or kernel format are included. Inside quantization_config, only
explicit quantization selectors survive; arbitrary vendor fields, nested
metadata and credential-shaped values are dropped.
Variable |
Default |
Description |
|---|---|---|
|
Unset (no network call) |
Required provider for source fallback/review: |
|
Unset |
Optional source-resolution model override. Otherwise resolves only from the selected provider’s own model variables; no cross-provider fallback. |
|
Unset (off) |
Authorise sending the first 40 lines of candidate source files to the model provider. Applies to both the fallback and review tiers. Leave unset unless the provider is an approved destination for repository content. |
How fallback failures surface#
The fallback tier is advisory and never fails a run. Every
outcome is recorded on the candidate as source_resolution_reason, so a skip
can be told apart from a genuine failure:
|
Meaning |
|---|---|
(absent) |
Resolved before fallback, so the tier was not reached |
|
Deterministic analysis explicitly prohibited model tiers |
|
Candidate below the 5% GPU-share floor; no call made |
|
No |
|
Grep found nothing to choose from; no call made |
|
Model answered but the pick was rejected (invented path, low confidence, or refusal) |
|
Call failed — import error, gateway rejection, or timeout |
Accepted answers are stamped source_resolution_method="llm_fallback" alongside
a source_resolution_confidence, so they can be audited separately from
deterministic resolutions. Failures in the trace-launcher tier are recorded the
same way under trace_resolver_error: ..., and both are logged at WARNING.
Single-node Ray execution#
Variable |
Default |
Description |
|---|---|---|
|
Unset ( |
Controls whether single-node serving benchmarks and |
Codex (OpenAI) agent sandbox#
Selects how a Codex agent session (TraceLens analysis and every future
Codex-based agent) is contained. The secure default is workspace-write.
Codex implements both contained presets with bubblewrap, so Hyperloom executes
a real namespace-and-mount capability probe before starting the SDK. Merely
finding a bwrap executable is insufficient: if the current kernel or
container prevents it from establishing the sandbox, workspace-write and
read-only fail closed before the app-server starts. There is no automatic
fallback to bypass.
bypass is a deliberate double opt-in. Set both
HYPERLOOM_CODEX_SANDBOX_MODE=bypass and
HYPERLOOM_CODEX_EXTERNAL_SANDBOX=1; the second variable confirms that an
external container or sandbox already enforces the required isolation. It does
not create that boundary. A confirmed bypass maps to Codex full access even
when no writable roots are declared, because the external sandbox is
authoritative. Under the contained modes, no writable roots remains
read-only. Unknown modes and incomplete bypass configuration fail
immediately.
Variable |
Default |
Description |
|---|---|---|
|
|
|
|
Unset |
Set exactly to |
Single-node Ray GPU scheduling#
These variables tune the single-node Ray execution path (active when
INFERENCE_OPTIMIZER_RAY_EXEC=1 and --nodes=1). They have no effect on
multi-node runs or when the Ray backend is disabled.
Variable |
Default |
Description |
|---|---|---|
|
|
Maximum number of GPU specialists that can be simultaneously in-flight (pending Ray scheduling + running) on the single-node Ray path. Ray still serializes execution on the physical GPU(s) using |
|
On |
When enabled (default), the dispatcher defers admitting new GPU research specialists while a serving benchmark holds the whole-machine |
Multi-node / prefill-decode (PD)#
Use CLI flags for multi-node topology and prefill-decode configuration:
--nodes, --mn-backend, --gpus-per-node, --tp, --ep,
--pd-mode, --pd-prefill-nodes, --pd-decode-nodes, --pd-prefill-tp,
--pd-decode-tp, --pd-transfer-backend, and --pd-ib-device.
optimize never creates or releases a multi-node cluster. The provisioning
platform (for example, Primus-Claw) creates the RayJob or InferaDeployment and hands it
over through the variables below; without a hand-off --nodes >= 2 exits 2.
Cluster hand-off variables#
HYPERLOOM_MN_EXT_SERVICE_URL is the only variable that tells the optimizer a
cluster is ready; the rest describe how to reach it.
Variable |
Backend |
Required |
Description |
|---|---|---|---|
|
both |
yes |
Benchmark frontend URL ( |
|
infera |
yes |
Private SSH key already authorized on the pods (the platform installs the public half at create time). |
|
infera |
PD |
Prefill / decode pod IPs (comma-separated) for PD-disaggregated runs. |
|
infera |
aggregated |
Worker pod IPs (comma-separated) for aggregated (non-PD) runs. At least one of |
|
infera |
No (default |
SSH base port; decode role is offset |
|
infera |
No |
|
|
rayjob |
No (recommended) |
Ray head IP (Dashboard |
|
rayjob |
No |
Ray Dashboard auth token, only if the dashboard is authenticated. |
Infera external mode requires HYPERLOOM_MN_EXT_SSH_KEY plus at least one
*_IPS list, or the run fails fast at startup. RayJob external mode ignores
the SSH / IP vars and uses HYPERLOOM_MN_EXT_HEAD_IP for restarts.
Multi-node SSH fanout creates session-scoped keys under the active session
directory. Treat mn_id_ed25519 and mn_id_ed25519.pub as sensitive session
artifacts: keep the session directory on an access-controlled filesystem and
do not publish it unchanged in support bundles.
Quantization prelude#
Variable |
Default |
Description |
|---|---|---|
|
Unset |
Primary switch ( |
|
Unset |
AMD Quark checkout used by the quantization-agent. Set this explicitly when quantization is enabled. |
Enablement admission#
Enablement is not configured through the environment. Both self-heal lanes
are admitted by the --enablement {off,launch,eval,all} CLI flag, which defaults
to all:
launch— a baseline that cannot boot routes into patch authoring.eval— a baseline that boots and measures throughput but fails its accuracy eval (crashes, produces no result, or scores below the floor) routes into patch authoring. Single-node only; multi-node keeps the strict stop.all(default) — both lanes.off— neither lane engages, and a baseline that keeps failing terminates the run withstop_reason='baseline_failed'instead of opening an authoring loop.
The accuracy floor shared by the eval trigger and the enablement KEEP gate is the
fixed constant _accuracy_gate.DEFAULT_ENABLEMENT_ACCURACY_FLOOR (0.05). It is
a collapse guard rather than a quality bar: a score of exactly 0.0 always fails,
otherwise score >= floor passes.
Framework / source-tree discovery#
The following variables configure framework source discovery and path overrides.
Variable |
Default |
Description |
|---|---|---|
|
Union with |
Colon-separated list of source roots used by PolicyGate and flag discovery. Populated automatically by |
|
Unset |
Colon-separated list of extra directories the harvest step scans for stray |
|
Aiter default |
Override the aiter just-in-time (JIT) cache root. See Targeted builds (Rung 5). |
|
|
When |
|
Unset |
Pin the sglang server-patch step to specific upstream versions; advanced compatibility option. |
|
|
Set to |
|
Unset (check enabled) |
Truthy skips the |
|
Unset |
Optional bare-metal AITER install pin. When unset, the installer selects the newest tag compatible with the installed torch/triton stack. |
|
|
Controls the FRAMEWORK phase semantic-audit LLM deep-read. |
Targeted builds (Rung 5)#
These variables control the Rung-5 off-loop compiled-component acquisition step (AITER FP4/MLA/NSA kernels, sgl-kernel, and vLLM from source). All are optional; defaults are safe for standard single-node deployments.
Variable |
Default |
Description |
|---|---|---|
|
Unset ( |
Set to |
|
Aiter default |
Per-attempt override set automatically to |
|
Detected |
Explicit GPU target architecture (e.g. |
|
|
Parallelism cap for cmake/hipcc compile steps inside a targeted build. Reduce on memory-constrained nodes ( |
|
Unset |
Explicit interpreter that launches the server for a from-source build (the venv Python the artifact was compiled against). Set automatically from |
|
Unset |
ROCm pip index URL used as the default vLLM adapter wheel index; also seeds the index allowlist. |
|
Unset |
Comma-separated allowlist of pip index URL prefixes; a candidate wheel index must match one of these prefixes or provisioning is refused (supply-chain safety). |
|
Unset |
Comma-separated allowlist of git origin URL prefixes; a candidate repo origin must match one of these prefixes or provisioning is refused (supply-chain safety). |
|
Unset |
Override the SGLang source repo URL for the sgl-kernel / SGLang-from-source enablement build. |
|
Unset |
Pin the SGLang source ref (tag/branch/sha) for the enablement build. |
|
Unset |
SGLang wheel index URL for the enablement build. |
Supply-chain security:
HYPERLOOM_ENABLEMENT_INDEX_ALLOWLISTandHYPERLOOM_ENABLEMENT_ORIGIN_ALLOWLISTare security controls. When set, only pip index / git origin URLs matching one of the listed prefixes are accepted for runtime provisioning; any non-matching candidate is refused.
Security compatibility switches#
These switches keep production-compatible behavior by default while still allowing operators to turn off credential/env persistence in hardened deployments.
Variable |
Default |
Description |
|---|---|---|
|
Unset ( |
Specialist subprocesses inherit the limited provider credential set by default: |
|
|
|
|
Unset ( |
Slurm carrier only. Set to |
Critic / Robustness / knowledge base (KB)#
The following variables configure the Critic, Robustness, and knowledge base components.
Variable |
Default |
Description |
|---|---|---|
|
|
Exclusive Recipe backend: |
|
|
Local Recipe/KG root. It is not used for Recipe data in remote mode. |
|
Unset |
Deprecated explicit local Recipe root compatibility input, overridden by |
|
|
Framework-agent KB root, holding the lessons ledger the FRAMEWORK phase reads and writes. The only supported override: the |
|
Unset |
KB Store endpoint. Required when |
|
Unset |
KB Store bearer token. Required when |
|
Runtime-generated |
Internal remote-mode handoff where out-of-process agents stage their section knowledge and files. Hyperloom creates and exports it; operators must not set it. The facade is inactive when it is absent. |
|
Runtime-generated |
Internal remote-mode handoff pointing agents at the downloaded |
|
Unset |
Optional GBrain endpoint for Framework PR capabilities. It never enables or satisfies Recipe remote mode. |
|
Unset |
Optional GBrain bearer token for Framework PR capabilities. It never enables or satisfies Recipe remote mode. |
|
Derived from |
Override location of the critic-agent runtime. |
|
|
Output-token cap for one critic review call. A reply cut off at the cap is retried once at twice this value and then fails the turn, so the cap is a ceiling rather than a budget: unused headroom is never billed, while a truncated reply bills the whole call and yields nothing. Lower it for a model whose own output limit is smaller. A non-positive or unparseable value logs a warning and falls back to the default. |
|
Derived from |
Override location of the robustness-agent runtime. |
|
Unset |
Set to |
Session / observability hand-off#
These are read by src/hyperloom/inference_optimizer/session/manifest.py and the src/hyperloom/inference_optimizer/breakdown/collectors/
package to populate session_breakdown.json for downstream consumers.
Variable |
Description |
|---|---|
|
Hosted SaFE / Claw session id, written to |
|
Hosted SaFE / Claw user id, written to |
|
Primary switch (default off) for live Langfuse trace push. See details below. |
HYPERLOOM_LANGFUSE_ENABLE details:
Primary switch (default off) for live Langfuse trace push.
SDK install: when this flag is on,
src/hyperloom/inference_optimizer/assets/install.shauto-installs the optionallangfuseSDK on demand and skips it entirely when off — no separatepip install '...[trace]'is required.Live push: when set to
1/true/yes/onand the threeLANGFUSE_*credentials are present, every in-process LLM call is mirrored into Langfuse while the run is live. A session-end flush backfills out-of-process children (geak, forge, robustness, specialist) and KEEP/REVERT decision Scores.Local ledger:
reports/trace/*.jsonlis always written regardless of this flag. If the SDK is unavailable, live push degrades to a no-op.Correlation: the Langfuse trace ID and
session_idgrouping are derived fromclaw_session_id(envCLAW_SESSION_ID), falling back to the internal session ID for standalone runs. Live push and the offlinebackfill_langfuseCLI collapse onto one trace per Primus-Claw session.Span layout:
trace → phase span (PRELUDE/FRAMEWORK_AGENT/EXPLORE/KERNEL_AGENT/SWEEP/…) → agent span (component: orchestration/kernel/specialist/critic/geak/forge/…) → Generation. Each KEEP/REVERT/gain_pctScore attaches to the agent span that produced the decision, with a trace-level fallback when no matching span exists.Recipe-KB spans: under the
recipe_kbagent span, local reads/writes and remote KB Store publish attempts are recorded fromruntime/recipe_snapshot/.audit.jsonl. Read spans usekb:recipe_snapshot:<method>; write spans usekb:recipe_write:<generator>, where the generator distinguishes normalclosefromt4_fallback. Remote rows reportwritten,skipped, orerrorwithout recording credentials or payload bodies.Receipt: every session records a
langfusesection insession_breakdown.json(andreports/trace/langfuse_receipt.json) noting:Whether push was enabled (or the
disabled_reason)The redacted connection config (host and key-presence booleans — never the keys themselves)
The derived
trace_idandsession_idHow many generations, scores, and spans were sent
This lets an operator confirm post-hoc whether a run reached Langfuse.
Langfuse and artifact-package — security and known limitations#
Sensitive data surface: When live push is on,
conversations.jsonl(and Langfuse Generations) carry full prompt/response text.redact_secretsscrubs common token shapes (Bearer,sk-/pk-, GitHub tokens, someKEY=value) but is not a complete data loss prevention (DLP) filter — bare keys without a recognizable prefix (for example, raw AWSAKIA…) can slip through. The artifact packager also copiesreports/trace/*.jsonland, with the loose mode on by default (HYPERLOOM_SESSION_PACKAGE_LOOSE), drops them under/workspacefor the Claw sync. If a session might contain customer code or secrets, define an explicit retention + access-control policy for both the Langfuse project and the/workspacepackage destination, and consider disabling live push or loose packaging for those runs.live push+backfill_langfuseoverlap: Both derive the sametrace_idfromclaw_session_id, so running the offline backfill after a live run re-emits the out-of-process children onto the same trace and can duplicate observations. Use one path per session, or treat backfill as a recovery tool only when live push did not run.flush_sessionis idempotent, and retries only what failed: the session-end reconcile runs as named steps (leftover halves,ext/shards, recipe-KB audit, specialist intel, forge steps, GEMM tuning, decision scores, span close, final SDK flush). Each step runs at most once per process, so a duplicated CLOSE step won’t double-push; a step that raised is retried by the next call. The receipt reportsflush_steps_done(the steps that succeeded, for this process) andcounts_final, which istrueonly once every step has completed — afalsethere means the push is still incomplete, not that the session was short-lived. Across processes (a crash plus a--resume, or two shutdown paths racing), the durable unit is finer than a step:ext_rows_sentrecords how far eachext/*.jsonlshard was drained so its rows are never re-pushed while later ones still are, and the one-shotsession_start/session_breakdownpushes are claimed through an exclusive marker file (reports/trace/.session_start.claim) rather than through the receipt read. The audit backfills (recipe-KB, specialist intel, forge steps, GEMM tuning, decision scores) are not cursor-tracked: a second process that reaches CLOSE for the same session re-emits those spans. The receipt also carriespayload_sha256over its own body; a receipt whose hash does not match is ignored on read, so a torn file cannot suppress or replay the one-shotsession_start/ breakdown pushes.Package completeness:
PACKAGE_MANIFESTdescribes what was actually written, andincluded_filesnever names a file the package lacks. Checkcompletebefore treating a package as the whole selection; it isfalsewhenever anything selected is absent, and the reason is itemized indropped_files(the bundle caps at 5000 files / 256 MB and a very long session can stop it short, alongsidetruncated: true),failed_files(the write failed) orrefused_files(the entry was not a regular file inside the session — see below). The zip and the loose tree are written independently and each carries a manifest describing its own contents.Session boundary: a session directory is shared-filesystem state that agents write into, so the packager only bundles entries that resolve inside the session. A symlink pointing out of the session is refused rather than followed, which keeps unrelated file content from being copied to the dest root and synced onward.
Generation duration is ~0: Both live and backfill stamp a single timestamp (
end == start), so Langfuse shows no meaningful per-Generation duration — counts/usage are accurate, latency is not captured.
token_usage section (in session_breakdown.json)#
Every breakdown carries a top-level token_usage section: a promoted,
discoverable rollup of LLM token spend derived from the per-call ledger
(reports/trace/llm_calls.jsonl + ext/*.jsonl). It is purely derived from
decision_trace.token_rollup, so it always reconciles with that section. No
env var controls it; it is always present (zeroed on pre-trace sessions).
session_total: whole-session total across every call. Three counter families are kept apart because they are billed and interpreted differently: visible tokens (total_in/total_out), cache tokens (total_cache_creation/total_cache_read), and hidden reasoning output (total_reasoning_out— reported by reasoning models, absent from the reply text and therefore not part oftotal_out). Two convenience figures sit on top:total_in_out(visible prompt + completion only) andgrand_total(visible + all cache tokens + reasoning output — the all-in figure).by_component: per-agent breakdown (orchestration / kernel / critic / specialist / proposal_scorer / geak / forge / …), each with the same convenience totals.by_phase: per-phase breakdown (PRELUDE / FRAMEWORK_AGENT / EXPLORE / KERNEL_AGENT / SWEEP / CLOSE).attribution:attributed_to_decisionsvsunattributedsplit plusattributed_calls_pct. Only calls that carry atask_id/dyn_idjoining to a KEEP/REVERT or dynamic_action decision (for example, specialist subprocess turns) are attributed; orchestration / kernel / critic / proposal_scorer turns are LLM-internal and land inunattributed(this is expected, not a gap in the data).timeline: eachaction_timelinerow annotated with the tokens that join to it ontask_id. Rows whose action has no LLM spend showtokens: null(rather than a zero bucket) to make the sparsity explicit.
To get the single “total tokens for this run” number, read
token_usage.session_total.grand_total (all-in: visible + cache + reasoning)
or .total_in_out (visible prompt+completion only). Read
.total_reasoning_out on its own when comparing a reasoning model against a
non-reasoning one — the latter reports 0 there.
Phase tuning#
Variable |
Required |
Default |
Description |
|---|---|---|---|
|
Optional |
|
Absolute minimum remaining session seconds to justify opening a new macro-cycle. For bounded sessions the effective floor is |
Variables intentionally not exposed#
These are read by os.environ somewhere in the codebase but are
internal-only — do not set them by hand:
HYPERLOOM_KERNEL_AGENT_ROOT: internal CLI-only handoff to the kernel subprocess (Python constant_KERNEL_AGENT_ROOT_ENV).Any
_INFERENCE_OPTIMIZER_*_INTERNAL_*symbol: internal toggles for the test suite.
If you find one of these in a log message, treat it as diagnostic detail rather than something you should tune.
More info#
Use these resources for related configuration and reference information:
Hyperloom authentication and credentials: Credential precedence and direct upstream gateway wiring.
Troubleshooting Hyperloom: Symptom → variable reverse-lookup for common failures.