pub struct EnrichmentConfig {
pub enabled: bool,
pub max_parallel_prefetches: u32,
pub prefetch_budget_tokens: u32,
pub prefetch_timeout_ms: u32,
pub respect_rate_limits: bool,
}Expand description
Speculative-execution settings for the Paper 3 enrichment planner.
Off by default. Operators (or tune analyze --auto-enrichment)
flip enabled to true once the corpus statistics show that
speculation would have paid off. Once enabled, the host enforces
the budget and concurrency limits below per turn.
Schema-v4 — added in CURRENT_SCHEMA_VERSION = 4.
Fields§
§enabled: boolMaster switch. false (default) means the planner runs only in
telemetry-only mode: recent_tools is tracked, should_skip
can be consulted, but no out-of-band tools/call is dispatched.
Flip to true to enable real speculative pre-fetch.
max_parallel_prefetches: u32Maximum number of speculative pre-fetches the host issues in
parallel from a single turn’s EnrichmentPlan. Caps fan-out so
a Glob → 12 Read does not melt the API rate-limit. Default: 3
(matches the corpus finding that top-3 prefetch covers > 80%
of cited follow-ups).
prefetch_budget_tokens: u32Token ceiling for the speculative part of one turn — distinct
from the per-response budget. EnrichmentPlanner::build_plan
reads this when constructing TurnContext. Default: 8000 tokens
(~32 kB at the 4-byte-per-token heuristic).
prefetch_timeout_ms: u32Wall-clock budget the host waits for prefetches before returning the main response. Past this, the prefetch keeps running in the background (its result lands in the dedup cache when it returns) but the LLM gets the main response immediately
- a hint that a prefetch is in flight.
Default: 1000 ms — wide margin so typical Glob/Read can land synchronously, but small enough that a slow API never holds the agent.
respect_rate_limits: boolHonour [tools.<name>].rate_limit_host when scheduling
prefetches. When true, the host counts how many prefetches
per class are inflight this turn and skips new ones once the
cap is hit. Default: true — the only reason to disable is
for a benchmark harness with a known sandbox API.
Trait Implementations§
Source§impl Clone for EnrichmentConfig
impl Clone for EnrichmentConfig
Source§fn clone(&self) -> EnrichmentConfig
fn clone(&self) -> EnrichmentConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more