This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 19d5b371260 Regen
19d5b371260 is described below

commit 19d5b37126081d0148d8d4ad8e51433d2e7e042f
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jun 5 17:53:16 2026 +0200

    Regen
---
 .../catalog/components/langchain4j-agent.json      | 26 ++++++++++++----------
 .../src/main/docs/langchain4j-agent.json           |  6 +++++
 .../LangChain4jAgentComponentConfiguration.java    | 17 ++++++++++++++
 .../LangChain4jAgentComponentConverter.java        |  2 ++
 4 files changed, 39 insertions(+), 12 deletions(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-agent.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-agent.json
index d864f1da3ed..1b17ad0cf42 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-agent.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-agent.json
@@ -25,13 +25,14 @@
   },
   "componentProperties": {
     "agent": { "index": 0, "kind": "property", "displayName": "Agent", 
"group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.langchain4j.agent.api.Agent", 
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "The agent to use for the 
component" },
-    "agentFactory": { "index": 1, "kind": "property", "displayName": "Agent 
Factory", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.langchain4j.agent.api.AgentFactory", "deprecated": 
false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "The agent factory to us 
[...]
-    "configuration": { "index": 2, "kind": "property", "displayName": 
"Configuration", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
configuration" },
-    "lazyStartProducer": { "index": 3, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether the producer should be started lazy (on the first message). By 
starting lazy you can use this to allow CamelContext and routes to startup in 
situations where a producer may otherwise fail [...]
-    "tags": { "index": 4, "kind": "property", "displayName": "Tags", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Tags for discovering and 
calling Camel route tools" },
-    "autowiredEnabled": { "index": 5, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
-    "mcpClients": { "index": 6, "kind": "property", "displayName": "Mcp 
Clients", "group": "advanced", "label": "advanced", "required": false, "type": 
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Pre-built MCP (Model 
Context Protocol) client insta [...]
-    "mcpServer": { "index": 7, "kind": "property", "displayName": "Mcp 
Server", "group": "advanced", "label": "advanced", "required": false, "type": 
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", 
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "MCP server  [...]
+    "agentConfiguration": { "index": 1, "kind": "property", "displayName": 
"Agent Configuration", "group": "producer", "label": "", "required": false, 
"type": "object", "javaType": 
"org.apache.camel.component.langchain4j.agent.api.AgentConfiguration", 
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Agent [...]
+    "agentFactory": { "index": 2, "kind": "property", "displayName": "Agent 
Factory", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.langchain4j.agent.api.AgentFactory", "deprecated": 
false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "The agent factory to us 
[...]
+    "configuration": { "index": 3, "kind": "property", "displayName": 
"Configuration", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
configuration" },
+    "lazyStartProducer": { "index": 4, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether the producer should be started lazy (on the first message). By 
starting lazy you can use this to allow CamelContext and routes to startup in 
situations where a producer may otherwise fail [...]
+    "tags": { "index": 5, "kind": "property", "displayName": "Tags", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Tags for discovering and 
calling Camel route tools" },
+    "autowiredEnabled": { "index": 6, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
+    "mcpClients": { "index": 7, "kind": "property", "displayName": "Mcp 
Clients", "group": "advanced", "label": "advanced", "required": false, "type": 
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Pre-built MCP (Model 
Context Protocol) client insta [...]
+    "mcpServer": { "index": 8, "kind": "property", "displayName": "Mcp 
Server", "group": "advanced", "label": "advanced", "required": false, "type": 
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", 
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "MCP server  [...]
   },
   "headers": {
     "CamelLangChain4jAgentSystemMessage": { "index": 0, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The system prompt.", "constantName": 
"org.apache.camel.component.langchain4j.agent.api.Headers#SYSTEM_MESSAGE" },
@@ -44,10 +45,11 @@
   "properties": {
     "agentId": { "index": 0, "kind": "path", "displayName": "Agent Id", 
"group": "producer", "label": "", "required": true, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The Agent id" },
     "agent": { "index": 1, "kind": "parameter", "displayName": "Agent", 
"group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.langchain4j.agent.api.Agent", 
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "The agent to use for the 
component" },
-    "agentFactory": { "index": 2, "kind": "parameter", "displayName": "Agent 
Factory", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.langchain4j.agent.api.AgentFactory", "deprecated": 
false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "The agent factory to u 
[...]
-    "tags": { "index": 3, "kind": "parameter", "displayName": "Tags", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Tags for discovering and 
calling Camel route tools" },
-    "lazyStartProducer": { "index": 4, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produc [...]
-    "mcpClients": { "index": 5, "kind": "parameter", "displayName": "Mcp 
Clients", "group": "advanced", "label": "advanced", "required": false, "type": 
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Pre-built MCP (Model 
Context Protocol) client inst [...]
-    "mcpServer": { "index": 6, "kind": "parameter", "displayName": "Mcp 
Server", "group": "advanced", "label": "advanced", "required": false, "type": 
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", 
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "MCP server [...]
+    "agentConfiguration": { "index": 2, "kind": "parameter", "displayName": 
"Agent Configuration", "group": "producer", "label": "", "required": false, 
"type": "object", "javaType": 
"org.apache.camel.component.langchain4j.agent.api.AgentConfiguration", 
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Agen [...]
+    "agentFactory": { "index": 3, "kind": "parameter", "displayName": "Agent 
Factory", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.langchain4j.agent.api.AgentFactory", "deprecated": 
false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "The agent factory to u 
[...]
+    "tags": { "index": 4, "kind": "parameter", "displayName": "Tags", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Tags for discovering and 
calling Camel route tools" },
+    "lazyStartProducer": { "index": 5, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produc [...]
+    "mcpClients": { "index": 6, "kind": "parameter", "displayName": "Mcp 
Clients", "group": "advanced", "label": "advanced", "required": false, "type": 
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Pre-built MCP (Model 
Context Protocol) client inst [...]
+    "mcpServer": { "index": 7, "kind": "parameter", "displayName": "Mcp 
Server", "group": "advanced", "label": "advanced", "required": false, "type": 
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", 
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "MCP server [...]
   }
 }
diff --git 
a/components-starter/camel-langchain4j-agent-starter/src/main/docs/langchain4j-agent.json
 
b/components-starter/camel-langchain4j-agent-starter/src/main/docs/langchain4j-agent.json
index 7816d8677e8..5e15abaff74 100644
--- 
a/components-starter/camel-langchain4j-agent-starter/src/main/docs/langchain4j-agent.json
+++ 
b/components-starter/camel-langchain4j-agent-starter/src/main/docs/langchain4j-agent.json
@@ -19,6 +19,12 @@
       "description": "The agent to use for the component. The option is a 
org.apache.camel.component.langchain4j.agent.api.Agent type.",
       "sourceType": 
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
     },
+    {
+      "name": "camel.component.langchain4j-agent.agent-configuration",
+      "type": 
"org.apache.camel.component.langchain4j.agent.api.AgentConfiguration",
+      "description": "AgentConfiguration used by Camel to create the agent 
internally. When set, Camel creates an AgentWithMemory if a ChatMemoryProvider 
is configured, otherwise an AgentWithoutMemory. If an agentFactory is also 
configured, the factory takes precedence. The option is a 
org.apache.camel.component.langchain4j.agent.api.AgentConfiguration type.",
+      "sourceType": 
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+    },
     {
       "name": "camel.component.langchain4j-agent.agent-factory",
       "type": "org.apache.camel.component.langchain4j.agent.api.AgentFactory",
diff --git 
a/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConfiguration.java
 
b/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConfiguration.java
index 1944fe3c9c1..33723679974 100644
--- 
a/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConfiguration.java
+++ 
b/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConfiguration.java
@@ -21,6 +21,7 @@ import java.util.Map;
 import dev.langchain4j.mcp.client.McpClient;
 import 
org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration;
 import org.apache.camel.component.langchain4j.agent.api.Agent;
+import org.apache.camel.component.langchain4j.agent.api.AgentConfiguration;
 import org.apache.camel.component.langchain4j.agent.api.AgentFactory;
 import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -45,6 +46,14 @@ public class LangChain4jAgentComponentConfiguration
      * org.apache.camel.component.langchain4j.agent.api.Agent type.
      */
     private Agent agent;
+    /**
+     * AgentConfiguration used by Camel to create the agent internally. When
+     * set, Camel creates an AgentWithMemory if a ChatMemoryProvider is
+     * configured, otherwise an AgentWithoutMemory. If an agentFactory is also
+     * configured, the factory takes precedence. The option is a
+     * org.apache.camel.component.langchain4j.agent.api.AgentConfiguration 
type.
+     */
+    private AgentConfiguration agentConfiguration;
     /**
      * The agent factory to use for creating agents if no Agent is provided. 
The
      * option is a 
org.apache.camel.component.langchain4j.agent.api.AgentFactory
@@ -104,6 +113,14 @@ public class LangChain4jAgentComponentConfiguration
         this.agent = agent;
     }
 
+    public AgentConfiguration getAgentConfiguration() {
+        return agentConfiguration;
+    }
+
+    public void setAgentConfiguration(AgentConfiguration agentConfiguration) {
+        this.agentConfiguration = agentConfiguration;
+    }
+
     public AgentFactory getAgentFactory() {
         return agentFactory;
     }
diff --git 
a/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConverter.java
 
b/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConverter.java
index 2f76c6b5935..594dd2cbdf9 100644
--- 
a/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConverter.java
+++ 
b/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConverter.java
@@ -40,6 +40,7 @@ public class LangChain4jAgentComponentConverter implements 
GenericConverter {
     public Set<ConvertiblePair> getConvertibleTypes() {
         Set<ConvertiblePair> answer = new LinkedHashSet<>();
         answer.add(new ConvertiblePair(String.class, 
org.apache.camel.component.langchain4j.agent.api.Agent.class));
+        answer.add(new ConvertiblePair(String.class, 
org.apache.camel.component.langchain4j.agent.api.AgentConfiguration.class));
         answer.add(new ConvertiblePair(String.class, 
org.apache.camel.component.langchain4j.agent.api.AgentFactory.class));
         answer.add(new ConvertiblePair(String.class, 
org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration.class));
         return answer;
@@ -59,6 +60,7 @@ public class LangChain4jAgentComponentConverter implements 
GenericConverter {
         ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
         switch (targetType.getName()) {
             case "org.apache.camel.component.langchain4j.agent.api.Agent": 
return applicationContext.getBean(ref, 
org.apache.camel.component.langchain4j.agent.api.Agent.class);
+            case 
"org.apache.camel.component.langchain4j.agent.api.AgentConfiguration": return 
applicationContext.getBean(ref, 
org.apache.camel.component.langchain4j.agent.api.AgentConfiguration.class);
             case 
"org.apache.camel.component.langchain4j.agent.api.AgentFactory": return 
applicationContext.getBean(ref, 
org.apache.camel.component.langchain4j.agent.api.AgentFactory.class);
             case 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration": 
return applicationContext.getBean(ref, 
org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration.class);
         }

Reply via email to