diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 2070974b..9449b5a1 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -10,6 +10,7 @@ on:
pull_request:
branches:
- main
+
jobs:
build:
runs-on: ubuntu-latest
@@ -25,8 +26,10 @@ jobs:
- name: Verify with Maven
run: |
- mvn -B -f pom.xml clean install verify
+ mvn -B -f pom.xml clean install verify \
+ -pl ",!fluent/agentic" \
+ -am
- name: Verify Examples with Maven
run: |
- mvn -B -f examples/pom.xml clean install verify
+ mvn -B -f examples/pom.xml clean install verify
\ No newline at end of file
diff --git a/fluent/agentic/pom.xml b/fluent/agentic/pom.xml
new file mode 100644
index 00000000..2ebce363
--- /dev/null
+++ b/fluent/agentic/pom.xml
@@ -0,0 +1,65 @@
+
+
+ 4.0.0
+
+ io.serverlessworkflow
+ serverlessworkflow-fluent
+ 8.0.0-SNAPSHOT
+
+
+ Serverless Workflow :: Fluent :: Agentic
+ serverlessworkflow-fluent-agentic
+
+
+ 17
+ 17
+ UTF-8
+
+ 1.2.0-beta8-SNAPSHOT
+
+
+
+
+ io.serverlessworkflow
+ serverlessworkflow-experimental-types
+
+
+ io.serverlessworkflow
+ serverlessworkflow-fluent-func
+
+
+ dev.langchain4j
+ langchain4j-agentic
+ ${version.dev.langchain4j}
+
+
+ org.slf4j
+ slf4j-simple
+ test
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+ org.assertj
+ assertj-core
+
+
+ dev.langchain4j
+ langchain4j-ollama
+ test
+ 1.2.0-SNAPSHOT
+
+
+
+
\ No newline at end of file
diff --git a/fluent/agentic/src/main/java/io/serverlessworkflow/fluent/agentic/AgentAdapters.java b/fluent/agentic/src/main/java/io/serverlessworkflow/fluent/agentic/AgentAdapters.java
new file mode 100644
index 00000000..eafd2a82
--- /dev/null
+++ b/fluent/agentic/src/main/java/io/serverlessworkflow/fluent/agentic/AgentAdapters.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed 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 io.serverlessworkflow.fluent.agentic;
+
+import static dev.langchain4j.agentic.internal.AgentExecutor.agentsToExecutors;
+
+import dev.langchain4j.agentic.Cognisphere;
+import dev.langchain4j.agentic.internal.AgentExecutor;
+import dev.langchain4j.agentic.internal.AgentInstance;
+import io.serverlessworkflow.impl.expressions.LoopPredicateIndex;
+import java.util.List;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Stream;
+
+public final class AgentAdapters {
+ private AgentAdapters() {}
+
+ public static List toExecutors(Object... agents) {
+ return agentsToExecutors(Stream.of(agents).map(AgentInstance.class::cast).toList());
+ }
+
+ public static Function toFunction(AgentExecutor exec) {
+ return exec::invoke;
+ }
+
+ public static LoopPredicateIndex