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 9c67c6b8fda [create-pull-request] automated change (#1820)
9c67c6b8fda is described below

commit 9c67c6b8fda5149f4806b407c3a1d76ac77591ba
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Jun 18 12:33:56 2026 +0200

    [create-pull-request] automated change (#1820)
    
    Co-authored-by: oscerd <[email protected]>
---
 .../catalog/components/langchain4j-agent.json      | 22 +++++++++++----------
 .../src/main/docs/langchain4j-agent.json           |  8 +++++++-
 .../LangChain4jAgentComponentConfiguration.java    | 23 ++++++++++++++++++++--
 3 files changed, 40 insertions(+), 13 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 e9f57fddaac..63a774341f0 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
@@ -28,12 +28,13 @@
     "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" },
-    "jsonSchema": { "index": 4, "kind": "property", "displayName": "Json 
Schema", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "supportFileReference": true, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "JSON schema for 
structured output validat [...]
+    "jsonSchema": { "index": 4, "kind": "property", "displayName": "Json 
Schema", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "supportFileReference": true, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "JSON schema for 
structured output validat [...]
     "lazyStartProducer": { "index": 5, "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": 6, "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": 7, "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": 8, "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": 9, "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  [...]
+    "outputClass": { "index": 6, "kind": "property", "displayName": "Output 
Class", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.Class<java.lang.Object>", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Java class to use for 
structured output. Camel deriv [...]
+    "tags": { "index": 7, "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": 8, "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": 9, "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": 10, "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" },
@@ -48,10 +49,11 @@
     "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" },
     "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 
[...]
-    "jsonSchema": { "index": 4, "kind": "parameter", "displayName": "Json 
Schema", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "supportFileReference": true, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "JSON schema for 
structured output valida [...]
-    "tags": { "index": 5, "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": 6, "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": 7, "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": 8, "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 [...]
+    "jsonSchema": { "index": 4, "kind": "parameter", "displayName": "Json 
Schema", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "supportFileReference": true, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "JSON schema for 
structured output valida [...]
+    "outputClass": { "index": 5, "kind": "parameter", "displayName": "Output 
Class", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.Class<java.lang.Object>", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration", 
"configurationField": "configuration", "description": "Java class to use for 
structured output. Camel deri [...]
+    "tags": { "index": 6, "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": 7, "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": 8, "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": 9, "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 26eebb7b5ee..0f84139ed43 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
@@ -58,7 +58,7 @@
     {
       "name": "camel.component.langchain4j-agent.json-schema",
       "type": "java.lang.String",
-      "description": "JSON schema for structured output validation. This 
option works only when using agentConfiguration (inline agent creation mode).",
+      "description": "JSON schema for structured output validation. Only 
supported in inline agent creation mode: agentConfiguration must be set and 
neither agent nor agentFactory may be configured. Mutually exclusive with 
outputClass.",
       "sourceType": 
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
     },
     {
@@ -80,6 +80,12 @@
       "description": "MCP server definitions in the form of mcpServer..=. 
Supported properties: transportType (stdio, http, streamableHttp, or sse, 
default: stdio), command (comma-separated, for stdio), url (for http\/sse), 
environment.= (for stdio), timeout (in seconds, default: 60), logRequests, 
logResponses, oauthProfile (OAuth profile for HTTP auth, requires camel-oauth). 
This is a multi-value option with prefix: mcpServer.",
       "sourceType": 
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
     },
+    {
+      "name": "camel.component.langchain4j-agent.output-class",
+      "type": "java.lang.Class<java.lang.Object>",
+      "description": "Java class to use for structured output. Camel derives 
the JSON schema from the class and instructs the model to produce matching 
JSON; the response body is left as a raw JSON string. Only supported in inline 
agent creation mode: agentConfiguration must be set and neither agent nor 
agentFactory may be configured. The class must be a POJO with public fields or 
getters; simple types, enums, and collections are not supported. Mutually 
exclusive with jsonSchema.",
+      "sourceType": 
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+    },
     {
       "name": "camel.component.langchain4j-agent.tags",
       "type": "java.lang.String",
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 6d4e7d39da3..56cf7552f48 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
@@ -66,8 +66,9 @@ public class LangChain4jAgentComponentConfiguration
      */
     private LangChain4jAgentConfiguration configuration;
     /**
-     * JSON schema for structured output validation. This option works only 
when
-     * using agentConfiguration (inline agent creation mode).
+     * JSON schema for structured output validation. Only supported in inline
+     * agent creation mode: agentConfiguration must be set and neither agent 
nor
+     * agentFactory may be configured. Mutually exclusive with outputClass.
      */
     private String jsonSchema;
     /**
@@ -81,6 +82,16 @@ public class LangChain4jAgentComponentConfiguration
      * and prolong the total processing time of the processing.
      */
     private Boolean lazyStartProducer = false;
+    /**
+     * Java class to use for structured output. Camel derives the JSON schema
+     * from the class and instructs the model to produce matching JSON; the
+     * response body is left as a raw JSON string. Only supported in inline
+     * agent creation mode: agentConfiguration must be set and neither agent 
nor
+     * agentFactory may be configured. The class must be a POJO with public
+     * fields or getters; simple types, enums, and collections are not
+     * supported. Mutually exclusive with jsonSchema.
+     */
+    private Class<Object> outputClass;
     /**
      * Tags for discovering and calling Camel route tools
      */
@@ -158,6 +169,14 @@ public class LangChain4jAgentComponentConfiguration
         this.lazyStartProducer = lazyStartProducer;
     }
 
+    public Class<Object> getOutputClass() {
+        return outputClass;
+    }
+
+    public void setOutputClass(Class<Object> outputClass) {
+        this.outputClass = outputClass;
+    }
+
     public String getTags() {
         return tags;
     }

Reply via email to