pub struct Agent { /* private fields */ }Implementations§
Source§impl Agent
impl Agent
pub fn builder() -> AgentBuilder
pub fn llm(&self) -> &Arc<dyn Llm>
pub fn tools(&self) -> &Arc<dyn ToolSet>
pub fn sink(&self) -> &Arc<dyn EventSink>
Sourcepub fn injector(&self) -> Option<&Arc<ReflectionInjector>>
pub fn injector(&self) -> Option<&Arc<ReflectionInjector>>
Returns the agent’s ReflectionInjector, or None if the
builder wasn’t given one. run_reflexion uses this accessor to
reconfigure injected reflections between episodes; building an
agent without an injector and then passing it to run_reflexion
is a configuration error caught before any episode runs.
pub fn critics(&self) -> Option<&Arc<CompositeCritic>>
pub fn critic_trigger(&self) -> CriticTrigger
pub fn workspace(&self) -> Option<&Arc<Workspace>>
pub async fn run(&self, task: Task) -> Result<RunOutcome, AgentError>
Auto Trait Implementations§
impl Freeze for Agent
impl !RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl !UnwindSafe for Agent
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