pub struct Agent { /* private fields */ }Expand description
Provider-neutral agent orchestration.
The loop owns message ordering, permission admission, provider/local tool provenance, and the prepare-review-commit boundary. Network, UI, and disk remain behind injected traits.
Implementations§
Source§impl Agent
impl Agent
pub fn new( gateway: Arc<dyn Gateway>, tools: Arc<ToolRegistry>, options: AgentOptions, ) -> Self
pub fn with_context_projector( self, projector: Arc<dyn ContextProjector>, ) -> Self
pub fn run<'a>( &'a self, request: AgentRequest, tool_context: &'a ToolContext, permissions: &'a mut PermissionEngine, approvals: &'a mut dyn ApprovalHandler, events: &'a mut dyn AgentEventSink, ) -> BoxFuture<'a, Result<AgentResult, AgentError>>
pub fn run_controlled<'a>( &'a self, request: AgentRequest, tool_context: &'a ToolContext, permissions: &'a mut PermissionEngine, approvals: &'a mut dyn ApprovalHandler, events: &'a mut dyn AgentEventSink, cancellation: Arc<dyn CancellationSignal>, ) -> BoxFuture<'a, Result<AgentResult, AgentError>>
Auto Trait Implementations§
impl !RefUnwindSafe for Agent
impl !UnwindSafe for Agent
impl Freeze for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
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