pub struct RemoteA2aV1Agent { /* private fields */ }Available on crate features
a2a-v1 and server only.Expand description
An agent that communicates with a remote A2A v1.0.0 agent.
Selects the best interface URL from the agent card’s
supportedInterfaces (preferring JSONRPC, falling back to HTTP+JSON)
and delegates to A2aV1Client for protocol-level communication.
Implementations§
Source§impl RemoteA2aV1Agent
impl RemoteA2aV1Agent
Sourcepub fn new(config: RemoteA2aV1Config) -> RemoteA2aV1Agent
pub fn new(config: RemoteA2aV1Config) -> RemoteA2aV1Agent
Creates a new v1 remote agent from the given configuration.
Sourcepub fn select_interface(card: &AgentCard) -> Option<&AgentInterface>
pub fn select_interface(card: &AgentCard) -> Option<&AgentInterface>
Selects the best interface from the agent card.
Prefers JSONRPC, falls back to HTTP+JSON.
Trait Implementations§
Source§impl Agent for RemoteA2aV1Agent
impl Agent for RemoteA2aV1Agent
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns a human-readable description of this agent’s purpose.
Source§fn sub_agents(&self) -> &[Arc<dyn Agent>]
fn sub_agents(&self) -> &[Arc<dyn Agent>]
Returns the child agents managed by this agent.
Source§fn run<'life0, 'async_trait>(
&'life0 self,
ctx: Arc<dyn InvocationContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Event, AdkError>> + Send>>, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
RemoteA2aV1Agent: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
ctx: Arc<dyn InvocationContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Event, AdkError>> + Send>>, AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
RemoteA2aV1Agent: 'async_trait,
Executes the agent and returns a stream of events.
Auto Trait Implementations§
impl Freeze for RemoteA2aV1Agent
impl RefUnwindSafe for RemoteA2aV1Agent
impl Send for RemoteA2aV1Agent
impl Sync for RemoteA2aV1Agent
impl Unpin for RemoteA2aV1Agent
impl UnsafeUnpin for RemoteA2aV1Agent
impl UnwindSafe for RemoteA2aV1Agent
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