pub struct NanoAgentLoop { /* private fields */ }Expand description
Lightweight agent loop with customizable tool registry.
Implementations§
Source§impl NanoAgentLoop
impl NanoAgentLoop
Sourcepub async fn new(
bus: MessageBus,
provider: Arc<dyn LLMProvider>,
workspace: PathBuf,
model: Option<String>,
config: NanoLoopConfig,
tools: ToolRegistry,
file_manager: Arc<FileManager>,
) -> Result<Self, Box<dyn Error>>
pub async fn new( bus: MessageBus, provider: Arc<dyn LLMProvider>, workspace: PathBuf, model: Option<String>, config: NanoLoopConfig, tools: ToolRegistry, file_manager: Arc<FileManager>, ) -> Result<Self, Box<dyn Error>>
Create a new nano agent loop with a pre-built tool registry.
Sourcepub fn with_runtime_control(
self,
rx: UnboundedReceiver<NanoRuntimeControlCommand>,
) -> Self
pub fn with_runtime_control( self, rx: UnboundedReceiver<NanoRuntimeControlCommand>, ) -> Self
Create with runtime control channel.
Sourcepub fn tools(&self) -> &ToolRegistry
pub fn tools(&self) -> &ToolRegistry
Get the tool registry.
Sourcepub fn tools_mut(&mut self) -> &mut ToolRegistry
pub fn tools_mut(&mut self) -> &mut ToolRegistry
Get mutable tool registry for dynamic modification.
Sourcepub fn file_manager(&self) -> Arc<FileManager>
pub fn file_manager(&self) -> Arc<FileManager>
Get the file manager.
Auto Trait Implementations§
impl Freeze for NanoAgentLoop
impl !RefUnwindSafe for NanoAgentLoop
impl Send for NanoAgentLoop
impl Sync for NanoAgentLoop
impl Unpin for NanoAgentLoop
impl UnsafeUnpin for NanoAgentLoop
impl !UnwindSafe for NanoAgentLoop
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