DEV Community

Gabe Jacobs
Gabe Jacobs

Posted on

How We Built an Autonomous Fleet Matching Platform Using Code and AI

Connecting peer-to-peer or fleet asset owners with customers in real-time is a classic two-sided marketplace problem. Traditionally, managing availability, location constraints, driver verification, and customer inquiries requires human dispatchers and manual coordination.

When building the core architecture for Sprinter Van Rentals, our goal was to eliminate manual dispatch entirely. We designed an automated marketplace engine using modern code pipelines and AI agents that automatically pair customers seeking specific vehicle configurations with van owners ready to fulfill the booking.

Here is a look at the system architecture and engineering choices that allow the platform to run on its own.

  1. The Dynamic Matching Engine (Code + AI) At the core of the platform is an automated matching service. Instead of relying on static search filters, we use a hybrid approach combining deterministic code rules with AI language models.

[ Customer Inquiry / Request ]


[ AI Parsing Layer ] ──► (Extracts dates, capacity, location, trip profile)


[ Matching Algorithm ] ──► (Scores fleet owner preferences & availability)


Automated Booking Dispatch
AI Parsing Layer: Unstructured customer queries (e.g., "Need a high-roof van in Denver next weekend for 8 people with luggage") are processed through an LLM API wrapper to output structured JSON:

JSON
{
"location": "Denver, CO",
"passengers": 8,
"vehicle_type": "High-Roof Passenger",
"start_date": "2026-08-07",
"end_date": "2026-08-09"
}
Algorithmic Scoring: Custom backend code queries our database to rank registered fleet owners using a weighted score based on:

Geographic proximity (Haversine formula distance checks).

Real-time calendar availability.

Owner acceptance rate and historical response speed.

  1. Autonomous Event-Driven Workflows To run without manual intervention, the platform relies on an event-driven architecture built on serverless webhooks and message queues (e.g., Redis / Celery or AWS SQS):

Automated Notifications: Once the matching engine identifies the top 3 optimal van owners for a customer's request, real-time webhooks instantly trigger SMS/email alerts via Twilio and SendGrid directly to the vehicle owners.

Smart Expiration Windows: Time-based background workers monitor pending requests. If an owner does not accept within a given window (e.g., 15 minutes), the event loop automatically re-routes the reservation offer to the next qualified fleet owner.

Automated Customer Assignment: Once an owner accepts, payment authorization locks in, insurance validation webhooks execute, and both parties receive automated pickup confirmation details—completing the booking lifecycle hands-free.

  1. AI-Powered Customer & Owner Onboarding Managing communication at scale can easily create bottlenecks. We introduced AI support agents trained on our platform rules:

Customer Instant Support: An embedded AI assistant handles immediate questions regarding mileage limits, towing capability, or insurance requirements.

Owner Fleet Management: Vehicle owners can upload vehicle specs, and our vision/OCR pipeline automatically extracts VIN details, registration data, and maintenance records to get vehicles live on the network fast.

Key Takeaways & Lessons Learned
Let Code Handle Logic, Let AI Handle Context: Don't use AI for things deterministic algorithms do best (like checking date overlaps or calculating pricing). Use code for business logic and AI for parsing user intent and context.

Fail-Safes are Essential: When building autonomous systems, implement fallback rules. If AI confidence scores drop below a threshold, the system routes the query through standard UI dropdown filters.

Building a hands-off matching platform significantly reduces operational overhead while delivering instant fulfillment to renters.

How are you integrating AI agents or automated matching algorithms in your software projects? Let’s discuss in the comments below!

Top comments (1)

Collapse
 
alexshev profile image
Alex Shev

Fleet matching is a good place for AI only if the constraints stay explicit. The hard part is not producing a plausible match; it is encoding availability, geography, compliance, preferences, and edge cases so the system can explain why a match is safe enough to act on.