pub struct AgentFactory;Expand description
Factory for creating domain agents
This struct creates domain agent instances from configuration, loading domain knowledge and capabilities from configuration files.
§Examples
ⓘ
use ricecoder_agents::domain::AgentFactory;
let factory = AgentFactory::new();
let config = AgentConfig { /* ... */ };
let agent = factory.create_agent("web", &config)?;Implementations§
Source§impl AgentFactory
impl AgentFactory
Sourcepub fn create_agent(
&self,
domain: &str,
config: &AgentConfig,
) -> DomainResult<DomainAgent>
pub fn create_agent( &self, domain: &str, config: &AgentConfig, ) -> DomainResult<DomainAgent>
Sourcepub fn validate_config(&self, config: &AgentConfig) -> DomainResult<()>
pub fn validate_config(&self, config: &AgentConfig) -> DomainResult<()>
Sourcepub fn load_from_json(&self, json: &str) -> DomainResult<AgentConfig>
pub fn load_from_json(&self, json: &str) -> DomainResult<AgentConfig>
Sourcepub fn load_from_yaml(&self, _yaml: &str) -> DomainResult<AgentConfig>
pub fn load_from_yaml(&self, _yaml: &str) -> DomainResult<AgentConfig>
Trait Implementations§
Source§impl Clone for AgentFactory
impl Clone for AgentFactory
Source§fn clone(&self) -> AgentFactory
fn clone(&self) -> AgentFactory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentFactory
impl Debug for AgentFactory
Auto Trait Implementations§
impl Freeze for AgentFactory
impl RefUnwindSafe for AgentFactory
impl Send for AgentFactory
impl Sync for AgentFactory
impl Unpin for AgentFactory
impl UnwindSafe for AgentFactory
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