pub struct AutonomousMode { /* private fields */ }Expand description
Per-agent autonomous continuation for a handoff workflow — upstream’s
with_autonomous_mode(agents=..., prompts=..., turn_limits=...). Set with
HandoffBuilder::with_autonomous_mode.
When an enabled agent answers without handing off, it is re-run with a continuation prompt as a user turn instead of the workflow stopping there, up to its turn limit; only then does the interaction mode’s own step run (asking the user, or completing). A handoff resets the agent’s count. This lets an agent work through a long task on its own while still handing back to a person eventually.
Implementations§
Source§impl AutonomousMode
impl AutonomousMode
Sourcepub fn new() -> AutonomousMode
pub fn new() -> AutonomousMode
Autonomous continuation for every participant.
Sourcepub fn for_agents<I, S>(self, agents: I) -> AutonomousMode
pub fn for_agents<I, S>(self, agents: I) -> AutonomousMode
Restrict autonomous continuation to the named participants. Without this every participant continues autonomously.
Sourcepub fn prompt(
self,
agent: impl Into<String>,
prompt: impl Into<String>,
) -> AutonomousMode
pub fn prompt( self, agent: impl Into<String>, prompt: impl Into<String>, ) -> AutonomousMode
The continuation prompt for one participant (default
DEFAULT_AUTONOMOUS_PROMPT).
Sourcepub fn turn_limit(
self,
agent: impl Into<String>,
limit: usize,
) -> AutonomousMode
pub fn turn_limit( self, agent: impl Into<String>, limit: usize, ) -> AutonomousMode
How many autonomous continuations one participant gets before control
returns to the user (default DEFAULT_AUTONOMOUS_TURN_LIMIT). 0
disables continuation for that participant rather than falling back
to the default, as upstream.
Trait Implementations§
Source§impl Clone for AutonomousMode
impl Clone for AutonomousMode
Source§fn clone(&self) -> AutonomousMode
fn clone(&self) -> AutonomousMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more