FlowsBook a callSign inCreate free accountSign up
AI employees and automation

An AI agent for logistics: roads, weather and routes before the vans leave

An AI agent for logistics checks closures, live road speeds and the forecast around depots and drops, plans each van's order of stops, and briefs dispatch before departure.

Part of the guide AI employees

By the xMap team · · 4 min read

An AI agent for logistics does the checks a good dispatcher makes at five in the morning, every morning, without forgetting any: it looks for road closures and roadworks near each depot and drop, reads the live speed on the roads out of each yard, checks the weather for the day, puts each van's stops in a sensible order, and sends dispatch a short briefing before the first van leaves. People still decide; they just decide with everything in front of them.

This article is for dispatch and operations managers at couriers, wholesale distributors, field service firms and anyone running vans or trucks on daily rounds. It covers the four morning checks, how to read each one, a made-up example from Sao Paulo, the mistakes that make a briefing ignored, and the blocks behind such an AI employee.

The four morning checks

CheckWhat it tells dispatchBlock
Closures and roadworksWhich depots, customers or routes have an incident close by right nowTraffic incidents
Live road speedsHow the roads out of each depot are moving at the moment it runsTraffic Flow
WeatherRain, heat or wind on the day, per depot or stopWeather forecast
Order of stopsA sensible visiting order for each van, with distances and timesRoute planner

The checks, and the blocks that make them.

Reading each check honestly

Traffic incidents reads closures, roadworks and other incidents live, positioned to about 150 metres. Around each depot or customer it adds how many incidents are nearby and the closest one, so a briefing can say "closure 300 m from the north gate".

Traffic Flow gives the current speed, the free-flow speed, a jam factor from 0 to 10 and the level in words, measured when the flow runs. It does not count vehicles and has no peak-hour history, so run it at the hour you care about: a flow at 05:30 tells you how 05:30 looks. For hourly vehicle counts, the only coverage is roads in the United Arab Emirates since 2021, through Regional data sources.

Weather forecast adds to each place whether rain is expected, how much, the next rainy day and the hottest it will get, up to 16 days ahead. A day with heavy rain or heat over a set level can change loading, cold-chain checks or rest breaks.

Route planner puts the stops that reach it in a good order from a start you pick: one route, one per driver by a field such as owner, or the stops shared between a number of vans. Each stop gets its place in the route, the distance and time from the last stop, and a directions link. Times are for usual traffic, and time spent at each stop is not added, so leave room for unloading.

A made-up example

This example is invented. A wholesale drinks distributor in Sao Paulo runs 12 vans from two depots. At 05:15 its AI employee reads the day's orders from a spreadsheet in Google Sheets, checks incidents within 1 km of both depots and every customer, reads road speeds outside each depot, checks the forecast, and plans one route per driver.

At 05:30 dispatch reads: "Depot East: roadworks on the access road, jam factor 7 outside the gate; send vans out by the south exit. Heavy rain from 14:00; move the Vila Mariana deliveries to the morning. Van 4 has a closure 200 m from its third stop." Each driver gets their own route with directions links on WhatsApp. A parcel firm in Toronto or a field service company in Manila can use the same pattern; in winter, the forecast part matters more.

Mistakes that make the briefing ignored

  • Arriving after the vans left. Schedule it so the briefing lands at least 15 minutes before the first departure.
  • Every incident in the city. Only incidents near your depots, customers or routes belong in it.
  • Reading speeds as volumes. Slow roads tell you how traffic is moving, not how many vehicles there are.
  • Trusting route times to the minute. They exclude time at each stop. Add your usual unloading time when promising windows.
  • Sending to everyone. Dispatch needs the whole picture; each driver needs only their route and what is on it.

The blocks in order

  1. Schedule: every working day at 05:15 in your time zone.
  2. My data or New rows: depots and the day's stops, from a table or a spreadsheet in Google Sheets.
  3. Traffic incidents around each place, and Traffic Flow outside each depot.
  4. Weather forecast for each depot and stop.
  5. Route planner: one route per driver, from their depot, back at the end.
  6. xMap LLM, set to The whole list: the briefing for dispatch in a few lines, naming the depots and stops affected and what to do.
  7. Email to dispatch, and a per-driver message with each route.

What lands each morning is one short briefing for dispatch and one route per driver; on a quiet day the briefing says so in a line. Ready-made versions include road closures near my depots, every hour, rain warning for my delivery hubs, daily operations briefing for every hub and road speeds outside my depots. The logistics and delivery page collects more, and the field operations guide covers dispatch and routing in depth.

Questions

Can it count the trucks on a road?

Not in general. Traffic Flow gives live speeds and a jam factor, not counts; hourly vehicle counts exist only for roads in the United Arab Emirates, through Regional data sources.

How many stops can a route hold?

Route planner has a most-stops setting per route; stops beyond it, and places without a position, are listed after the routes and the step says how many.

Can drivers get their route on their phone?

Yes. Each stop has a directions link, and the flow can send each driver's route by WhatsApp, email or Slack.

What if the routing service cannot be used one morning?

Route planner then works the route out on straight lines, free, and marks each stop and the email as an estimate.

Templates that do this

Read next

More on ai employees and automation · Every article · Templates

Put it to work

An AI employee in xMap Flows does this on live data, on its own timetable. Start from a template or describe it in plain words.