Kereta Sewa Jalan-jalan

Car Rental Booking Agent — Agentic AI Workflow with Code-as-Action Pattern

Python 3.8+ FastAPI Google Gemini 2.5 Flash TinyDB M5 Agentic Workflow Malaysian Context

Project Overview & Problem Statement

Challenge: Small Malaysian car rental operators juggle phone calls, WhatsApp chats, and spreadsheets just to track which cars are out, which are booked, and which need maintenance. Bookings get lost, double-bookings happen, and deposit tracking is manual.

Solution: Kereta Sewa Jalan-jalan is an AI rental agent that manages a 56-vehicle Klang Valley fleet via natural language chat. Customers describe what they need ("Book a Myvi for 3 days from KLIA"), and the agent checks availability, calculates pricing, collects required details, and confirms the booking — all 24/7 with zero admin overhead.

Key Benefits

Fleet & Pickup Network

56 Vehicles Across 5 Tiers

Pickup & Return Locations (Free)

Hotel delivery available as a RM 50 add-on anywhere in Klang Valley.

Pricing System

TierDaily RateWeekly Rate
EconomyRM 120RM 700
CompactRM 160RM 950
SUVRM 250
MPVRM 220
PremiumRM 350

AI Capabilities & Technical Innovation

Agentic AI Workflow

Implements the M5 Agentic Workflow pattern where the LLM generates executable Python code for each booking action — look up vehicles, check date conflicts, compute pricing, insert records.

Natural Language Booking

Customers can book in plain English: "I need an SUV for 4 days from KL Sentral with hotel delivery." The agent parses intent, picks an available vehicle, and confirms.

Fleet Status Tracking

Every vehicle lives in one of four states — available, rented, booked, or maintenance — and the agent never hands out a car that is unavailable for the requested window.

Malaysian Context

All prices in Ringgit, realistic Malaysian plate numbers, driving license capture, and local pickup locations in the Klang Valley.

Technical Architecture

Backend Architecture

Python 3.8+ FastAPI Framework Google Gemini 2.5 Flash TinyDB (JSON Database) Async/Await

AI & Agentic Technologies

M5 Agentic Workflow Code-as-Action Pattern Dynamic Code Generation Natural Language Processing

Frontend Demo

Self-contained HTML/JS Client-side Intent Parsing Optional Gemini API Key Simulation Mode Fallback

Example Natural Language Requests

"Show available cars tomorrow" "Book a Myvi for 3 days from KLIA. Name: Ahmad, Phone: 0123456789, License: D1234567" "What SUVs do you have this week?" "I want a Honda City for 4 days from KL Sentral with hotel delivery" "Cancel booking RNT002" "Show all active bookings" "Check VHC041 status"

Performance Metrics

56
Vehicles Managed
5
Vehicle Tiers
4
Pickup Locations
24/7
Autonomous Operation

Business Value