[Feat]: Support JSON-RPC Responses for Decoupled Pub/Sub Push Communication in Message-Driven Architectures
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- backend-api-design
Línea de trabajo
Revise la ruta HTTP 'POST' principal del SDK, probablemente en un archivo como server.py o routes.py, y los modelos de Pydantic para JSONRPCRequest y JSONRPCResponse. Comprenda cómo funciona actualmente la validación. La solución implica modificar la validación de entrada de la ruta para que acepte un tipo unión o crear un nuevo endpoint. Revise las pruebas existentes de la ruta para ver cómo añadir pruebas para el nuevo comportamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
The current implementation of the A2A Python SDK, when used as an agent in a message-driven architecture (e.g., handling requests pushed via Google Pub/Sub), only validates and accepts JSONRPCRequest objects on its primary HTTP 'POST' route.
In this architecture, an agent receives a request from a message broker (e.g., Pub/Sub push subscription), processes it, acknowledges the broker with a standard HTTP response, and sends the real, decoupled response back to the requesting service's inbound message queue.
If the requesting service is also an agent built with the same A2A Python SDK, it needs to receive a JSONRPCResponse. Since the receiving agent's primary 'POST' route strictly expects a JSONRPCRequest format via the Pydantic model validation, the inbound JSONRPCResponse is rejected, preventing the successful completion of the message exchange.
Describe the solution you'd like
We need to enable the SDK to correctly receive and process JSONRPCResponse objects on an agent, facilitating decoupled, asynchronous, push-based communication.
We propose discussing two possible solutions:
- Loosen Model Validation for Combined Input: Modify the Pydantic model validation on the main 'POST' route to accept a combined input of either a JSONRPCRequest or a JSONRPCResponse(e.g., checking against a union type like JSONRPCRequest | JSONRPCResponse). This would allow responses to be delivered via the existing primary request route.
- Introduce a Dedicated Response Route: Implement a new, dedicated HTTP endpoint (e.g., /response or /push_response) specifically for receiving and handling decoupled JSONRPCResponse objects.
Describe alternatives you've considered
No response
Additional context
This issue is critical for agents using the A2A Python SDK within environments where asynchronous, Pub/Sub push-based communication is the standard, as it currently blocks the ability to receive the final response successfully.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Lenguaje dominante
- Python
- Estrellas
- 2.2k
- Forks
- 496
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 20
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de a2aproject/a2a-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
a2aproject/a2a-python#1261 · 1 asignado ·
-
component: server status:awaiting response
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
a2aproject/a2a-python#1237 · 1 comentario · 1 asignado ·
-
[Bug]: In-memory push store keeps the caller object so later mutations rewrite stored webhooks Abiertocomponent: server status:awaiting response status:stale
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
a2aproject/a2a-python#1215 · 2 comentarios · 1 asignado ·
-
component: server status:awaiting response status:stale
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
a2aproject/a2a-python#1205 · 3 comentarios · 1 asignado ·
-
component: server status:awaiting response status:stale
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
a2aproject/a2a-python#1204 · 2 comentarios · 1 asignado ·
Todos los issues de a2aproject/a2a-python
Issues similares
-
triage/confirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
apache/cloudstack#14222 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100