pub struct AgentClient { /* private fields */ }Implementations§
Source§impl AgentClient
impl AgentClient
pub fn new(controller: Arc<AgentController>, session_id: AgentSessionId) -> Self
pub fn with_resources(self, resources: Vec<ResourceBinding>) -> Self
pub fn session_id(&self) -> &AgentSessionId
Sourcepub fn with_default_extensions(self, extensions: Extensions) -> Self
pub fn with_default_extensions(self, extensions: Extensions) -> Self
Binds Host metadata to every new Run. Per-Run values cannot replace a conflicting Host value. Extensions are descriptive, not Tool grants.
Sourcepub async fn resume_run(
&self,
run_id: &RunId,
) -> Result<AgentRunHandle, AgentSdkError>
pub async fn resume_run( &self, run_id: &RunId, ) -> Result<AgentRunHandle, AgentSdkError>
Reattaches a durable Run in this Session through the Controller’s existing recovery contract. Never starts a replacement Run.
pub fn controller(&self) -> &Arc<AgentController> ⓘ
pub async fn start_text( &self, input: impl Into<String>, ) -> Result<AgentRunHandle, AgentSdkError>
pub async fn start_with_run_id( &self, run_id: RunId, input: Vec<Content>, ) -> Result<AgentRunHandle, AgentSdkError>
pub async fn start_with_run_id_and_extensions( &self, run_id: RunId, input: Vec<Content>, extensions: Extensions, ) -> Result<AgentRunHandle, AgentSdkError>
pub async fn start_session_action_with_run_id( &self, run_id: RunId, title: impl Into<String>, action: AgentSessionActionInvocation, ) -> Result<AgentRunHandle, AgentSdkError>
Trait Implementations§
Source§impl Clone for AgentClient
impl Clone for AgentClient
Source§fn clone(&self) -> AgentClient
fn clone(&self) -> AgentClient
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 AgentClient
impl !UnwindSafe for AgentClient
impl Freeze for AgentClient
impl Send for AgentClient
impl Sync for AgentClient
impl Unpin for AgentClient
impl UnsafeUnpin for AgentClient
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.