public class A2AClient extends Object
| Constructor and Description |
|---|
A2AClient(String baseUrl)
Create a new A2A client
|
| Modifier and Type | Method and Description |
|---|---|
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
|
CompletableFuture<Void> |
sendTaskStreaming(TaskSendParams params,
StreamingEventListener listener)
Send a task with streaming response
|
public A2AClient(String baseUrl)
baseUrl - the base URL of the A2A serverpublic JSONRPCResponse sendTask(TaskSendParams params) throws Exception
params - task send parametersExceptionpublic JSONRPCResponse getTask(TaskQueryParams params) throws Exception
params - task query parametersExceptionpublic JSONRPCResponse cancelTask(TaskIDParams params) throws Exception
params - task ID parametersExceptionpublic CompletableFuture<Void> sendTaskStreaming(TaskSendParams params, StreamingEventListener listener)
params - task send parameterslistener - event listener for streaming updatespublic AgentCard getAgentCard()
Copyright © 2025. All rights reserved.