public class A2AClient
extends java.lang.Object
| 构造器和说明 |
|---|
A2AClient(java.lang.String baseUrl)
Create a new A2A client
|
| 限定符和类型 | 方法和说明 |
|---|---|
JSONRPCResponse |
cancelTask(TaskIDParams params)
Cancel a task
|
AgentCard |
getAgentCard()
Get agent card information
|
JSONRPCResponse |
getTask(TaskQueryParams params)
Get the status of a task
|
JSONRPCResponse |
sendTask(TaskSendParams params)
Send a task message to the agent
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
sendTaskStreaming(TaskSendParams params,
StreamingEventListener listener)
Send a task with streaming response
|
public A2AClient(java.lang.String baseUrl)
baseUrl - the base URL of the A2A serverpublic JSONRPCResponse sendTask(TaskSendParams params) throws java.lang.Exception
params - task send parametersjava.lang.Exceptionpublic JSONRPCResponse getTask(TaskQueryParams params) throws java.lang.Exception
params - task query parametersjava.lang.Exceptionpublic JSONRPCResponse cancelTask(TaskIDParams params) throws java.lang.Exception
params - task ID parametersjava.lang.Exceptionpublic java.util.concurrent.CompletableFuture<java.lang.Void> sendTaskStreaming(TaskSendParams params, StreamingEventListener listener)
params - task send parameterslistener - event listener for streaming updatespublic AgentCard getAgentCard()