eemario opened a new issue, #1350: URL: https://github.com/apache/flink-agents/issues/1350
### Search before asking - [x] I searched in the [issues](https://github.com/apache/flink-agents/issues) and found nothing similar. ### Description An Action may emit multiple requests for different purposes. Although response events include request_id, users still need to maintain a separate mapping to recover each request's business context. Support optional user-defined context on request events and return it unchanged in the corresponding response events, so receiving Actions can distinguish responses directly. For example, an Action emits two ChatRequestEvents: - Request A carries {"task": "summary", "item_id": "42"}. - Request B carries {"task": "risk_assessment", "item_id": "42"}. Each ChatResponseEvent carries its request's context, allowing the receiving Action to branch on task, regardless of response completion order. This applies to built-in request/response events for chat, tool calls, context retrieval, and decision models. Expected behavior: - Context is optional and treated as opaque application data. - Each response preserves its request's context without mixing data between requests. - The final Chat response retains the initial request's context across tool-call rounds, retries, and model fallback. - Both successful and failed responses preserve context where failure responses are supported. - Context survives serialization, cross-language transfer, and supported recovery paths. - Context is not automatically passed to model prompts or tool arguments, and ordinary event attachments are not automatically copied to responses. - Java and Python provide consistent behavior; existing callers that omit context continue to work. ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
