pub struct MagenticContext {
pub task: Message,
pub chat_history: Vec<Message>,
pub participant_descriptions: Vec<(String, String)>,
pub round_count: usize,
pub stall_count: usize,
pub reset_count: usize,
pub task_ledger: Option<MagenticTaskLedger>,
}Expand description
Mutable state threaded through the Magentic manager and orchestrator. Rust
analogue of MagenticContext.
Fields§
§task: MessageThe task message.
chat_history: Vec<Message>The running conversation history.
participant_descriptions: Vec<(String, String)>Participants as (name, description) pairs.
round_count: usizeThe number of coordination rounds taken.
stall_count: usizeThe consecutive stall count.
reset_count: usizeThe number of replans performed.
task_ledger: Option<MagenticTaskLedger>The decomposed task ledger (facts + plan) this run last planned, set
by MagenticManager::plan and updated by
MagenticManager::replan.
It lives on the run rather than on the manager, which is what makes a
shared manager safe. replan builds its “update these facts” prompt
from the previous ledger, and the plan-review and stall-intervention
requests render it for a human to read and approve — so a ledger held
on a manager that two runs share lets one run replan from the other’s
facts, and shows a reviewer the other run’s plan to sign off. Being
part of the context also means it is checkpointed with the rest of the
run, so a resumed run can still replan (upstream #8581).
None before the first plan, and for a manager that tracks no
decomposed ledger of its own.
Implementations§
Source§impl MagenticContext
impl MagenticContext
Trait Implementations§
Source§impl Clone for MagenticContext
impl Clone for MagenticContext
Source§fn clone(&self) -> MagenticContext
fn clone(&self) -> MagenticContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more