From 5e5792e4a5f7adc0412d7a0d6ceaef54fbbc2b21 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Thu, 5 Nov 2026 15:34:45 +0000 Subject: [PATCH] Fix semantic-agent-routing: use evaluation: key, add expert: typesafe-ai and camel-semantic-typesafe-ai dep 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) --- semantic-agent-routing/pom.xml | 4 ++++ .../src/main/resources/routes/coordinator.yaml | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/semantic-agent-routing/pom.xml b/semantic-agent-routing/pom.xml index 8b5200d64..31db1e966 100644 --- a/semantic-agent-routing/pom.xml +++ b/semantic-agent-routing/pom.xml @@ -69,6 +69,10 @@ limitations under the License. org.apache.camel camel-semantic + + org.apache.camel + camel-semantic-typesafe-ai + org.apache.camel camel-typesafe-ai diff --git a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml index 1811007b0..6fedc1fa7 100644 --- a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml +++ b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml @@ -16,10 +16,13 @@ - beans: - name: tripSupport type: org.apache.camel.example.routing.TripSupport + - name: typesafe-ai + type: org.apache.camel.component.typesafeai.TypeSafeAiSemanticAdapter - semantic: - question: + evaluation: specialist: + expert: typesafe-ai type: choice instructions: Which car rental specialist should handle the customer's request? criteria: @@ -28,18 +31,22 @@ cost: Rental prices, total cost, budget, fees or price comparison general: Greetings, service information or other questions needsReservation: + 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: 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: 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: typesafe-ai type: boolean instructions: >- Does the drafted reply address every requested part within the named specialist's @@ -51,6 +58,7 @@ uncertainty: 0.1 uncertaintyPolicy: non-match complete: + expert: typesafe-ai type: boolean instructions: >- Does the final reply address every part of the customer's original request,