DEV Community

brian ambeyi
brian ambeyi

Posted on

How We Built AI-Powered Property Queries for East African Landlords

Most property management platforms give you dashboards. Filters. Reports you need to export. But when a landlord with 50 units asks "who hasn't paid this month?" — they don't want to click through 3 screens. They want to type the question and get the answer.

That's what we built into HomeManager, our property management platform for the East African market.

The Problem

Kenyan landlords managing 20-500 units face a data access problem:

  • Payment data lives in M-Pesa transaction records
  • Tenant info lives in the tenant database
  • Arrears are calculated from invoice vs payment records
  • Occupancy is derived from unit status

Getting a simple answer like "what's my collection rate this month?" requires joining multiple data sources. Most landlords just... don't. They open the dashboard, glance at a number, and move on without deeper insight.

What We Built

An AI assistant that sits on top of the property management database. Landlords type questions in plain English and get answers from their actual data.

Real examples:

User: "Who hasn't paid rent this month?"
AI: "7 tenants have outstanding balances for July 2026:
- Unit A3: John Mwangi - KES 25,000 (14 days overdue)  
- Unit B7: Mary Ochieng - KES 18,000 (7 days overdue)
..."
Enter fullscreen mode Exit fullscreen mode
User: "What's my occupancy rate at Sunset Apartments?"
AI: "Sunset Apartments: 18/20 units occupied (90%). 
Vacant: Unit A4 (vacant since March), Unit B7 (vacant since June)."
Enter fullscreen mode Exit fullscreen mode
User: "Show me tenants whose lease expires in the next 30 days"
AI: "3 leases expiring before August 8:
- Unit C2: James Kariuki (expires July 15)
- Unit D1: Agnes Wanjiru (expires July 28)
- Unit A8: Peter Odhiambo (expires August 5)"
Enter fullscreen mode Exit fullscreen mode

Technical Approach

We use Claude (AWS Bedrock) as the LLM, with a structured approach:

  1. Intent classification — determine what data the user is asking about (payments, tenants, properties, maintenance)
  2. Query construction — translate natural language into Django ORM queries against the property database
  3. Response formatting — present results in a readable format with relevant context

The key insight: we don't send raw database content to the LLM. We send the schema and let it construct queries, then execute those queries server-side and format the results. This keeps data private and responses accurate.

# Simplified flow
def handle_query(user_message, organization):
    # 1. Classify intent
    intent = classify_intent(user_message)

    # 2. Build query based on intent
    if intent == "unpaid_tenants":
        data = Invoice.objects.filter(
            organization=organization,
            status="unpaid",
            due_date__month=current_month
        ).select_related('tenant', 'unit')

    # 3. Format response
    return format_response(data, user_message)
Enter fullscreen mode Exit fullscreen mode

Why This Matters for East Africa

In Kenya, most landlords are not tech-savvy. They're business people who own buildings. They don't want to learn a dashboard — they want to ask a question and get an answer. The AI assistant makes the platform accessible to landlords who would otherwise stick with Excel because "software is complicated."

It also works across time zones. A diaspora landlord in London can ask "did my tenants pay this month?" at 11pm UK time and get an instant answer without calling their caretaker in Nairobi.

Results

Since launching the AI assistant:

  • Average session time increased (people explore their data more)
  • Support queries decreased (landlords answer their own questions)
  • Feature becomes a differentiator vs competitors who only offer dashboards

Try It

The platform is live at homemanager.buniva.co.ke. Free for up to 20 units.

Full blog post with more examples: What Can an AI Property Assistant Actually Do?


Building in the proptech space in Africa? I'd love to connect. What unique challenges have you faced with localization?

Top comments (0)