pub struct A2aApi { /* private fields */ }Expand description
Agent-to-agent communication system calls.
Wraps A2AProtocol for inter-agent task delegation and messaging.
Also exposes oxi_sdk::MessageBus for broadcast-based inter-agent communication.
Implementations§
Source§impl A2aApi
impl A2aApi
Sourcepub fn new(protocol: Arc<A2AProtocol>) -> Self
pub fn new(protocol: Arc<A2AProtocol>) -> Self
Create a new A2aApi with a MessageBus (capacity 256).
Sourcepub fn protocol(&self) -> &Arc<A2AProtocol> ⓘ
pub fn protocol(&self) -> &Arc<A2AProtocol> ⓘ
A2A protocol reference.
Sourcepub fn message_bus(&self) -> &MessageBus
pub fn message_bus(&self) -> &MessageBus
Message bus reference for inter-agent broadcast messaging.
Sourcepub fn subscribe(&self) -> Receiver<InterAgentMessage>
pub fn subscribe(&self) -> Receiver<InterAgentMessage>
Subscribe to messages on the bus.
Sourcepub fn get_message_log(&self, limit: Option<usize>) -> Vec<A2AMessageLogEntry>
pub fn get_message_log(&self, limit: Option<usize>) -> Vec<A2AMessageLogEntry>
Returns recent A2A message log entries.
If limit is Some(n), returns at most the last n entries.
Sourcepub fn recent_messages(&self, secs: u64) -> Vec<A2AMessageLogEntry>
pub fn recent_messages(&self, secs: u64) -> Vec<A2AMessageLogEntry>
Returns message-log entries whose timestamp is within the last
secs seconds. Used by the topology endpoint to derive edges
from a sliding window of recent activity.
Auto Trait Implementations§
impl !RefUnwindSafe for A2aApi
impl !UnwindSafe for A2aApi
impl Freeze for A2aApi
impl Send for A2aApi
impl Sync for A2aApi
impl Unpin for A2aApi
impl UnsafeUnpin for A2aApi
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