pub struct RunAgent {
pub agent: AgentId,
pub task: String,
pub max_steps: u32,
pub bound_target: Option<TargetId>,
pub primary_llm: Arc<dyn LlmClient>,
pub fallback_llm: Option<Arc<dyn LlmClient>>,
pub registry: Arc<ActionRegistry>,
pub browser: Arc<dyn BrowserPort>,
pub events: Arc<dyn EventBus>,
pub dom_extractor: Option<Arc<dyn DomExtractor>>,
}Fields§
§agent: AgentId§task: String§max_steps: u32§bound_target: Option<TargetId>§primary_llm: Arc<dyn LlmClient>§fallback_llm: Option<Arc<dyn LlmClient>>§registry: Arc<ActionRegistry>§browser: Arc<dyn BrowserPort>§events: Arc<dyn EventBus>§dom_extractor: Option<Arc<dyn DomExtractor>>Implementations§
Source§impl RunAgent
impl RunAgent
pub fn new( task: impl Into<String>, llm: Arc<dyn LlmClient>, registry: Arc<ActionRegistry>, browser: Arc<dyn BrowserPort>, events: Arc<dyn EventBus>, ) -> Self
pub fn with_target(self, target: TargetId) -> Self
pub fn with_dom_extractor(self, extractor: Arc<dyn DomExtractor>) -> Self
pub fn with_fallback(self, fallback: Arc<dyn LlmClient>) -> Self
pub fn with_max_steps(self, max_steps: u32) -> Self
pub async fn execute(self) -> Result<AgentHistoryList, AppError>
Auto Trait Implementations§
impl Freeze for RunAgent
impl !RefUnwindSafe for RunAgent
impl Send for RunAgent
impl Sync for RunAgent
impl Unpin for RunAgent
impl UnsafeUnpin for RunAgent
impl !UnwindSafe for RunAgent
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