pub struct AgentManager { /* private fields */ }Implementations§
Source§impl AgentManager
impl AgentManager
pub fn new( browser_manager: Arc<BrowserManager>, skill_engine: Arc<SkillEngine>, ) -> Self
pub async fn register_agent(&self, agent: Agent) -> Result<String, Error>
pub async fn authenticate_agent(&self, api_key: &str) -> Result<String, Error>
pub async fn get_agent(&self, agent_id: &str) -> Option<Agent>
pub async fn list_agents(&self, status: Option<AgentStatus>) -> Vec<Agent>
pub async fn update_agent( &self, agent_id: &str, updates: AgentUpdate, ) -> Result<(), Error>
pub async fn suspend_agent(&self, agent_id: &str) -> Result<(), Error>
pub async fn activate_agent(&self, agent_id: &str) -> Result<(), Error>
pub async fn ban_agent(&self, agent_id: &str) -> Result<(), Error>
pub async fn create_session( &self, agent_id: &str, browser_type: Option<String>, ) -> Result<String, Error>
pub async fn close_session(&self, session_id: &str) -> Result<(), Error>
pub async fn get_session(&self, session_id: &str) -> Option<AgentSession>
pub async fn list_sessions(&self, agent_id: Option<&str>) -> Vec<AgentSession>
pub async fn execute_browser_command( &self, session_id: &str, action: String, parameters: HashMap<String, Value>, ) -> Result<CommandResult, Error>
pub async fn execute_skill( &self, agent_id: &str, skill_id: &str, parameters: HashMap<String, Value>, ) -> Result<String, Error>
pub async fn get_agent_stats(&self) -> AgentStats
pub async fn init_default_agent(&self) -> Result<String, Error>
Auto Trait Implementations§
impl Freeze for AgentManager
impl !RefUnwindSafe for AgentManager
impl Send for AgentManager
impl Sync for AgentManager
impl Unpin for AgentManager
impl UnsafeUnpin for AgentManager
impl !UnwindSafe for AgentManager
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