pub struct ResearchStep { /* private fields */ }Expand description
An agent that proposes experiments, runs them, and decides when to stop.
Implementations§
Source§impl ResearchStep
impl ResearchStep
Sourcepub fn config_hash(&self) -> CacheKey
pub fn config_hash(&self) -> CacheKey
Content-addressable hash of this step’s configuration.
Every field that is not #[soma(skip_hash)], so adding one
cannot silently leave it out of the journal key.
Source§impl ResearchStep
impl ResearchStep
Sourcepub fn new(
model: impl Into<String>,
objective: impl Into<String>,
pipeline: Graph,
) -> Self
pub fn new( model: impl Into<String>, objective: impl Into<String>, pipeline: Graph, ) -> Self
A researcher that pursues objective by experimenting on
pipeline, asking model what to try next. Starts with an empty
seed and 20 iterations; adjust with
with_history and
with_max_iterations.
Sourcepub fn with_history(self, records: Vec<ExperimentRecord>) -> Self
pub fn with_history(self, records: Vec<ExperimentRecord>) -> Self
Seed the loop with what is already known. An agent that starts from an empty pool repeats work someone already did.
Sourcepub fn with_max_iterations(self, n: usize) -> Self
pub fn with_max_iterations(self, n: usize) -> Self
Cap the loop at n experiments. The cap is the budget, not the
goal — the agent may Conclude well before reaching it.
Sourcepub fn completed(&self, ctx: &StepCtx<'_>) -> Vec<ExperimentRecord>
pub fn completed(&self, ctx: &StepCtx<'_>) -> Vec<ExperimentRecord>
Every experiment behind this run, seed first, newest last.
Rebuilt from the turns rather than accumulated in a field. A step is a description of behaviour, not a place to keep state: derive the history and a replay reconstructs exactly the history the original run had, because it replays exactly the same results.
Trait Implementations§
Source§impl Serialize for ResearchStep
impl Serialize for ResearchStep
Source§impl Step for ResearchStep
impl Step for ResearchStep
Source§fn config_hash(&self) -> CacheKey
fn config_hash(&self) -> CacheKey
Derived: the pipeline under investigation is part of the key too, which the hand-written version left out — two research loops over different graphs shared a journal.