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-examples.git
The following commit(s) were added to refs/heads/main by this push:
new aeaaceda Fix semantic-agent-routing: use evaluation: key, add expert:
typesafe-ai and camel-semantic-typesafe-ai dep (#297)
aeaaceda is described below
commit aeaaceda5ca7edd3b7035707b13f8f18b2cb33f8
Author: Guillaume Nodet <[email protected]>
AuthorDate: Sun Nov 15 20:49:25 2026 +0100
Fix semantic-agent-routing: use evaluation: key, add expert: typesafe-ai
and camel-semantic-typesafe-ai dep (#297)
The coordinator YAML had three issues:
- Used 'question:' instead of 'evaluation:' as the key for the semantic
evaluations block; 'question:' is unknown and was rejected at parse time
- Each evaluation was missing the required 'expert: typesafe-ai' field;
the expert name is mandatory and must reference a registered
SemanticAdapter bean
- camel-semantic-typesafe-ai was not declared as a dependency; it provides
TypeSafeAiSemanticAdapter which must be registered as the 'typesafe-ai'
bean
(added to the beans: block in coordinator.yaml)
---
.../META-INF/services/org/apache/camel/other.properties | 7 +++++++
semantic-agent-routing/other.properties | 7 +++++++
semantic-agent-routing/pom.xml | 4 ++++
.../src/main/resources/routes/coordinator.yaml | 14 ++++++++------
4 files changed, 26 insertions(+), 6 deletions(-)
diff --git
a/semantic-agent-routing/META-INF/services/org/apache/camel/other.properties
b/semantic-agent-routing/META-INF/services/org/apache/camel/other.properties
new file mode 100644
index 00000000..7308fb5c
--- /dev/null
+++ b/semantic-agent-routing/META-INF/services/org/apache/camel/other.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+name=semantic-typesafe-ai
+groupId=org.apache.camel
+artifactId=camel-semantic-typesafe-ai
+version=4.24.0-SNAPSHOT
+projectName=Camel :: AI :: Semantic TypeSafe AI
+projectDescription=Semantic expert using the TypeSafe AI decision API
diff --git a/semantic-agent-routing/other.properties
b/semantic-agent-routing/other.properties
new file mode 100644
index 00000000..7308fb5c
--- /dev/null
+++ b/semantic-agent-routing/other.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+name=semantic-typesafe-ai
+groupId=org.apache.camel
+artifactId=camel-semantic-typesafe-ai
+version=4.24.0-SNAPSHOT
+projectName=Camel :: AI :: Semantic TypeSafe AI
+projectDescription=Semantic expert using the TypeSafe AI decision API
diff --git a/semantic-agent-routing/pom.xml b/semantic-agent-routing/pom.xml
index bffd6c75..31db1e96 100644
--- a/semantic-agent-routing/pom.xml
+++ b/semantic-agent-routing/pom.xml
@@ -73,6 +73,10 @@ limitations under the License.
<groupId>org.apache.camel</groupId>
<artifactId>camel-semantic-typesafe-ai</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-typesafe-ai</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-a2a</artifactId>
diff --git a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml
b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml
index 897bd2cd..6fedc1fa 100644
--- a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml
+++ b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml
@@ -16,11 +16,13 @@
- beans:
- name: tripSupport
type: org.apache.camel.example.routing.TripSupport
+ - name: typesafe-ai
+ type: org.apache.camel.component.typesafeai.TypeSafeAiSemanticAdapter
- semantic:
evaluation:
specialist:
- expert: decisions
+ expert: typesafe-ai
type: choice
instructions: Which car rental specialist should handle the customer's
request?
criteria:
@@ -29,22 +31,22 @@
cost: Rental prices, total cost, budget, fees or price comparison
general: Greetings, service information or other questions
needsReservation:
- expert: decisions
+ expert: typesafe-ai
type: boolean
instructions: Does answering this customer request fully require input
about booking details, reservation lookup, changes or cancellation?
threshold: "{{routing.fan-out-threshold}}"
needsWeather:
- expert: decisions
+ expert: typesafe-ai
type: boolean
instructions: Does answering this customer request fully require input
about weather, rain, forecasts or driving conditions at the destination?
threshold: "{{routing.fan-out-threshold}}"
needsCost:
- expert: decisions
+ expert: typesafe-ai
type: boolean
instructions: Does answering this customer request fully require input
about rental prices, total cost, budget or fees?
threshold: "{{routing.fan-out-threshold}}"
relevant:
- expert: decisions
+ expert: typesafe-ai
type: boolean
instructions: >-
Does the drafted reply address every requested part within the named
specialist's
@@ -56,7 +58,7 @@
uncertainty: 0.1
uncertaintyPolicy: non-match
complete:
- expert: decisions
+ expert: typesafe-ai
type: boolean
instructions: >-
Does the final reply address every part of the customer's original
request,