Agent Name: Geospatial Supply Chain Agent
What it does:
The Geospatial Supply Chain Intelligence Agent leverages a robust Supply Chain Knowledge Graph to deliver context-aware recommendations across suppliers, products and locations.
By connecting and analyzing relationships between suppliers, products and locations the agent enables to make faster and smarter supply chain decisions.
The agent helps to identify alternate suppliers based on product availability, pricing, and regional proximity.
The most challenging part in the supply chain is to search the nearest location for alternative suppliers. This agent solves the issues using geospatial co-ordinates to find the suppliers.
Key capabilities include:
Alternate supplier recommendation based on availability, location, and supplier relationships
Nearest supplier discovery using geospatial graph queries
Alternate suppliers for similar products
Dataset and why a graph fits:
Created a Supply Chain Dataset with 8000 rows having the below columns
| Column | Description |
|---|---|
| Supplier_ID | Unique codes like SUP83421 |
| Supplier_Name | Tech distributor names (e.g. Nova Components, Apex Distributors) |
| Product | 48 distinct computer spare types (RAM, SSDs, CPUs, GPUs, laptop parts, peripherals, etc.) |
| Description | Detailed product specs per item |
| Price | pricing per product category |
| City | 30 Major Indian cities (Mumbai, Bengaluru, Delhi, Hyderabad, Chennai, etc.) |
| Latitude | coordinates |
| Longitude | coordinates |
A graph database is an ideal fit for supply chain systems because supply chains are naturally built around interconnected relationships between suppliers, products and locations.
Supply Chains Are Highly Connected Networks
A single product may involve:
Multiple suppliers
Different transportation routes
Graph databases are designed specifically to manage and analyze these interconnected ecosystems efficiently.
Faster Alternate Supplier Discovery
When a supplier disruption occurs, graph queries can instantly identify:
Alternate suppliers
Nearby suppliers
Suppliers providing similar products
Suppliers connected through existing logistics routes
Instead of performing multiple complex table joins, the graph traverses relationships directly.
Geospatial and Nearest Supplier Intelligence
Graph databases can combine relationship intelligence with spatial data to:
Find the nearest supplier
Optimize delivery routes
Loaded the supply_chain_dataset.csv file from Github into Neo4j Aura using the below script:
LOAD CSV WITH HEADERS FROM
AS row
CALL(row) {
MERGE (sup:Supplier {supplierId: trim(row.Supplier_ID)}) SET sup.name=row.Supplier_Name
MERGE (prd:Product {name: trim(row.Product)}) SET prd.description=row.Description,prd.price=toFloat(row.Price)
MERGE (cy:City {name: trim(row.City)}) SET cy.location = point({latitude: toFloat(row.Latitude), longitude: toFloat(row.Longitude)})
MERGE (sup)-[:SUPPLIES]->(prd)
MERGE (sup)-[:LOCATED_IN]->(cy)
} IN TRANSACTIONS OF 1000 ROWS
Neo4j Schema:
Node Count:
Relationship Count:
Agents Used:
| Type | Name | Description | Parameter |
|---|---|---|---|
| Cypher Template | Suppliers in City | Finds all suppliers explicitly located in a specified city. | cityName |
| Cypher Template | Suppliers of Product | Finds all suppliers that supply a specified product. | productName |
| Cypher Template | Alternate Suppliers for Product | Finds suppliers for a specific product, optionally excluding a known supplier by name to find alternative options. | productName,excludeSupplierName |
| Cypher Template | Suppliers Nearest to City | Finds suppliers located in cities geographically closest to a specified reference city. Returns the supplier name, the city they are located in, and the distance in kilometers. | referenceCityName |
| Text2Cypher | Natural Language to Cypher Tool | A general-purpose, free-form Text-to-Cypher tool that converts natural language questions into Cypher queries, executes them, and returns the results. Use this option when no specialized tool (e.g. for aggregation or domain-specific logic) is more appropriate. | |
| Cypher Template | Alternate Suppliers for Similar Product | Finds the alternate suppliers for the similar products supplied them | supplierName |
Demo of Agents in Action:
Finding suppliers in a specific City:
MATCH (s:Supplier)-[:LOCATED_IN]->(c:City {name: βBengaluruβ})
RETURN s.name as SupplierName,
s.supplierId as SupplierId,
c.name as City,
c.location as Location
ORDER BY s.name
Finding the no of suppliers in a specific city and listing them
Finding the Suppliers of a Product & their location:
Finding alternate nearest suppliers to a supplier which has closed in a specific location:
MATCH (c1:City {name: 'Kochi'})
MATCH (c2:City)
WHERE c1 <> c2
WITH c1, c2, point.distance(point({latitude: c1.latitude, longitude: c1.longitude}), point({latitude: c2.latitude, longitude: c2.longitude})) / 1000 AS distanceKm
ORDER BY distanceKm ASC
MATCH (s:Supplier)-[:LOCATED_IN]->(c2)
RETURN s.name AS supplierName, c2.name AS cityLocatedIn, distanceKm
What are Top 5 costly products supplied by a Supplier
Which suppliers are very close to a specific location and minimum distance:
MATCH (targetCity:City {name: βBhubaneswarβ})
WITH targetCity
MATCH (s:Supplier)-[:LOCATED_IN]->(c:City)
WHERE c <> targetCity
RETURN s.name AS supplierName, c.name AS cityLocatedIn,round(point.distance(c.location, targetCity.location)/1000) AS distanceKm ORDER BY distanceKm
Dashboard in Aura:
Link to Agent:










