A2AClient class
Constructors
Properties
Methods
-
cancelTask(
String taskId) → Future< Task> -
Requests the cancellation of an ongoing task using
tasks/cancel. -
close(
) → void - Closes the underlying transport connection.
-
deletePushNotificationConfig(
String taskId, String configId) → Future< void> - Deletes a specific push notification configuration for a task.
-
getAgentCard(
) → Future< AgentCard> - Fetches the public agent card from the server.
-
getAuthenticatedExtendedCard(
String token) → Future< AgentCard> - Fetches the authenticated extended agent card from the server.
-
getPushNotificationConfig(
String taskId, String configId) → Future< TaskPushNotificationConfig> - Retrieves a specific push notification configuration for a task.
-
getTask(
String taskId) → Future< Task> -
Retrieves the current state of a task from the server using
tasks/get. -
listPushNotificationConfigs(
String taskId) → Future< List< PushNotificationConfig> > - Lists all push notification configurations for a given task.
-
listTasks(
[ListTasksParams? params]) → Future< ListTasksResult> -
Retrieves a list of tasks from the server using
tasks/list. -
messageSend(
Message message) → Future< Task> -
Sends a message to the agent for a single-shot interaction via
message/send. -
messageStream(
Message message) → Stream< Event> -
Sends a message to the agent and subscribes to real-time updates via
message/stream. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resubscribeToTask(
String taskId) → Stream< Event> -
Resubscribes to an SSE stream for an ongoing task using
tasks/resubscribe. -
setPushNotificationConfig(
TaskPushNotificationConfig params) → Future< TaskPushNotificationConfig> - Sets or updates the push notification configuration for a task.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- agentCardPath → String
-
no setter