A2aClient class final
An A2A client: discovers agents, sends messages, streams responses,
and manages task lifecycles — all over injectable package:http.
Properties
Methods
-
cancelTask(
String taskId) → Future< A2aTask> - Cancels a task.
-
close(
) → void -
getTask(
String taskId) → Future< A2aTask> - Gets the current state of a task.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(
String text, {Map< String, dynamic> ? metadata}) → Future<A2aTask> -
Sends a message to the agent (non-streaming). Returns the task.
metadatarides the message envelope (the A2A wire's standard message metadata — the fa-mail gateway marks fabric mail with it). -
streamMessage(
String text) → Stream< A2aTask> - Streams a message via SSE. Yields task state updates as they arrive.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited