[ 
https://issues.apache.org/jira/browse/CAMEL-23951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18097474#comment-18097474
 ] 

Omar Atie commented on CAMEL-23951:
-----------------------------------

I would like to work on this https://issues.apache.org/jira/browse/CAMEL-23951

> 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
>            Priority: Major
>
> 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)

Reply via email to