pub struct Budget {
pub max_turns: usize,
pub max_tokens: i64,
pub max_tool_calls: i64,
pub max_wall: Duration,
pub max_children: usize,
pub max_concurrent: usize,
pub max_depth: usize,
}Expand description
Caps an agent subtree (§7D). Zero fields = unset (default applies).
Fields§
§max_turns: usizeLLM round trips per run (default 6); hitting it is a LOUD incomplete.
max_tokens: i64Token pool for this subtree: min(own, parent remaining) at spawn, then enforced live against every ancestor pool.
max_tool_calls: i64Tool-call pool (same carve + live enforcement).
max_wall: DurationWall-clock lifetime from spawn, on the runtime Clock. SPEC: maxWallMs.
max_children: usizeDirect children (checked at spawn).
max_concurrent: usizeSimultaneously running children (default 8); excess wakes queue FIFO.
max_depth: usizeSubtree depth (checked at spawn, default 3).
Trait Implementations§
impl Copy for Budget
impl StructuralPartialEq for Budget
Auto Trait Implementations§
impl Freeze for Budget
impl RefUnwindSafe for Budget
impl Send for Budget
impl Sync for Budget
impl Unpin for Budget
impl UnsafeUnpin for Budget
impl UnwindSafe for Budget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more