review_loop_keyed

Function review_loop_keyed 

Source
pub fn review_loop_keyed(
    worker: AgentBuilder,
    reviewer: AgentBuilder,
    quality_key: &str,
    target: &str,
    max_rounds: u32,
) -> Composable
Expand description

Review loop with a custom quality key and target value.

Like review_loop but allows specifying which state key the reviewer writes to and what value signals completion.

§Arguments

  • worker — The agent that produces output.
  • reviewer — The agent that evaluates quality.
  • quality_key — State key the reviewer writes (e.g., "quality").
  • target — Value of quality_key that signals completion (e.g., "good").
  • max_rounds — Maximum iterations.