pub struct AgentExecutor<L: LlmProvider + ?Sized> {
pub config: ExecutorConfig,
pub audit_store: Option<Arc<AuditStore<dyn StorageBackend>>>,
pub identity: Option<Arc<AgentIdentity>>,
/* private fields */
}Expand description
Agent executor - runs agents with LLM backends
Fields§
§config: ExecutorConfigConfiguration
audit_store: Option<Arc<AuditStore<dyn StorageBackend>>>Audit Store (Phase 3)
identity: Option<Arc<AgentIdentity>>Hardware Identity (Phase 3)
Implementations§
Source§impl<L: LlmProvider + ?Sized> AgentExecutor<L>
impl<L: LlmProvider + ?Sized> AgentExecutor<L>
Sourcepub fn new(llm: Arc<L>, config: ExecutorConfig, gate: Arc<dyn Gate>) -> Self
pub fn new(llm: Arc<L>, config: ExecutorConfig, gate: Arc<dyn Gate>) -> Self
Create a new executor
Sourcepub fn with_identity(
self,
identity: Arc<AgentIdentity>,
audit_store: Arc<AuditStore<dyn StorageBackend>>,
) -> Self
pub fn with_identity( self, identity: Arc<AgentIdentity>, audit_store: Arc<AuditStore<dyn StorageBackend>>, ) -> Self
Attach a hardware-rooted identity and audit store (Phase 3)
Sourcepub async fn execute(
&self,
tenant_id: &str,
agent: &mut Agent,
prompt: &str,
capabilities: Vec<Capability>,
) -> Result<ExecutionResult, String>
pub async fn execute( &self, tenant_id: &str, agent: &mut Agent, prompt: &str, capabilities: Vec<Capability>, ) -> Result<ExecutionResult, String>
Execute an agent with a prompt and return the result
Trait Implementations§
Source§impl<L: LlmProvider + ?Sized> Clone for AgentExecutor<L>
impl<L: LlmProvider + ?Sized> Clone for AgentExecutor<L>
Auto Trait Implementations§
impl<L> Freeze for AgentExecutor<L>where
L: ?Sized,
impl<L> !RefUnwindSafe for AgentExecutor<L>
impl<L> Send for AgentExecutor<L>where
L: ?Sized,
impl<L> Sync for AgentExecutor<L>where
L: ?Sized,
impl<L> Unpin for AgentExecutor<L>where
L: ?Sized,
impl<L> UnsafeUnpin for AgentExecutor<L>where
L: ?Sized,
impl<L> !UnwindSafe for AgentExecutor<L>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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