A2aBackend

A remote A2A agent as a chat provider.

Each turn sends the last user message with the conversation's A2A contextId; when the previous reply left the task input-required (or auth-required), the answer continues that task. Both ids are kept in the reply's ChatMessage.metadata under a2a.

Mapping to the UI: artifacts and the agent's final message become text, files and data parts; progress messages while the task is working show as a data-task checklist; failed / rejected / canceled end the turn with an error.

Constructors

Link copied to clipboard
constructor(agent: A2aAgent)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun stream(history: List<Message>): Flow<ChatEvent>