pub struct AgentManager { /* private fields */ }Expand description
Client for managing agent sessions, turns, events, and interactions.
Implementations§
Source§impl AgentManager
impl AgentManager
Sourcepub async fn connect(
invocation_token: impl AsRef<str>,
) -> Result<Self, AgentManagerError>
pub async fn connect( invocation_token: impl AsRef<str>, ) -> Result<Self, AgentManagerError>
Connects to the agent manager with an invocation token from the host.
Sourcepub async fn create_session(
&mut self,
request: AgentManagerCreateSessionRequest,
) -> Result<AgentSession, AgentManagerError>
pub async fn create_session( &mut self, request: AgentManagerCreateSessionRequest, ) -> Result<AgentSession, AgentManagerError>
Creates an agent session.
Sourcepub async fn get_session(
&mut self,
request: AgentManagerGetSessionRequest,
) -> Result<AgentSession, AgentManagerError>
pub async fn get_session( &mut self, request: AgentManagerGetSessionRequest, ) -> Result<AgentSession, AgentManagerError>
Fetches one agent session.
Sourcepub async fn list_sessions(
&mut self,
request: AgentManagerListSessionsRequest,
) -> Result<AgentManagerListSessionsResponse, AgentManagerError>
pub async fn list_sessions( &mut self, request: AgentManagerListSessionsRequest, ) -> Result<AgentManagerListSessionsResponse, AgentManagerError>
Lists agent sessions visible to the invocation token.
Sourcepub async fn update_session(
&mut self,
request: AgentManagerUpdateSessionRequest,
) -> Result<AgentSession, AgentManagerError>
pub async fn update_session( &mut self, request: AgentManagerUpdateSessionRequest, ) -> Result<AgentSession, AgentManagerError>
Updates mutable fields on an agent session.
Sourcepub async fn create_turn(
&mut self,
request: AgentManagerCreateTurnRequest,
) -> Result<AgentTurn, AgentManagerError>
pub async fn create_turn( &mut self, request: AgentManagerCreateTurnRequest, ) -> Result<AgentTurn, AgentManagerError>
Creates an agent turn.
Sourcepub async fn get_turn(
&mut self,
request: AgentManagerGetTurnRequest,
) -> Result<AgentTurn, AgentManagerError>
pub async fn get_turn( &mut self, request: AgentManagerGetTurnRequest, ) -> Result<AgentTurn, AgentManagerError>
Fetches one agent turn.
Sourcepub async fn list_turns(
&mut self,
request: AgentManagerListTurnsRequest,
) -> Result<AgentManagerListTurnsResponse, AgentManagerError>
pub async fn list_turns( &mut self, request: AgentManagerListTurnsRequest, ) -> Result<AgentManagerListTurnsResponse, AgentManagerError>
Lists turns for an agent session.
Sourcepub async fn cancel_turn(
&mut self,
request: AgentManagerCancelTurnRequest,
) -> Result<AgentTurn, AgentManagerError>
pub async fn cancel_turn( &mut self, request: AgentManagerCancelTurnRequest, ) -> Result<AgentTurn, AgentManagerError>
Cancels an in-progress agent turn.
Sourcepub async fn list_turn_events(
&mut self,
request: AgentManagerListTurnEventsRequest,
) -> Result<AgentManagerListTurnEventsResponse, AgentManagerError>
pub async fn list_turn_events( &mut self, request: AgentManagerListTurnEventsRequest, ) -> Result<AgentManagerListTurnEventsResponse, AgentManagerError>
Lists events emitted for an agent turn.
Sourcepub async fn list_interactions(
&mut self,
request: AgentManagerListInteractionsRequest,
) -> Result<AgentManagerListInteractionsResponse, AgentManagerError>
pub async fn list_interactions( &mut self, request: AgentManagerListInteractionsRequest, ) -> Result<AgentManagerListInteractionsResponse, AgentManagerError>
Lists pending or completed agent interactions.
Sourcepub async fn resolve_interaction(
&mut self,
request: AgentManagerResolveInteractionRequest,
) -> Result<AgentInteraction, AgentManagerError>
pub async fn resolve_interaction( &mut self, request: AgentManagerResolveInteractionRequest, ) -> Result<AgentInteraction, AgentManagerError>
Resolves an agent interaction with a host response.
Auto Trait Implementations§
impl !Freeze for AgentManager
impl !RefUnwindSafe for AgentManager
impl Send for AgentManager
impl Sync for AgentManager
impl Unpin for AgentManager
impl UnsafeUnpin for AgentManager
impl !UnwindSafe for AgentManager
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request