pub struct AgentRegistry { /* private fields */ }Expand description
Agent registry for managing agent definitions
Thread-safe registry that stores agent definitions and provides lookup functionality.
Implementations§
Source§impl AgentRegistry
impl AgentRegistry
Sourcepub fn with_config(config: &CodeConfig) -> Self
pub fn with_config(config: &CodeConfig) -> Self
Create a new agent registry with configuration
Loads built-in agents first, then loads agents from configured directories.
Sourcepub fn register(&self, agent: AgentDefinition)
pub fn register(&self, agent: AgentDefinition)
Register an agent definition
Sourcepub fn unregister(&self, name: &str) -> bool
pub fn unregister(&self, name: &str) -> bool
Unregister an agent by name
Returns true if the agent was removed, false if not found.
Sourcepub fn get(&self, name: &str) -> Option<AgentDefinition>
pub fn get(&self, name: &str) -> Option<AgentDefinition>
Get an agent definition by name
Sourcepub fn list(&self) -> Vec<AgentDefinition>
pub fn list(&self) -> Vec<AgentDefinition>
List all registered agents
Sourcepub fn list_visible(&self) -> Vec<AgentDefinition>
pub fn list_visible(&self) -> Vec<AgentDefinition>
List visible agents (not hidden)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AgentRegistry
impl RefUnwindSafe for AgentRegistry
impl Send for AgentRegistry
impl Sync for AgentRegistry
impl Unpin for AgentRegistry
impl UnsafeUnpin for AgentRegistry
impl UnwindSafe for AgentRegistry
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