You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Federico Mariani (Jira)" <ji...@apache.org> on 2026/07/08 14:27:00 UTC

[jira] [Created] (CAMEL-23951) camel-langchain4j-agent: expose Result.sources() and Result.toolExecutions() as message headers

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)