pub struct AgentPool { /* private fields */ }Expand description
Agent pool for managing available agents
Implementations§
Source§impl AgentPool
impl AgentPool
Sourcepub async fn register_agent(
&self,
agent: Arc<dyn SimpleAgent>,
) -> OrchestrationResult<()>
pub async fn register_agent( &self, agent: Arc<dyn SimpleAgent>, ) -> OrchestrationResult<()>
Register an agent in the pool
Sourcepub async fn unregister_agent(&self, agent_id: &str) -> OrchestrationResult<()>
pub async fn unregister_agent(&self, agent_id: &str) -> OrchestrationResult<()>
Unregister an agent from the pool
Sourcepub async fn get_agent(
&self,
agent_id: &str,
) -> OrchestrationResult<Arc<dyn SimpleAgent>>
pub async fn get_agent( &self, agent_id: &str, ) -> OrchestrationResult<Arc<dyn SimpleAgent>>
Get an agent by ID
Sourcepub async fn find_suitable_agents(
&self,
task: &Task,
) -> OrchestrationResult<Vec<Arc<dyn SimpleAgent>>>
pub async fn find_suitable_agents( &self, task: &Task, ) -> OrchestrationResult<Vec<Arc<dyn SimpleAgent>>>
Find agents that can handle a specific task
Sourcepub async fn list_agents(&self) -> Vec<Arc<dyn SimpleAgent>>
pub async fn list_agents(&self) -> Vec<Arc<dyn SimpleAgent>>
Get all registered agents
Sourcepub async fn get_all_metadata(&self) -> Vec<AgentMetadata>
pub async fn get_all_metadata(&self) -> Vec<AgentMetadata>
Get agent metadata for all registered agents
Sourcepub async fn agent_count(&self) -> usize
pub async fn agent_count(&self) -> usize
Get the number of registered agents
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentPool
impl !UnwindSafe for AgentPool
impl Freeze for AgentPool
impl Send for AgentPool
impl Sync for AgentPool
impl Unpin for AgentPool
impl UnsafeUnpin for AgentPool
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
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