Federico Mariani created CAMEL-23951:
----------------------------------------
Summary: camel-langchain4j-agent: expose Result.sources() and
Result.toolExecutions() as message headers
Key: CAMEL-23951
URL: https://issues.apache.org/jira/browse/CAMEL-23951
Project: Camel
Issue Type: Improvement
Components: camel-langchain4j-agent
Reporter: Federico Mariani
The agent producer maps {{Result.content()}}, {{finishReason()}} and token
usage to headers (CAMEL-23860 pattern), but drops:
* {{Result.sources()}} — the RAG content that grounded the answer (provenance);
* {{Result.toolExecutions()}} — which tools were invoked with which
arguments/results.
Both are valuable for observability, auditing and downstream routing decisions.
*Proposal*: new headers {{CamelLangChain4jAgentSources}} and
{{CamelLangChain4jAgentToolExecutions}} in
{{org.apache.camel.component.langchain4j.agent.api.Headers}}, populated in
{{LangChain4jAgentProducer.populateTokenUsageHeaders}} (or a renamed
equivalent).
_This issue was drafted by Claude Code on behalf of Federico Mariani._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)