pub struct LoopContext<'a> {
pub agent_id: String,
pub task: &'a Task,
pub provider: Arc<dyn LlmProvider>,
pub substrate: Arc<dyn SubstrateProvider>,
pub approval_handler: &'a dyn ApprovalHandler,
pub event_emitter: EventEmitter,
pub max_iterations: usize,
pub embedding_provider: Option<Arc<dyn EmbeddingProvider>>,
}Expand description
Runtime context for the agentic loop, grouping shared resources.
Fields§
§agent_id: String§task: &'a Task§provider: Arc<dyn LlmProvider>§substrate: Arc<dyn SubstrateProvider>§approval_handler: &'a dyn ApprovalHandler§event_emitter: EventEmitter§max_iterations: usize§embedding_provider: Option<Arc<dyn EmbeddingProvider>>Optional embedding provider for computing embeddings before storage.
Auto Trait Implementations§
impl<'a> Freeze for LoopContext<'a>
impl<'a> !RefUnwindSafe for LoopContext<'a>
impl<'a> Send for LoopContext<'a>
impl<'a> Sync for LoopContext<'a>
impl<'a> Unpin for LoopContext<'a>
impl<'a> UnsafeUnpin for LoopContext<'a>
impl<'a> !UnwindSafe for LoopContext<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more