# Smart Routing for Sustainable Supply Chain Networks: An AI and Knowledge Graph Driven Approach
## 3 Methodology
### Prototype Architecture: Modular Agent-Based Design
The agent then parses the response and checks whether a similar node already exists in the KG. To avoid duplication, the agent applies a dual filter: first, a spatial filter (within a 2 km radius) and second, a fuzzy text matching algorithm (with a string similarity above 0.8). If a near identical node is found, this node will be used; otherwise, a new waypoint node is created. The RouteEvaluatorAgent is responsible for the quantitative enrichment and validation of transport routes. For every route relationship with availability = 1 (the placeholder state), it calculates the distance and transit time, and estimates the transport cost and emissions. To perform its task, the agent verifies the presence and validity of geospatial coordinates for the start and end nodes using the appropriate mode transport evaluation method based on specialized functions. Currently, only road-based segments utilize real-world route data retrieved dynamically via the ORS API. The integrated evaluation method performs API calls to determine routable paths based on heavy goods vehicle profiles, returning actual driving distances and estimated travel durations. In cases where coordinates are not directly routable, a fallback mechanism is applied that snaps both endpoints to the nearest reachable point within a defined radius. This two-step approach ensures that road connections reflect infrastructure-aware routing rather than idealized geometric paths. For all other transport modes (sea, air, and rail), the application falls back to simplified geodesic estimations based on great-circle distances (the Haversine formula). These approximations are combined with mode-specific average speeds to estimate durations, and with fixed coefficients to derive emissions and cost metrics. For road transport, emission factors of 0.08 kg CO\({}_{2}\) per kilometer and cost coefficients of 0.05 EUR/km are applied, reflecting standard assumptions for long-distance truck operations. Sea transport is approximated using an average speed of 35 km/h for container ships and an emission factor of 0.015 kg CO\({}_{2}\)/km. Air transport assumes a speed of 800 km/h for cargo aircraft, with a high emission intensity of 0.45 kg CO\({}_{2}\)/km. Rail transport is evaluated with a speed of 60 km/h and an emission factor of 0.02 kg CO\({}_{2}\)/km, reflecting the comparatively low environmental impact of freight trains. These values currently serve as provisional estimates and are intended to be replaced by more sophisticated methods or empirical datasets in future development. If a route segment cannot be evaluated, it retains its incomplete status and is so flagged for further processing. To complete the list of agents, the Neo4 jBuilderAgent and CleanupAgent are responsible for the STORE tasks. The Neo4 jBuilderAgent executes Cypher queries to merge  
Figure 3: An example output generated by the SourceSearcherAgent for the suggested waypoint “Malta Freeport (Seaport)”. newly created nodes and relationships into the KG or update existing ones with enriched attributes. In parallel, the CleanupAgent ensures data integrity by removing incomplete routes. After completing the orchestration run, the multimodal supply chain network is ready for interaction and analysis. At this stage, the SELECT and USE tasks come into action. The SELECT task executed by the Selector enables the identification of optimal transport routes. At its core, the application uses [PERSON]'s shortest path algorithm, based on the Neo4j graph data science library procedure gds.shortestPath.dijkstra.stream [36]. The algorithm is executed on dynamic graph projections, which are generated to represent only the relevant needed subgraphs. Each projection is tailored to the selected optimization criterion: a costGraph minimizes the total transport cost, a timeGraph minimizes the total travel time, an emissionGraph minimizes transport emissions, and a multiGraph supports weighted combinations of multiple criteria and user-defined constraints. The multiGraph provides the maximum optimization configurability.