You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2026/07/31 09:17:00 UTC
[jira] [Work started] (CAMEL-23950) camel-langchain4j-agent: complete AgentConfiguration coverage of the AiServices builder
[ https://issues.apache.org/jira/browse/CAMEL-23950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on CAMEL-23950 started by Guillaume Nodet.
-----------------------------------------------
> camel-langchain4j-agent: complete AgentConfiguration coverage of the AiServices builder
> ---------------------------------------------------------------------------------------
>
> Key: CAMEL-23950
> URL: https://issues.apache.org/jira/browse/CAMEL-23950
> Project: Camel
> Issue Type: Improvement
> Components: camel-langchain4j-agent
> Reporter: Federico Mariani
> Assignee: Guillaume Nodet
> Priority: Major
>
> Follow-up to CAMEL-23928, which added {{maxToolCallingRoundTrips}}, {{hallucinatedToolNameStrategy}}, tool error handlers, {{compensateOnToolErrors}} and the {{aiServicesCustomizer}} escape hatch. Comparing {{AgentConfiguration}} against the full {{AiServices}} builder surface at LangChain4j 1.17.2, the following knobs are missing *and matter in a Camel context*:
> * *Guardrail instances*: {{inputGuardrails(List<InputGuardrail>)}} / {{outputGuardrails(...)}} plus {{inputGuardrailsConfig}} / {{outputGuardrailsConfig}}. Today only guardrail *classes* are supported, which LangChain4j instantiates via no-arg constructor — in a bean-centric Camel application (Spring/Quarkus DI) this blocks any guardrail that needs configuration (thresholds, wordlists, vault-sourced patterns) or injected collaborators, and it is a prerequisite for CAMEL-23344 (route-based guardrails need a {{CamelContext}}-aware instance).
> * {{beforeToolExecution}} / {{afterToolExecution}} consumers — the natural hook for per-tool-call logging, Camel events, Micrometer metrics and OTel spans; foundation for CAMEL-23861.
> * {{maxSequentialToolsInvocations}} — companion cost-control cap to the already-exposed {{maxToolCallingRoundTrips}}; trivial to add.
> * {{immediateReturnToolNames}} — lets a Camel route tool produce the *final* answer without a closing LLM round trip (saves one model call per invocation for deterministic tools).
> Deliberately *not* exposed (reachable via the existing {{aiServicesCustomizer}} escape hatch; document this in the component docs):
> * {{toolSearchStrategy}} — overlaps with the component's own tool-search mechanism ({{exposed=false}} + toolSearchTool);
> * {{storeRetrievedContentInChatMemory}} — niche RAG-memory flag;
> * {{AiServiceListener}} registration — users can already attach {{ChatModelListener}}s to the {{ChatModel}} bean they inject.
> Out of scope here: {{executeToolsConcurrently(Executor)}} — tracked in CAMEL-23952 together with the tool-executor exchange-safety work that permits it.
> Also: document (Javadoc) that an {{aiServicesCustomizer}} setting {{chatRequestTransformer}} silently replaces the transformer installed by {{configureBuilder}} for {{responseFormat}}, breaking {{jsonSchema}}/{{outputClass}} structured output.
> Wiring pattern: same as CAMEL-23928 — null-guarded application in {{AbstractAgent.configureBuilder()}} plus unit tests in the style of {{AgentConfigurationTest}}.
> Related: CAMEL-23928, CAMEL-23929, CAMEL-23344, CAMEL-23861.
> _This issue was drafted by Claude Code on behalf of Federico Mariani._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)