Skip to content

methods

A2A v1.0 Standard Methods

type MessageSendParams = SendMessageRequest;
type MessageSendResponse = SendMessageResponse;
type TaskCancelParams = CancelTaskRequest;
type TaskGetParams = GetTaskRequest;
type TaskListParams = ListTasksRequest;
type TaskListResult = ListTasksResponse;

Trait for agent discovery.

Required / Provided Methods

fn agent_authenticated_extended_card(&self, params: AuthenticatedExtendedCardParams) -> A2AResult<AuthenticatedExtendedCardResult>

Request params for CancelTask (was tasks/cancel).

Fields

FieldTypeDescription
idString
tenantOption&lt;String&gt;
metadataOption&lt;HashMap&lt;String, serde_json::Value&gt;&gt;

Methods

fn from_json(params: Value) -> A2AResult<Self>
fn validate(&self) -> A2AResult<()>

Fields

FieldTypeDescription
configTaskPushNotificationConfig

Fields

FieldTypeDescription
idString
task_idString

Fields

FieldTypeDescription
idString
task_idString

Request params for GetTask (was tasks/get).

Fields

FieldTypeDescription
idString
tenantOption&lt;String&gt;
history_lengthOption&lt;u32&gt;

Methods

fn from_json(params: Value) -> A2AResult<Self>
fn validate(&self) -> A2AResult<()>

Fields

FieldTypeDescription
task_idString

Request params for ListTasks (was tasks/list).

Fields

FieldTypeDescription
tenantOption&lt;String&gt;
context_idOption&lt;String&gt;
statusOption&lt;String&gt;
page_sizeOption&lt;u32&gt;
page_tokenOption&lt;String&gt;
history_lengthOption&lt;u32&gt;
status_timestamp_afterOption&lt;String&gt;
include_artifactsbool

Methods

fn from_json(params: Value) -> A2AResult<Self>
fn validate(&self) -> A2AResult<()>

Response for ListTasks.

Fields

FieldTypeDescription
tasksVec&lt;Task&gt;
next_page_tokenOption&lt;String&gt;
page_sizeOption&lt;u32&gt;
total_sizeOption&lt;u32&gt;

Optional configuration for SendMessage.

Fields

FieldTypeDescription
accepted_output_modesOption&lt;Vec&lt;String&gt;&gt;
task_push_notification_configOption&lt;TaskPushNotificationConfig&gt;
history_lengthOption&lt;u32&gt;
return_immediatelybool

Request params for SendMessage (was message/send).

Fields

FieldTypeDescription
messageMessage
tenantOption&lt;String&gt;
configurationOption&lt;SendMessageConfiguration&gt;
metadataOption&lt;HashMap&lt;String, serde_json::Value&gt;&gt;

Methods

fn from_json(params: Value) -> A2AResult<Self>
fn validate(&self) -> A2AResult<()>

Request params for SubscribeToTask (reconnect to existing task SSE).

Fields

FieldTypeDescription
idString
tenantOption&lt;String&gt;

Params for GetExtendedAgentCard (was agent/card/getAuthenticatedExtended).

Fields

FieldTypeDescription
auth_tokenOption&lt;String&gt;
scopeOption&lt;Vec&lt;String&gt;&gt;
metadataOption&lt;HashMap&lt;String, serde_json::Value&gt;&gt;

Result for GetExtendedAgentCard.

Fields

FieldTypeDescription
agent_cardcrate::AgentCard
discovery_metadataOption&lt;HashMap&lt;String, serde_json::Value&gt;&gt;
timestampOption&lt;String&gt;

Default discovery implementation.

Methods

fn new(agent_card: AgentCard) -> Self
fn with_authentication_required(self, required: bool) -> Self

Response for SendMessage — either a Task or a direct Message.

Serialized as externally-tagged {"task": {...}} or {"message": {...}} matching the protobuf oneof JSON mapping required by A2A v1.0.

Variants

VariantDescription
Task(Task)
Message(Message)