pub struct Agent;Expand description
The agent role - typically an LLM that responds to prompts.
Agents receive prompts from clients and respond with answers, potentially invoking tools along the way.
Implementations§
Source§impl Agent
impl Agent
Sourcepub fn builder(self) -> Builder<Agent, NullHandler, NullRun>
pub fn builder(self) -> Builder<Agent, NullHandler, NullRun>
Create a connection builder for an agent.
Sourcepub fn v2(self) -> Builder<Agent, NullHandler, NullRun>
Available on crate feature unstable_protocol_v2 only.
pub fn v2(self) -> Builder<Agent, NullHandler, NullRun>
unstable_protocol_v2 only.Create an agent builder that uses the ACP protocol v2 API.
The SDK will negotiate v1 or v2 during initialization and convert supported messages at the transport boundary, so handlers can be written against v2 types while still serving v1 clients.
Requires the unstable_protocol_v2 crate feature.
Trait Implementations§
impl Copy for Agent
impl Eq for Agent
Source§impl HasPeer<Agent> for Agent
impl HasPeer<Agent> for Agent
Source§fn remote_style(&self, _peer: Agent) -> RemoteStyle
fn remote_style(&self, _peer: Agent) -> RemoteStyle
Returns the remote style for sending to this peer.
Source§impl HasPeer<Agent> for Conductor
impl HasPeer<Agent> for Conductor
Source§fn remote_style(&self, _peer: Agent) -> RemoteStyle
fn remote_style(&self, _peer: Agent) -> RemoteStyle
Returns the remote style for sending to this peer.
Source§impl Ord for Agent
impl Ord for Agent
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Agent
impl PartialOrd for Agent
Source§impl Role for Agent
impl Role for Agent
Source§type Counterpart = Client
type Counterpart = Client
The role that this endpoint connects to. Read more
Source§fn counterpart(&self) -> Self::Counterpart
fn counterpart(&self) -> Self::Counterpart
Returns the counterpart role.
Source§async fn default_handle_dispatch_from(
&self,
message: Dispatch,
connection: ConnectionTo<Agent>,
) -> Result<Handled<Dispatch>, Error>
async fn default_handle_dispatch_from( &self, message: Dispatch, connection: ConnectionTo<Agent>, ) -> Result<Handled<Dispatch>, Error>
Method invoked when there is no defined message handler.
impl StructuralPartialEq for Agent
Auto Trait Implementations§
impl Freeze for Agent
impl RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl UnwindSafe 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