Skip to content
All stories

Khidmat AI · hackathon build

Booking a home-service pro from one sentence

Finding an AC technician or a plumber in Pakistan still means phone calls and guesswork. When someone cancels, you start all over again.

Context

Built in about four days by a team of two for the “AI Service Orchestrator for the Informal Economy” challenge. A customer writes or speaks a request in Urdu, Roman Urdu or English. Seven AI agents work out the job, find and rank nearby pros, book one, and re-book automatically if that pro declines.

How it works, step by step

  1. Step 1 of 8

    Built

    Understand the request

    “AC kharab hai, urgent technician chahiye” becomes a clear job: AC repair, urgent, this area. If it's unclear, it asks one question back.

    At this step

    AC kharab hai, urgent technician chahiye

    An intent agent (LangGraph) maps the request to one of 13 service categories. Below 0.7 confidence it asks a clarifying question instead of guessing.
  2. Step 3 of 8

    Built

    Rank them fairly

    Pros are ranked on distance, rating, punctuality, cancellations, skill and recent work, and each pick comes with a one-line reason in your language.

    A 6-factor weighted score: distance 25%, rating 20%, on-time 15%, cancellations 15%, skill tier 15%, recency 10%. A rationale is generated per pick.
  3. Step 4 of 8

    Built

    Book with a clear price

    You pick a pro and get a booking number and a price that reflects how complex and how urgent the job is.

    Booking ids are atomic (counter upsert). Price = base × complexity (1.0 / 1.3 / 1.6) × urgency, minus any loyalty discount.
  4. Step 5 of 8

    Built

    The pro decides

    The pro's own agent checks their calendar and workload, then accepts, declines or offers another time. The pro always has the final say.

    A provider agent checks calendar, capacity and skill and proposes accept, reject or another slot. The human decision comes in through a decision endpoint.
  5. Step 6 of 8

    Built

    If they decline, re-book automatically

    If a pro says no or cancels, the system drops them, re-ranks, and offers the next best, up to five times.

    A recovery agent excludes the rejected provider, applies a loyalty discount and re-runs ranking. It stops after 5 replans or when candidates run out.
  6. Step 7 of 8

    Built

    Track the job

    Chat with the pro and follow the job from “arrived” to “done”. Steps can't be skipped.

    A guarded state machine over 15 booking statuses (invalid moves return 422). Chat is polled every 5 seconds.
  7. Step 8 of 8

    Built

    Finish and rate

    When you approve the work you rate the pro, and their trust score updates for the next customer.

    Completion updates trust as a moving average (0.8 × old + 0.2 × outcome), and customers leave a 1–5 star rating.

Decisions & tradeoffs

Chose
a graph of small agents with a re-plan loop
over
one big prompt
because
each step can be tested on its own, and a declined booking simply loops back to ranking.
Chose
giving the pro the final say
over
auto-accepting on their behalf
because
informal workers juggle their own schedules. A booking they never agreed to becomes a no-show.

What's real today

A 4-day hackathon prototype, not a live service. Payment is cash only, login uses a demo code, and push notifications and complaints aren't built.

What it achieved

AI agents working in sequence
7
home-service categories
13
languages: Urdu, Roman Urdu, English
3
from idea to working prototype, team of two
4 days

Stack & role