AI Platform · Mobility

An AI-Assisted Vehicle Rental Marketplace

A car-rental marketplace with an AI agent that runs bookings end to end over WhatsApp — confirming availability, checking renter documents, and closing the deal — backed by a ledger that splits and settles every payment between the operator and the rental company.

Built by
HashCode – FZE
Type
Full-stack web platform with an autonomous AI booking agent, built end to end
Industry
Vehicle rental / mobility

3

Sided marketplace

WhatsApp

AI booking agent

Rust

Booking engine

To the dirham

Ledger accuracy

Overview

This is a car-rental marketplace built around an AI agent that actually closes bookings over WhatsApp. Three parties meet on it: renters who book cars, rental companies who list their fleets and set prices, and the operator in the middle who takes a commission and settles the money. Renters browse and book, companies manage handovers, and the operator sits between them.

But the booking form was never the hard part — it's everything around it. Verifying a renter's documents, agreeing availability with the company, generating a signed rental agreement, splitting each payment between company and operator, and keeping a running ledger both sides can trust. The platform handles all of it.

We built and own the full stack — the customer-facing site, the backend API, the payment and settlement engine, the document and contract pipeline, and the AI agent that runs bookings over WhatsApp. There's no third-party platform underneath; the parts that matter are our own code.

The Challenge

Renting a car through a marketplace involves three parties who are rarely online at the same time. A renter enquires, the company has to confirm the exact car is free, the renter has to send an Emirates ID, passport, or licence, and someone has to check it's valid — only then can a booking be confirmed and a contract signed. Done by hand over chat, it's slow, error-prone, and hard to audit. The money is harder than the messaging: every booking is shared between company and operator, and some payments — a traffic fine, an extra day, a no-deposit fee — pass straight through to one party and must never be counted as owed to the other. Get it wrong and someone is overcharged or paid twice. So the system had to:

  • Automate the booking conversation without ever losing control of it.
  • Check renter documents automatically, but keep a human-sensible record of each decision.
  • Keep a ledger correct to the dirham across bookings, renewals, splits, and settlements.
  • Handle pass-through charges and deposits without ever double-counting who's owed what.

The Solution

We built it in clean layers, keeping the business logic away from any one framework or vendor so nothing was painted into a corner. Here's how the pieces fit together.

An autonomous booking agent that runs the conversation

A dedicated agent handles enquiries end to end over WhatsApp: it messages the rental company to confirm availability, collects the renter's documents, checks them, and drives the booking to confirmation — or to a clean “car unavailable” or timeout when it can't. It's written in Rust and compiled to a native extension, so the booking logic runs as fast compiled code called directly from the rest of the backend.

A state machine, not a free-running chatbot

Every conversation moves through fixed states — awaiting the company, awaiting documents, awaiting confirmation, confirmed — with explicit dead ends for unavailable cars, expiries, and failures. The language model reads and interprets each message, but it can't move a booking forward on its own; transitions are guarded by code. Flexible in how it understands people, strict in what it's allowed to do.

Document checks with vision

When a renter sends an ID, passport, or licence, the agent hands the image to a vision-capable language model and asks a narrow question: is this the right kind of document, is it readable, is it valid. A manual review step becomes automatic, without losing a record a human can sanity-check.

A ledger built for a marketplace

The finance engine treats every booking as split between operator and company: it records who collected each payment, who it's owed to, and settles the difference. Pass-through charges like fines and extra fees go to the right party without ever being booked as owed between them; renewals inherit the original split; pending payments stay out of every total until they clear. The wallet shows what's genuinely owed — net, not gross — so nobody is double-charged.

Contracts and signatures, generated on the server

Rental and partner agreements are produced as PDFs on the backend and sent for e-signing through time-limited links. Handover and vehicle-return steps for driver and renter fire as structured message templates, so the paperwork tracks the physical car.

Technology

Technology stack used to build the platform
LayerTechnology
FrontendNext.js (React, TypeScript), Tailwind CSS
Backend APIPython, FastAPI, async SQLAlchemy
DatabasePostgreSQL, with versioned schema migrations
Booking agentRust, compiled to a native Python extension, on an async runtime
Conversational AIVision-capable large language model (message interpretation + document validation)
MessagingWhatsApp Business provider, driven by signed webhooks
PaymentsThird-party payments provider
Object storageS3-compatible storage for documents and images
DocumentsServer-side PDF generation and e-signing
AuthenticationJSON Web Tokens with one-time-password login
InfrastructureDocker / Docker Compose; the test suite must pass before the backend starts

The backend is a modular monolith — separate API areas for public browsing, accounts, companies, payments, admin, and operations over one PostgreSQL database — with the Rust booking agent embedded as a native module and the WhatsApp provider integrated through HMAC-signed webhooks verified in constant time.

Results & Impact

End to end

bookings run by an AI agent over WhatsApp

Automated

ID, passport and licence checks via vision AI

To the dirham

ledger correct across splits, renewals and settlements

Rust core

compiled booking engine embedded in a Python backend

Why It Matters

This one has to earn its keep in a live commercial flow, where a wrong move costs a real booking or a real dirham. The interesting decision was where to draw the line between the model and the code. We let the language model interpret whatever a customer types, but it can't advance a booking on its own — a state machine does that. Building the booking engine in Rust and embedding it in the Python backend was a deliberate call for speed and safety, not a default we reached for. The upshot is one system that handles both the messy human conversation and the exact accounting sitting behind it.

  • AI agents
  • Marketplace
  • WhatsApp automation
  • Rust
  • FastAPI
  • Payments & settlement
  • Computer vision
  • Fintech ledger

Build something like this with HashCode

AI platforms, automation, and custom software — designed, built, and operated end to end. Tell us about your project.