pub struct StandardMagenticManager { /* private fields */ }Expand description
The standard LLM-driven manager. Rust analogue of StandardMagenticManager.
§Safe to share between runs
This manager holds no run state. The decomposed task ledger it plans lives
on MagenticContext::task_ledger — the run’s own state — so a manager
shared by two concurrent runs, whether through one Arc handed to two
builders or through Workflow::run
taking &self, serves each from its own facts and plan.
That is a change in this port (upstream #8581, which made the same
guarantee by creating a manager per build). The ledger used to be cached
on the manager, where a second run’s planning overwrote the first’s, and
the cache was read at three places: replan, which builds its “update
these facts” prompt from it — so a run could be told to update the other
run’s facts, corrupting its reasoning rather than only a display — and the
plan-review and stall-intervention requests, where a human could be shown,
and asked to approve, the other run’s plan. None of it raised an error.
Moving the ledger onto the context also put it inside the run’s
checkpointed state, so a resumed run can replan; previously the ledger
died with the process and the first stall after a resume failed with
replan() called before plan().
Implementations§
Source§impl StandardMagenticManager
impl StandardMagenticManager
Sourcepub fn new(agent: Arc<dyn SupportsAgentRun>) -> StandardMagenticManager
pub fn new(agent: Arc<dyn SupportsAgentRun>) -> StandardMagenticManager
Create a manager driven by agent.
Sourcepub fn max_stall_count(self, n: usize) -> StandardMagenticManager
pub fn max_stall_count(self, n: usize) -> StandardMagenticManager
Set the stall threshold (default 3).
Sourcepub fn max_reset_count(self, n: usize) -> StandardMagenticManager
pub fn max_reset_count(self, n: usize) -> StandardMagenticManager
Set the maximum number of replans (default unbounded).
Sourcepub fn max_round_count(self, n: usize) -> StandardMagenticManager
pub fn max_round_count(self, n: usize) -> StandardMagenticManager
Set the maximum number of rounds (default unbounded).
Sourcepub fn progress_ledger_retry_count(self, n: usize) -> StandardMagenticManager
pub fn progress_ledger_retry_count(self, n: usize) -> StandardMagenticManager
Set the progress-ledger parse retry budget (default 3).