google / google/adk-java

When multiple agents communicate via the A2A protocol, the invocationContext.session.state is not transformed and transmitted to the message, and SSE streaming is not supported.

Abierto
#818 4 comentarios 0 reacciones 1 asignado Reclamado por @hemasekhar-p Ver en GitHub
needs review
Lenguaje dominante
Java
Estrellas
1.7k
Forks
420
Merge medio
4 d 12 h
PR fusionados (30 d)
31

Descripción

** Please make sure you read the contribution guide and file the issues in the right place. **
[Contribution guide.](https://google.github.io/adk-docs/contributing-guide/)

### Is your feature request related to a specific problem?
1.Based on the following source code reading, in the logic of converting `invocationContext` to `Message` using `EventConverter.convertEventsToA2AMessage`:

`Optional a2aMessageOpt = com.google.adk.a2a.EventConverter.convertEventsToA2AMessage(invocationContext);`

Image

`metadata` is not assigned. Therefore, will the following code always return a null case:

`Map metadata = originalMessage.getMetadata() == null ? Map.of() : originalMessage.getMetadata();`

Is it possible to convert `invocationContext.session.state` to the `metadata` of the `Message`, as additional information in the communication protocol between the client agent and the server agent? like this:

Image
2.Multiple agents communicate via the A2A protocol, using a synchronous blocking approach.

Image

Due to the time-consuming nature of this communication, which negatively impacts user experience, it is recommended to replace the synchronous approach with SSE streaming output. Simultaneously, the client should use a pre-implemented streaming HTTP request to establish connections.

Image

### Describe the Solution You'd Like
Some of the solution code logic is above.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.