pub struct AgentInstance {
pub config: AgentConfig,
pub tools: Arc<Mutex<ToolRegistry>>,
pub middleware: MiddlewarePipeline,
}Fields§
§config: AgentConfig§tools: Arc<Mutex<ToolRegistry>>§middleware: MiddlewarePipelineImplementations§
Source§impl AgentInstance
impl AgentInstance
pub fn new(config: AgentConfig) -> Self
pub fn provider(self, provider: Arc<dyn ModelProvider>) -> Self
pub fn memory(self, memory: Arc<dyn MemoryProvider>) -> Self
pub fn engine(self, engine: Arc<dyn ReasoningEngine>) -> Self
pub fn policy(self, policy: AgentPolicy) -> Self
pub fn system_prompt(&mut self, prompt: &str) -> &mut Self
pub fn use_middleware(&mut self, middleware: Box<dyn Middleware>) -> &mut Self
pub async fn run(&self, input: &str) -> Result<String>
Auto Trait Implementations§
impl Freeze for AgentInstance
impl !RefUnwindSafe for AgentInstance
impl Send for AgentInstance
impl Sync for AgentInstance
impl Unpin for AgentInstance
impl UnsafeUnpin for AgentInstance
impl !UnwindSafe for AgentInstance
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