pub struct Defaults {
pub runner: Option<String>,
pub env_from: Vec<String>,
pub max_hops: u32,
pub fuel_usd: f64,
pub max_runs: u32,
pub timeout_sec: u64,
pub max_recovery_attempts: u32,
pub max_concurrent_runs: usize,
pub max_spawn_generations: u32,
}Expand description
Factory-wide defaults, overridable per agent.
Fields§
§runner: Option<String>Runner used by agents that do not name one.
env_from: Vec<String>Names of environment variables forwarded to every agent’s CLI.
Most factories run one CLI that needs one credential, and repeating it under every agent
is a list that falls out of step the first time an agent is added. Per-agent
crate::Agent::env_from adds to this rather than replacing it, so an agent that needs a
token nobody else should hold names only that token.
max_hops: u32Maximum depth of a chain, in flights.
A hop is spent per flight and branches inherit the remaining count, so this bounds depth
and not breadth. See crate::itinerary.
fuel_usd: f64Shared cost budget for an entire itinerary, in US dollars.
max_runs: u32Deterministic backstop on total runs per itinerary.
Fuel is the intended bound on breadth, but it depends on runners reporting cost. This cap needs no runner cooperation and is therefore always enforced.
timeout_sec: u64Wall-clock limit for a single run.
max_recovery_attempts: u32How many times interrupted work may be restarted automatically.
A crash loop that restarts itself forever is a fork bomb that looks like resilience, so recovery is bounded like every other rail. Zero disables automatic recovery.
max_concurrent_runs: usizeHow many runs may be live at once, across the whole factory.
The one rail that protects the machine rather than a budget. Hops bounds depth, Fuel and the Reserve bound money, the run cap bounds a chain’s total — none of them bounds how many headless CLIs start simultaneously, which is what a fan-out over an unknown number of items produces. Excess work queues rather than being refused: a busy machine will not be busy in a minute, so delaying is right where refusing would silently drop work.
max_spawn_generations: u32How many generations of spawning separate a chain from the trigger that began it.
A spawned itinerary gets fresh Hops, so Hops cannot see across chains: without this an agent that spawns an agent that spawns an agent recurses forever while every individual chain stays perfectly inside its rails. This is Hops, one level up.