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.git
The following commit(s) were added to refs/heads/main by this push:
new 495c9fcafbe CAMEL-22196: Create an AI agent component
495c9fcafbe is described below
commit 495c9fcafbec4c10fd646036b290cb7f67a10d70
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Jul 31 13:39:25 2025 +0200
CAMEL-22196: Create an AI agent component
---
.../org/apache/camel/catalog/components.properties | 1 +
.../catalog/components/langchain4j-agent.json | 51 +++
.../org/apache/camel/main/components.properties | 1 +
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 40 +++
.../LangChain4jAgentEndpointBuilderFactory.java | 352 +++++++++++++++++++++
.../camel-component-known-dependencies.properties | 1 +
.../apache/camel/maven/packaging/MojoHelper.java | 1 +
9 files changed, 449 insertions(+)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index 5a1287bbc86..bf628cfc0c8 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -210,6 +210,7 @@ kubernetes-secrets
kubernetes-service-accounts
kubernetes-services
kudu
+langchain4j-agent
langchain4j-chat
langchain4j-embeddings
langchain4j-tools
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/langchain4j-agent.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/langchain4j-agent.json
new file mode 100644
index 00000000000..122ec55a592
--- /dev/null
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/langchain4j-agent.json
@@ -0,0 +1,51 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "langchain4j-agent",
+ "title": "LangChain4j Agent",
+ "description": "LangChain4j Agent component",
+ "deprecated": false,
+ "firstVersion": "4.14.0",
+ "label": "ai",
+ "javaType":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-langchain4j-agent",
+ "version": "4.14.0-SNAPSHOT",
+ "scheme": "langchain4j-agent",
+ "extendsScheme": "",
+ "syntax": "langchain4j-agent:agentId",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false,
+ "browsable": false,
+ "remote": true
+ },
+ "componentProperties": {
+ "configuration": { "index": 0, "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" },
+ "inputGuardrails": { "index": 1, "kind": "property", "displayName": "Input
Guardrails", "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": "Comma-separated list of
input guardrail class names to validate user input before se [...]
+ "lazyStartProducer": { "index": 2, "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 [...]
+ "outputGuardrails": { "index": 3, "kind": "property", "displayName":
"Output Guardrails", "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": "Comma-separated list of
output guardrail class names to validate LLM responses" },
+ "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 [...]
+ "chatMemoryProvider": { "index": 6, "kind": "property", "displayName":
"Chat Memory Provider", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType":
"dev.langchain4j.memory.chat.ChatMemoryProvider", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Chat Memory Provi [...]
+ "chatModel": { "index": 7, "kind": "property", "displayName": "Chat
Model", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "dev.langchain4j.model.chat.ChatModel", "deprecated":
false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Chat Model of type
dev.langchain4j.model.chat. [...]
+ "retrievalAugmentor": { "index": 8, "kind": "property", "displayName":
"Retrieval Augmentor", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType": "dev.langchain4j.rag.RetrievalAugmentor",
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Retrieval Augmentor for
ad [...]
+ },
+ "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.LangChain4jAgent$Headers#SYSTEM_MESSAGE"
},
+ "CamelLangChain4jAgentMemoryId": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Memory ID.", "constantName":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgent$Headers#MEMORY_ID"
}
+ },
+ "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" },
+ "inputGuardrails": { "index": 1, "kind": "parameter", "displayName":
"Input Guardrails", "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": "Comma-separated list of
input guardrail class names to validate user input before s [...]
+ "outputGuardrails": { "index": 2, "kind": "parameter", "displayName":
"Output Guardrails", "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": "Comma-separated list of
output guardrail class names to validate LLM responses" },
+ "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 [...]
+ "chatMemoryProvider": { "index": 5, "kind": "parameter", "displayName":
"Chat Memory Provider", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType":
"dev.langchain4j.memory.chat.ChatMemoryProvider", "deprecated": false,
"deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Chat Memory Prov [...]
+ "chatModel": { "index": 6, "kind": "parameter", "displayName": "Chat
Model", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "dev.langchain4j.model.chat.ChatModel", "deprecated":
false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Chat Model of type
dev.langchain4j.model.chat [...]
+ "retrievalAugmentor": { "index": 7, "kind": "parameter", "displayName":
"Retrieval Augmentor", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType": "dev.langchain4j.rag.RetrievalAugmentor",
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Retrieval Augmentor for
a [...]
+ }
+}
diff --git
a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index 5a1287bbc86..bf628cfc0c8 100644
---
a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++
b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -210,6 +210,7 @@ kubernetes-secrets
kubernetes-service-accounts
kubernetes-services
kudu
+langchain4j-agent
langchain4j-chat
langchain4j-embeddings
langchain4j-tools
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 5689cfacbc8..106269f574c 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -222,6 +222,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.KubernetesServicesEndpointBuilderFactory.KubernetesServicesBuilders,
org.apache.camel.builder.endpoint.dsl.KuduEndpointBuilderFactory.KuduBuilders,
org.apache.camel.builder.endpoint.dsl.Lambda2EndpointBuilderFactory.Lambda2Builders,
+
org.apache.camel.builder.endpoint.dsl.LangChain4jAgentEndpointBuilderFactory.LangChain4jAgentBuilders,
org.apache.camel.builder.endpoint.dsl.LangChain4jChatEndpointBuilderFactory.LangChain4jChatBuilders,
org.apache.camel.builder.endpoint.dsl.LangChain4jEmbeddingsEndpointBuilderFactory.LangChain4jEmbeddingsBuilders,
org.apache.camel.builder.endpoint.dsl.LangChain4jToolsEndpointBuilderFactory.LangChain4jToolsBuilders,
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 41b83125363..5004eb391b7 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -219,6 +219,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.KubernetesServicesEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.KuduEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.Lambda2EndpointBuilderFactory,
+
org.apache.camel.builder.endpoint.dsl.LangChain4jAgentEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.LangChain4jChatEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.LangChain4jEmbeddingsEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.LangChain4jToolsEndpointBuilderFactory,
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 3993865f0f0..f2c455b0f22 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -9516,6 +9516,46 @@ public class StaticEndpointBuilders {
public static KuduEndpointBuilderFactory.KuduEndpointBuilder kudu(String
componentName, String path) {
return KuduEndpointBuilderFactory.endpointBuilder(componentName, path);
}
+ /**
+ * LangChain4j Agent (camel-langchain4j-agent)
+ * LangChain4j Agent component
+ *
+ * Category: ai
+ * Since: 4.14
+ * Maven coordinates: org.apache.camel:camel-langchain4j-agent
+ *
+ * Syntax: <code>langchain4j-agent:agentId</code>
+ *
+ * Path parameter: agentId (required)
+ * The Agent id
+ *
+ * @param path agentId
+ * @return the dsl builder
+ */
+ public static
LangChain4jAgentEndpointBuilderFactory.LangChain4jAgentEndpointBuilder
langchain4jAgent(String path) {
+ return langchain4jAgent("langchain4j-agent", path);
+ }
+ /**
+ * LangChain4j Agent (camel-langchain4j-agent)
+ * LangChain4j Agent component
+ *
+ * Category: ai
+ * Since: 4.14
+ * Maven coordinates: org.apache.camel:camel-langchain4j-agent
+ *
+ * Syntax: <code>langchain4j-agent:agentId</code>
+ *
+ * Path parameter: agentId (required)
+ * The Agent id
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path agentId
+ * @return the dsl builder
+ */
+ public static
LangChain4jAgentEndpointBuilderFactory.LangChain4jAgentEndpointBuilder
langchain4jAgent(String componentName, String path) {
+ return
LangChain4jAgentEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
/**
* LangChain4j Chat (camel-langchain4j-chat)
* LangChain4j Chat component
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangChain4jAgentEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangChain4jAgentEndpointBuilderFactory.java
new file mode 100644
index 00000000000..3c3bef374af
--- /dev/null
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangChain4jAgentEndpointBuilderFactory.java
@@ -0,0 +1,352 @@
+/* Generated by camel build tools - do NOT edit this file! */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.endpoint.dsl;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.function.*;
+import java.util.stream.*;
+import javax.annotation.processing.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * LangChain4j Agent component
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface LangChain4jAgentEndpointBuilderFactory {
+
+ /**
+ * Builder for endpoint for the LangChain4j Agent component.
+ */
+ public interface LangChain4jAgentEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedLangChain4jAgentEndpointBuilder advanced() {
+ return (AdvancedLangChain4jAgentEndpointBuilder) this;
+ }
+
+ /**
+ * Comma-separated list of input guardrail class names to validate user
+ * input before sending to LLM.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param inputGuardrails the value to set
+ * @return the dsl builder
+ */
+ default LangChain4jAgentEndpointBuilder inputGuardrails(String
inputGuardrails) {
+ doSetProperty("inputGuardrails", inputGuardrails);
+ return this;
+ }
+ /**
+ * Comma-separated list of output guardrail class names to validate LLM
+ * responses.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param outputGuardrails the value to set
+ * @return the dsl builder
+ */
+ default LangChain4jAgentEndpointBuilder outputGuardrails(String
outputGuardrails) {
+ doSetProperty("outputGuardrails", outputGuardrails);
+ return this;
+ }
+ /**
+ * Tags for discovering and calling Camel route tools.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param tags the value to set
+ * @return the dsl builder
+ */
+ default LangChain4jAgentEndpointBuilder tags(String tags) {
+ doSetProperty("tags", tags);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the LangChain4j Agent component.
+ */
+ public interface AdvancedLangChain4jAgentEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default LangChain4jAgentEndpointBuilder basic() {
+ return (LangChain4jAgentEndpointBuilder) this;
+ }
+
+ /**
+ * 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 during
+ * starting and cause the route to fail being started. By deferring
this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that
when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing
time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedLangChain4jAgentEndpointBuilder
lazyStartProducer(boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * 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 during
+ * starting and cause the route to fail being started. By deferring
this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that
when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing
time
+ * of the processing.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedLangChain4jAgentEndpointBuilder
lazyStartProducer(String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * Chat Memory Provider of type
+ * dev.langchain4j.memory.ChatMemoryProvider. Note for this to be
+ * successful, you need to use a reliable ChatMemoryStore. This
provider
+ * supposes that a user has multiple sessions, if need only a single
+ * session, use a default memoryId.
+ *
+ * The option is a:
+ * <code>dev.langchain4j.memory.chat.ChatMemoryProvider</code> type.
+ *
+ * Group: advanced
+ *
+ * @param chatMemoryProvider the value to set
+ * @return the dsl builder
+ */
+ default AdvancedLangChain4jAgentEndpointBuilder
chatMemoryProvider(dev.langchain4j.memory.chat.ChatMemoryProvider
chatMemoryProvider) {
+ doSetProperty("chatMemoryProvider", chatMemoryProvider);
+ return this;
+ }
+ /**
+ * Chat Memory Provider of type
+ * dev.langchain4j.memory.ChatMemoryProvider. Note for this to be
+ * successful, you need to use a reliable ChatMemoryStore. This
provider
+ * supposes that a user has multiple sessions, if need only a single
+ * session, use a default memoryId.
+ *
+ * The option will be converted to a
+ * <code>dev.langchain4j.memory.chat.ChatMemoryProvider</code> type.
+ *
+ * Group: advanced
+ *
+ * @param chatMemoryProvider the value to set
+ * @return the dsl builder
+ */
+ default AdvancedLangChain4jAgentEndpointBuilder
chatMemoryProvider(String chatMemoryProvider) {
+ doSetProperty("chatMemoryProvider", chatMemoryProvider);
+ return this;
+ }
+ /**
+ * Chat Model of type dev.langchain4j.model.chat.ChatModel.
+ *
+ * The option is a: <code>dev.langchain4j.model.chat.ChatModel</code>
+ * type.
+ *
+ * Group: advanced
+ *
+ * @param chatModel the value to set
+ * @return the dsl builder
+ */
+ default AdvancedLangChain4jAgentEndpointBuilder
chatModel(dev.langchain4j.model.chat.ChatModel chatModel) {
+ doSetProperty("chatModel", chatModel);
+ return this;
+ }
+ /**
+ * Chat Model of type dev.langchain4j.model.chat.ChatModel.
+ *
+ * The option will be converted to a
+ * <code>dev.langchain4j.model.chat.ChatModel</code> type.
+ *
+ * Group: advanced
+ *
+ * @param chatModel the value to set
+ * @return the dsl builder
+ */
+ default AdvancedLangChain4jAgentEndpointBuilder chatModel(String
chatModel) {
+ doSetProperty("chatModel", chatModel);
+ return this;
+ }
+ /**
+ * Retrieval Augmentor for advanced RAG of type
+ * dev.langchain4j.rag.RetrievalAugmentor. This allows using RAG on
both
+ * Naive and Advanced RAG.
+ *
+ * The option is a: <code>dev.langchain4j.rag.RetrievalAugmentor</code>
+ * type.
+ *
+ * Group: advanced
+ *
+ * @param retrievalAugmentor the value to set
+ * @return the dsl builder
+ */
+ default AdvancedLangChain4jAgentEndpointBuilder
retrievalAugmentor(dev.langchain4j.rag.RetrievalAugmentor retrievalAugmentor) {
+ doSetProperty("retrievalAugmentor", retrievalAugmentor);
+ return this;
+ }
+ /**
+ * Retrieval Augmentor for advanced RAG of type
+ * dev.langchain4j.rag.RetrievalAugmentor. This allows using RAG on
both
+ * Naive and Advanced RAG.
+ *
+ * The option will be converted to a
+ * <code>dev.langchain4j.rag.RetrievalAugmentor</code> type.
+ *
+ * Group: advanced
+ *
+ * @param retrievalAugmentor the value to set
+ * @return the dsl builder
+ */
+ default AdvancedLangChain4jAgentEndpointBuilder
retrievalAugmentor(String retrievalAugmentor) {
+ doSetProperty("retrievalAugmentor", retrievalAugmentor);
+ return this;
+ }
+ }
+
+ public interface LangChain4jAgentBuilders {
+ /**
+ * LangChain4j Agent (camel-langchain4j-agent)
+ * LangChain4j Agent component
+ *
+ * Category: ai
+ * Since: 4.14
+ * Maven coordinates: org.apache.camel:camel-langchain4j-agent
+ *
+ * @return the dsl builder for the headers' name.
+ */
+ default LangChain4jAgentHeaderNameBuilder langchain4jAgent() {
+ return LangChain4jAgentHeaderNameBuilder.INSTANCE;
+ }
+ /**
+ * LangChain4j Agent (camel-langchain4j-agent)
+ * LangChain4j Agent component
+ *
+ * Category: ai
+ * Since: 4.14
+ * Maven coordinates: org.apache.camel:camel-langchain4j-agent
+ *
+ * Syntax: <code>langchain4j-agent:agentId</code>
+ *
+ * Path parameter: agentId (required)
+ * The Agent id
+ *
+ * @param path agentId
+ * @return the dsl builder
+ */
+ default LangChain4jAgentEndpointBuilder langchain4jAgent(String path) {
+ return
LangChain4jAgentEndpointBuilderFactory.endpointBuilder("langchain4j-agent",
path);
+ }
+ /**
+ * LangChain4j Agent (camel-langchain4j-agent)
+ * LangChain4j Agent component
+ *
+ * Category: ai
+ * Since: 4.14
+ * Maven coordinates: org.apache.camel:camel-langchain4j-agent
+ *
+ * Syntax: <code>langchain4j-agent:agentId</code>
+ *
+ * Path parameter: agentId (required)
+ * The Agent id
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path agentId
+ * @return the dsl builder
+ */
+ default LangChain4jAgentEndpointBuilder langchain4jAgent(String
componentName, String path) {
+ return
LangChain4jAgentEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+
+ }
+ /**
+ * The builder of headers' name for the LangChain4j Agent component.
+ */
+ public static class LangChain4jAgentHeaderNameBuilder {
+ /**
+ * The internal instance of the builder used to access to all the
+ * methods representing the name of headers.
+ */
+ private static final LangChain4jAgentHeaderNameBuilder INSTANCE = new
LangChain4jAgentHeaderNameBuilder();
+
+ /**
+ * The system prompt.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
LangChain4jAgentSystemMessage}.
+ */
+ public String langChain4jAgentSystemMessage() {
+ return "CamelLangChain4jAgentSystemMessage";
+ }
+ /**
+ * Memory ID.
+ *
+ * The option is a: {@code Object} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code LangChain4jAgentMemoryId}.
+ */
+ public String langChain4jAgentMemoryId() {
+ return "CamelLangChain4jAgentMemoryId";
+ }
+ }
+ static LangChain4jAgentEndpointBuilder endpointBuilder(String
componentName, String path) {
+ class LangChain4jAgentEndpointBuilderImpl extends
AbstractEndpointBuilder implements LangChain4jAgentEndpointBuilder,
AdvancedLangChain4jAgentEndpointBuilder {
+ public LangChain4jAgentEndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new LangChain4jAgentEndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git
a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
index b4f1cdf6e50..04cb4c4e4db 100644
---
a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
+++
b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
@@ -222,6 +222,7 @@
org.apache.camel.component.kubernetes.secrets.KubernetesSecretsComponent=camel:k
org.apache.camel.component.kubernetes.service_accounts.KubernetesServiceAccountsComponent=camel:kubernetes
org.apache.camel.component.kubernetes.services.KubernetesServicesComponent=camel:kubernetes
org.apache.camel.component.kudu.KuduComponent=camel:kudu
+org.apache.camel.component.langchain4j.agent.LangChain4jAgentComponent=camel:langchain4j-agent
org.apache.camel.component.langchain4j.chat.LangChain4jChatComponent=camel:langchain4j-chat
org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsComponent=camel:langchain4j-embeddings
org.apache.camel.component.langchain4j.tools.LangChain4jToolsComponent=camel:langchain4j-tools
diff --git
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
index f913daa99fc..b6d1dfea680 100644
---
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
+++
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
@@ -38,6 +38,7 @@ public final class MojoHelper {
switch (dir.getFileName().toString()) {
case "camel-ai":
return Arrays.asList(dir.resolve("camel-chatscript"),
dir.resolve("camel-djl"),
+ dir.resolve("camel-langchain4j-agent"),
dir.resolve("camel-langchain4j-core"),
dir.resolve("camel-langchain4j-chat"),
dir.resolve("camel-langchain4j-embeddings"),
dir.resolve("camel-langchain4j-tokenizer"),
dir.resolve("camel-langchain4j-tools"),
dir.resolve("camel-langchain4j-web-search"),