Real Estate

Tenant Maintenance Requests

Handle inbound maintenance calls from tenants, capture all required details, triage urgency, and dispatch to the right vendor automatically.

Why this matters

Qualify leads, schedule showings, handle tenant requests, and manage the full lifecycle of residential and commercial real estate transactions. This example shows you how to automate tenant maintenance requests calls end-to-end with Guava's SDK — no telephony plumbing, no prompt engineering, just Python.

How to set persona & task
Working with Fields and Say items
Handling callbacks
Running the agent
Step 01

Installation

Install from Guava's private PyPI index. A public package is coming soon — the install command will simplify to pip install guava.

terminal
# Step 1: Install Guava
pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com

# Public PyPI package coming soon — the install command will simplify to:
# pip install guava

# Step 2: Set your credentials
export GUAVA_API_KEY="..."
export GUAVA_AGENT_NUMBER="..."
Step 02

How it's built

Every Guava agent is a Python class. Walk through the key sections below, then grab the complete file at the end.

01

Imports

Import the Guava SDK and any helpers you need. guava.CallController is the base class for every voice agent.

example.py
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os

URGENT_KEYWORDS = ["flood", "gas leak", "no heat", "electrical", "fire", "sewage"]
02

Agent setup

set_persona() defines how the agent presents itself. set_task() gives it its mission in plain English. The checklist drives the conversation — Guava works through it top-to-bottom, collecting Field values and speaking Say items as it goes.

example.py
class MaintenanceRequestBot(guava.CallController):
    def __init__(self, property_name: str):
        super().__init__()
        self.set_persona(
            organization_name=f"{property_name} Property Management",
            agent_name="Jordan",
        )
        self.set_task(
            objective="Take a maintenance request from the tenant and assess urgency",
            checklist=[
                "Greet the tenant and confirm their unit number.",
                guava.Field(
                    key="unit_number",
                    field_type="text",
                    description="Tenant's unit number",
                ),
                guava.Field(
                    key="issue_description",
                    field_type="text",
                    description="Description of the maintenance issue",
                ),
                guava.Field(
                    key="issue_category",
                    field_type="choice",
                    description="Category of the issue",
                    choices=["plumbing", "electrical", "HVAC", "appliance", "structural", "pest", "other"],
                ),
                guava.Field(
                    key="urgency",
                    field_type="choice",
                    description="How urgent is the issue?",
                    choices=["emergency — unsafe conditions", "urgent — within 24 hours",
                             "routine — within a week", "low priority"],
                ),
                guava.Field(
                    key="entry_permission",
                    field_type="bool",
                    description="Does the tenant grant permission for entry to make repairs?",
                ),
                guava.Field(
                    key="preferred_window",
                    field_type="text",
                    description="Preferred window for maintenance visit (e.g. mornings, weekends)",
                ),
                "Confirm ticket number and estimated response time.",
            ],
            on_complete=self.dispatch,
        )

    def dispatch(self, fields):
        if fields.get("urgency", "").startswith("emergency"):
            print(f"EMERGENCY dispatch: unit {fields.get('unit_number')}")
        else:
            print(f"Ticket created for unit {fields.get('unit_number')}: {fields.get('issue_category')}")

guava.listen(
    controller=MaintenanceRequestBot,
    controller_args={"property_name": "Riverside Apartments"},
    agent_number=os.environ["GUAVA_AGENT_NUMBER"],
    api_key=os.environ["GUAVA_API_KEY"],
)

Platform performance

<1s

Response time

99.99%

Uptime SLA

13+

Industries served

Step 03

Full example

The complete file — copy it, save it as example.py, and run it.

example.py
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os

URGENT_KEYWORDS = ["flood", "gas leak", "no heat", "electrical", "fire", "sewage"]

class MaintenanceRequestBot(guava.CallController):
    def __init__(self, property_name: str):
        super().__init__()
        self.set_persona(
            organization_name=f"{property_name} Property Management",
            agent_name="Jordan",
        )
        self.set_task(
            objective="Take a maintenance request from the tenant and assess urgency",
            checklist=[
                "Greet the tenant and confirm their unit number.",
                guava.Field(
                    key="unit_number",
                    field_type="text",
                    description="Tenant's unit number",
                ),
                guava.Field(
                    key="issue_description",
                    field_type="text",
                    description="Description of the maintenance issue",
                ),
                guava.Field(
                    key="issue_category",
                    field_type="choice",
                    description="Category of the issue",
                    choices=["plumbing", "electrical", "HVAC", "appliance", "structural", "pest", "other"],
                ),
                guava.Field(
                    key="urgency",
                    field_type="choice",
                    description="How urgent is the issue?",
                    choices=["emergency — unsafe conditions", "urgent — within 24 hours",
                             "routine — within a week", "low priority"],
                ),
                guava.Field(
                    key="entry_permission",
                    field_type="bool",
                    description="Does the tenant grant permission for entry to make repairs?",
                ),
                guava.Field(
                    key="preferred_window",
                    field_type="text",
                    description="Preferred window for maintenance visit (e.g. mornings, weekends)",
                ),
                "Confirm ticket number and estimated response time.",
            ],
            on_complete=self.dispatch,
        )

    def dispatch(self, fields):
        if fields.get("urgency", "").startswith("emergency"):
            print(f"EMERGENCY dispatch: unit {fields.get('unit_number')}")
        else:
            print(f"Ticket created for unit {fields.get('unit_number')}: {fields.get('issue_category')}")

guava.listen(
    controller=MaintenanceRequestBot,
    controller_args={"property_name": "Riverside Apartments"},
    agent_number=os.environ["GUAVA_AGENT_NUMBER"],
    api_key=os.environ["GUAVA_API_KEY"],
)
Step 04

Run it

Start the agent. It will connect to Guava's infrastructure and begin accepting calls on your assigned number.

terminal
python example.py
Get Started