pub struct AgentHostBuilder {
config: Config,
root: PathBuf,
models: ModelProviderCatalog,
agent_directories: Vec<ResourceDirectory>,
tool_bindings: Option<ToolBindings>,
policy: RuntimePolicy,
approvals: Arc<dyn ApprovalHandler>,
}Expand description
Trusted inputs for assembling one direct-execution agent host.
Fields§
§config: Config§root: PathBuf§models: ModelProviderCatalog§agent_directories: Vec<ResourceDirectory>§tool_bindings: Option<ToolBindings>§policy: RuntimePolicy§approvals: Arc<dyn ApprovalHandler>Implementations§
Source§impl AgentHostBuilder
impl AgentHostBuilder
pub fn new( config: Config, root: &Path, models: ModelProviderCatalog, ) -> Result<Self>
pub fn with_agent_resources(self, directories: Vec<ResourceDirectory>) -> Self
Sourcepub fn with_tool_bindings(
self,
directories: Vec<ResourceDirectory>,
catalog: ToolImplementationCatalog,
authority: Arc<HostToolAuthority>,
) -> Self
pub fn with_tool_bindings( self, directories: Vec<ResourceDirectory>, catalog: ToolImplementationCatalog, authority: Arc<HostToolAuthority>, ) -> Self
Install trusted tool factories and explicit host-issued authority.
Sourcepub fn with_policy(
self,
policy: RuntimePolicy,
approvals: Arc<dyn ApprovalHandler>,
) -> Self
pub fn with_policy( self, policy: RuntimePolicy, approvals: Arc<dyn ApprovalHandler>, ) -> Self
Set the host permission ceiling and approval handler.
The builder grants no capabilities unless this method is called.
Sourcepub async fn build(self, agent_name: &str) -> Result<AgentHost>
pub async fn build(self, agent_name: &str) -> Result<AgentHost>
Assemble the existing direct runtime for one agent and its delegation graph.
async fn build_initialized(self, agent_name: &str) -> Result<AgentHost>
async fn build_with_initialized_store( self, agent_name: &str, initialized: bool, ) -> Result<AgentHost>
Sourcepub async fn build_task_submitter(
self,
agent_name: &str,
) -> Result<AgentTaskSubmitter>
pub async fn build_task_submitter( self, agent_name: &str, ) -> Result<AgentTaskSubmitter>
Resolve and persist accepted task intent without constructing providers, binding tools, resolving secrets, or invoking runtime behavior.
Sourcepub async fn build_worker(
self,
options: AgentWorkerOptions,
) -> Result<AgentWorker>
pub async fn build_worker( self, options: AgentWorkerOptions, ) -> Result<AgentWorker>
Assemble an explicitly started foreground worker. No background work is
started until AgentWorker::run is awaited.
Sourcepub fn resolve_task_identity(
&self,
agent_name: &str,
) -> Result<ResolvedTaskIdentity>
pub fn resolve_task_identity( &self, agent_name: &str, ) -> Result<ResolvedTaskIdentity>
Compute the immutable, non-secret identity accepted by a task. This static path does not open the application database.
Trait Implementations§
Source§impl Clone for AgentHostBuilder
impl Clone for AgentHostBuilder
Source§fn clone(&self) -> AgentHostBuilder
fn clone(&self) -> AgentHostBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AgentHostBuilder
impl !UnwindSafe for AgentHostBuilder
impl Freeze for AgentHostBuilder
impl Send for AgentHostBuilder
impl Sync for AgentHostBuilder
impl Unpin for AgentHostBuilder
impl UnsafeUnpin for AgentHostBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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