pub struct Engine { /* private fields */ }Implementations§
Source§impl Engine
impl Engine
pub fn new(router: Arc<dyn Router>, config: Config) -> Self
pub fn with_memory(self, memory: Arc<dyn Memory>) -> Self
pub fn with_skills(self, skills: Arc<dyn SkillLibrary>) -> Self
pub fn with_identity(self, identity: Identity) -> Self
pub fn with_agent_store(self, store: Arc<dyn AgentStore>) -> Self
pub fn with_org_policy(self, policy: OrgPolicy) -> Self
pub fn with_hooks_config(self, hooks: Vec<Hook>) -> Self
pub fn with_approval_handler( self, approval_handler: Arc<dyn ApprovalHandler>, ) -> Self
Sourcepub async fn drive(
&self,
task: Task,
event_tx: UnboundedSender<Event>,
) -> Result<OutcomeSummary>
pub async fn drive( &self, task: Task, event_tx: UnboundedSender<Event>, ) -> Result<OutcomeSummary>
Drive one AgentRun to completion.
Sourcepub async fn drive_with_run_id(
&self,
task: Task,
event_tx: UnboundedSender<Event>,
run_id: RunId,
) -> Result<OutcomeSummary>
pub async fn drive_with_run_id( &self, task: Task, event_tx: UnboundedSender<Event>, run_id: RunId, ) -> Result<OutcomeSummary>
Drive with a caller-provided run id.
Sourcepub async fn drive_with_inject(
&self,
task: Task,
event_tx: UnboundedSender<Event>,
run_id: RunId,
inject_rx: Option<UnboundedReceiver<String>>,
) -> Result<OutcomeSummary>
pub async fn drive_with_inject( &self, task: Task, event_tx: UnboundedSender<Event>, run_id: RunId, inject_rx: Option<UnboundedReceiver<String>>, ) -> Result<OutcomeSummary>
Drive with an optional inject_rx channel that lets the caller inject
user messages mid-run. Polled non-blocking between turns. (§3.7)
Auto Trait Implementations§
impl !Freeze for Engine
impl !RefUnwindSafe for Engine
impl !UnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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