DefaultA2AClient

open class DefaultA2AClient(val httpClient: HttpClient, baseUrl: String, json: Json = Json { ignoreUnknownKeys = true isLenient = true }, requestConfigurer: HttpRequestBuilder.() -> Unit = { }) : A2AClient(source)

Default implementation of the A2AClient interface.

Constructors

Link copied to clipboard
constructor(httpClient: HttpClient, baseUrl: String, json: Json = Json { ignoreUnknownKeys = true isLenient = true }, requestConfigurer: HttpRequestBuilder.() -> Unit = { })

Properties

Link copied to clipboard
open override val httpClient: HttpClient

The Ktor HTTP client used for making requests.

Functions

Link copied to clipboard
open suspend override fun cancelTask(request: CancelTaskRequest): CancelTaskResponse

Cancels a task on the server using a pre-constructed request object.

open suspend override fun cancelTask(id: TaskId): CancelTaskResponse

Cancels a task on the server.

Link copied to clipboard
open override fun close()

Closes the client and releases resources.

Link copied to clipboard
open suspend override fun getAgentCard(): AgentCard

Gets the agent card from the server.

Link copied to clipboard
open suspend override fun getTask(request: GetTaskRequest): GetTaskResponse

Gets a task from the server using a pre-constructed request object.

open suspend override fun getTask(id: TaskId, historyLength: Int? = null): GetTaskResponse

Gets a task from the server.

Link copied to clipboard

Gets the push notification configuration for a task using a pre-constructed request object.

Gets the push notification configuration for a task.

Link copied to clipboard
open override fun resubscribeToTask(id: TaskId): Flow<TaskUpdateEvent>

Resubscribes to streaming updates for a task.

Link copied to clipboard
open suspend override fun sendMessage(params: MessageSendParams): SendMessageResponse

Sends a message to an agent using the A2A protocol's message/send method.

open suspend override fun sendMessage(request: SendMessageRequest): SendMessageResponse

Sends a message to an agent using a pre-constructed request object.

Link copied to clipboard

Sends a message to an agent with streaming updates using the A2A protocol's message/stream method.

Sends a message to an agent with streaming updates using a pre-constructed request object.

Link copied to clipboard

Sets push notification configuration for a task using a pre-constructed request object.

Sets push notification configuration for a task.