Skip to content

protocol

A2A v1.0 Protocol Handler

Methods

fn new(agent_card: AgentCard) -> Self
fn with_registry(agent_card: AgentCard, registry: A2AMethodRegistry) -> Self
fn agent_card(&self) -> &AgentCard
fn update_agent_card(&mut self, agent_card: AgentCard)
fn registry(&self) -> &A2AMethodRegistry
fn registry_mut(&mut self) -> &mut A2AMethodRegistry
fn register_method<F>(&mut self, method: &str, description: &str, handler: F)
where
F: Fn + Send + Sync + ?
fn register_notification<F>(&mut self, method: &str, description: &str, handler: F)
where
F: Fn + Send + Sync + ?
fn handle_request(&self, request: JsonRpcRequest) -> A2AResult<JsonRpcResponse>
fn handle_notification(&self, notification: JsonRpcNotification) -> A2AResult<()>
fn handle_incoming(&self, incoming: JsonRpcIncoming) -> A2AResult<Option<JsonRpcResponse>>
fn get_capabilities(&self) -> Value
fn get_method_metadata(&self) -> HashMap<String, &MethodMetadata>
fn validate_request_params(&self, method: &str, params: &Value) -> A2AResult<()>
fn register_a2a_methods(&mut self, storage: Option<Arc<dyn TaskStorage>>)

Register all A2A v1.0 protocol methods.

async fn send_request<T>(&self, transport: &T, request: JsonRpcRequest) -> A2AResult<JsonRpcResponse>
async fn send_notification<T>(&self, transport: &T, notification: JsonRpcNotification) -> A2AResult<()>