The short version: An AI agent helps a delivery operation where decisions depend on messy, unstructured input: exceptions, rider and customer messages, proof-of-delivery checks and "where is my order" chats. Route and assignment maths should stay with an optimisation solver. The agent sits on top, calls it, and hands doubtful cases to a dispatcher.
If you run dispatch for a delivery, quick-commerce, food or e-commerce logistics business and are wondering whether to build an AI agent, the direct answer is: build one for the communication and exception work around dispatch, not for the routing itself. Your route optimiser or rules engine already handles the arithmetic. What it cannot do is read a rider's WhatsApp message saying the customer's building gate is locked, decide that this order needs a new slot, call the solver, and tell the customer in Arabic, Hindi or English what happens next.
This guide goes through the jobs buyers usually ask about, which ones an agent does well, which ones it should not do, and what a realistic build looks like.
What does an AI agent do in delivery scheduling and dispatching?
An AI agent is a language model connected to tools. In a delivery operation, those tools are your own systems: the order management system (OMS), the transport or fleet management system (TMS), rider app events, your route solver and your messaging channels. The agent receives an event, reads the relevant state through those APIs, decides on an action within limits you define, and either takes the action or asks a person to approve it.
In practice, the dispatch-side jobs look like this:
- Exception triage. A rider goes offline, a store marks an item out of stock, a customer changes the address. The agent classifies the event, gathers the context (which orders, which promised times, which riders nearby) and proposes or applies the standard fix.
- Re-plan triggers. It decides when a change is big enough to call the solver again, instead of re-optimising on every GPS ping.
- Dispatcher assistance. It answers a dispatcher's question in plain language ("which orders in zone 4 will miss their slot?") by querying your systems, and drafts the actions for one-click approval.
- Customer and rider conversations. It handles inbound messages that would otherwise land in a support queue.
What it should not do is compute the routes. Language models are slow, costly per call and inconsistent at combinatorial optimisation. Vehicle routing is a solved engineering problem with dedicated tools, such as Google's open-source OR-Tools routing library, and commercial solvers built into most TMS products.
Rules engine vs optimisation solver vs AI agent: which does what?
Most mature operations end up running all three. The useful question is which layer owns which decision.
| Capability | Rules engine | Optimisation solver | AI agent |
|---|---|---|---|
| Best at | Fixed policies: "orders over 5 kg go to bikes with boxes" | Assigning orders to riders and sequencing stops under constraints | Interpreting unstructured input and choosing the next action |
| Input | Structured fields | Structured orders, vehicles, time windows, distances | Free text, voice-to-text, images, plus structured data via tools |
| Behaviour | Deterministic | Deterministic for a given input; optimal or near-optimal | Probabilistic; needs evaluation and guardrails |
| Speed and cost | Very fast, near-zero cost | Fast; cost grows with problem size | Slower per decision; pay per model call |
| Fails when | A case nobody wrote a rule for | The data or constraints are wrong | It misreads context or is asked to act outside its limits |
| Typical use | Eligibility, SLAs, zone rules | Batch and dynamic routing, slot capacity | Exceptions, WISMO, POD review, dispatcher copilot |
If a vendor pitches an "AI agent" that does all three, ask which part is actually a language model. Often the routing is still a solver, which is fine, as long as you know what you are paying for.
How does dynamic delivery scheduling and re-planning work with an agent?
Dynamic scheduling means the plan changes during the day as orders arrive, riders log on and off, and stops fail. The solver can re-plan in seconds. The hard part is deciding when to re-plan and what to tell people when the plan changes.
A workable pattern:
- Events (new order, rider offline, failed attempt, customer reschedule request) arrive on a queue.
- Simple events go straight to the rules engine or solver. No model call needed.
- Events with unstructured content, such as a customer message asking for "after 6 instead", go to the agent. It extracts the intent and the new window, checks slot capacity through your scheduling API, and either books it or offers alternatives.
- If the change affects other customers' promised times, the agent drafts the notifications and, above a threshold you set (for example, a delay beyond the promised window), routes the decision to a dispatcher.
The agent is a translator and coordinator here. The schedule itself stays in your system of record, so you can audit every change.
Can an AI agent optimise the dispatch queue?
Partly. Queue prioritisation has two parts. The numeric part (promised time, distance, rider availability, order value) is better handled by a scoring rule or the solver, because you want it fast and explainable. The judgement part is where an agent helps: reading notes such as "medicine, customer elderly, call before arriving", spotting that three tickets are about the same stuck order, or noticing that a store's status messages suggest it is running late.
A sensible design has the agent attach tags and a short reason to queue items, while the ranking itself stays rule-based. Dispatchers see why an order was bumped, and you can tune the weights without retraining anything. Letting a model reorder the queue directly makes it hard to explain to riders and customers why one order went before another.
How does an AI agent handle digital proof of delivery?
Digital proof of delivery (POD) usually means some combination of a photo, a one-time password (OTP) the customer reads out, a signature on the rider's phone and a GPS timestamp. Most rider apps already capture these. The gap is review: nobody has time to look at every photo, so disputes are settled days later with weak evidence.
An agent can check each POD record as it arrives:
- OTP: did it match, and was it entered at the drop location? This is a deterministic check and does not need a model.
- Photo: a vision-capable model can judge whether the image shows a parcel at a door or in a hand, whether it is blank or blurred, and whether it looks like the same photo used on another order.
- Location and time: is the GPS fix within a set radius of the address, and does the timestamp fit the route?
- Signature or name: is it present and does the recipient name look plausible?
The important design choice is what happens on a fail. The agent should not reject deliveries on its own. It should mark the record as doubtful, explain why, and either message the rider for a better photo while they are still nearby or put it in a review queue. Image checks make mistakes, and a wrongly rejected delivery is a rider pay dispute.
Automated delivery notifications and WISMO on WhatsApp: where does an agent fit?
"Where is my order" (WISMO) is one of the most common questions a delivery support team gets, and in India and the GCC many customers ask on WhatsApp rather than in the app.
Split the work into two kinds of message:
Outbound status notifications (confirmed, packed, out for delivery, delivered, delayed) are event-triggered. They do not need an AI agent. On WhatsApp, business-initiated messages outside an open conversation must use pre-approved message templates, and Meta prices them by category; see the WhatsApp Business Platform pricing documentation for the current rules and rates, which Meta revises from time to time.
Inbound replies and questions are where an agent pays off. A customer replies to the "out for delivery" message with "can he leave it with the guard?" or "it's been 40 minutes". The agent identifies the order from the phone number or order ID, pulls live status and rider location from your systems, answers in the customer's language, updates delivery instructions if your policy allows, and hands over to a person when it cannot help or the customer asks for one.
This is the pattern we used for Khedmah, Oman's digital services platform. We built an AI support chatbot that handles order tracking and delivery support questions in Arabic and English, looks up live status through secure integrations with Khedmah's backend, runs on WhatsApp, web and mobile, and hands complex cases to a human agent with the full conversation history attached. For the channel mechanics, see our guide on how to build a WhatsApp AI chatbot.
Can an AI agent help with fleet tracking and ETAs?
The tracking itself is telematics or rider-app GPS. The ETA is a prediction from your routing engine or a model trained on your historical delivery times. Neither is a language-model job.
An agent adds value on top of both: explaining an ETA to a customer in plain words, noticing that a rider has not moved for an unusual time and asking them why, summarising a shift's late deliveries for a fleet manager, or answering "which vehicles are due for service this week?" by querying your fleet management system. Treat it as a front end to your fleet data, not a source of it. If your ETAs are poor, fix the ETA model first; an agent will only communicate a bad number more politely.
Should you build or buy an AI agent for last-mile delivery software?
Buy when your need is standard and your stack is standard. Many TMS, last-mile and customer-messaging products now ship AI features for tracking pages, notifications and support. If they integrate with your OMS and cover your languages, that is usually cheaper than a custom build.
Build when one or more of these is true:
- Your dispatch logic is your competitive edge (dark-store batching, mixed fleets, hyperlocal slots) and off-the-shelf tools do not model it.
- Your data lives across several in-house systems that a vendor's agent cannot reach.
- You need specific languages or dialects, such as Gulf Arabic or Hinglish, handled well in chat.
- You have data residency or privacy requirements, such as India's DPDP Act (see our DPDP compliance guide for apps and chatbots), that a shared SaaS model does not meet.
A common middle path is to keep your existing TMS and route solver, buy the WhatsApp Business API access through a provider, and build only the agent layer that connects them.
What does a realistic architecture look like?
Customer / rider (WhatsApp, app, web)
|
Channel gateway ── message templates, session handling
|
AI agent ──── policy limits, prompts, evaluation logs
/ | \
OMS API TMS / solver Rider app + POD store
\ | /
Human dispatcher console ── approvals, overrides, handoffs
The parts that matter:
- The model handles language, classification and choosing which tool to call. It does not hold state.
- Tools are thin, permission-scoped wrappers over your APIs: get order, get rider location, propose reassignment, book slot, send template. Each one has limits, for example "can reschedule within the same day, cannot issue refunds".
- Systems of record stay where they are. The agent reads live data and writes changes through your APIs, so the OMS and TMS remain the truth.
- Human-in-the-loop is a real screen, not an afterthought. Dispatchers see proposed actions with reasons, approve or override them, and those overrides go into your evaluation set.
- Evaluation and logging record every decision with its inputs, so you can measure accuracy before widening the agent's limits.
If your order data arrives by spreadsheet or phone call, start by digitising that. An agent cannot act on data it cannot reach through an API.
How much does an AI agent for delivery operations cost?
The ranges below match our AI agent development cost guide, applied to delivery work:
| Scope | Example | Typical build cost | Timeline |
|---|---|---|---|
| Single supervised workflow | WISMO on WhatsApp, or POD review queue | $15,000–$50,000 | 6–10 weeks |
| Single autonomous workflow | Agent reschedules and notifies without per-case approval | $40,000–$100,000 | 8–14 weeks |
| Multi-agent, moderate | Exceptions, POD review and customer messaging together | $80,000–$180,000 | 3–5 months |
| Enterprise multi-agent | Several regions, deep TMS/ERP integration, compliance | $150,000–$350,000+ | 5–8 months |
Running costs come on top: model calls, WhatsApp conversation charges, hosting, and monitoring. Evaluation work often takes 20–30% of the build budget and is the part most often left out of low quotes.
What are the risks and limits?
- Wrong actions at scale. A misread message that reschedules one order is a nuisance. A prompt change that misreads every message is an incident. Start supervised, and widen limits only as measured accuracy supports it.
- Bad underlying data. If rider GPS is patchy or store prep times are guesses, the agent's answers will be wrong with confidence.
- Latency. Model calls add seconds. Keep time-critical assignment in the solver and rules, and use the agent where a few seconds do not matter.
- Language coverage. Test with real messages in the dialects and mixed languages your customers use, not translated samples.
- Privacy. Chats contain names, phone numbers and addresses. Decide what is logged, for how long, and what is sent to a model provider.
- Over-automation. Customers with a missing or damaged order often want a person. Make handoff easy and keep the conversation history attached.
Where to start
Pick the one workflow that fills your support or dispatch queue today, usually WISMO or exception triage, and build a supervised agent for it with clear limits and an evaluation set from your real tickets. Once you can measure how often it is right, decide what to automate next.
If you want help scoping that first workflow, our AI agent development team can review your OMS, TMS and messaging setup and tell you where an agent fits and where it does not. For customer-facing chat on WhatsApp and web, see our AI chatbot development service.
Related reads: AI agent development cost, How to build a WhatsApp AI chatbot, Khedmah AI support chatbot case study
Explore Our AI Agent Services

