# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
This site has an agentic ask interface you may use to query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.geolava.com/index.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

---

# Welcome

Welcome to **Geolava**, your **Spatial AI as a Service** platform. Our mission is to **bring powerful spatial intelligence to the physical world**, enabling you to seamlessly analyze and manage real-world assets, starting with properties.

## Key Concepts

#### **Spatial Reasoning & Embedding Model**

Geolava goes beyond just optical imagery. We integrate data from SAR (Synthetic Aperture Radar), LiDAR, Spectral, Thermal, and traditional overhead/street-level sources into a single, unified embedding. This allows us to model the 3D structure of properties, detect hidden features (e.g., moisture behind walls using thermal signatures), and handle complex phenomena like vegetation or rooftop solar arrays via spectral analysis. Our advanced embedding, updated regularly, ensures each property’s location and context is represented in a way that powers sophisticated insights.

{% hint style="info" %}
Want to start using our Spatial Intelligence as a Service? Head to the [API](/api/editor) section!
{% endhint %}

#### **Pre-Trained Agents**

Rather than forcing you to build everything from scratch, Geolava offers a family of pre-trained Agents that tackle common real estate problems:

* **Valuation** – Real-time property price estimates
* **Condition** – Structural and environmental health
* **Compliance** – Permitting and zoning checks
* **Attribute Search** – Custom filtering (e.g., “properties with graffiti”)
* **Monitoring** – Continuous tracking for event-based alerts

These Agents abstract away the complexity of in-person assessment or multiple data ingestions, so you can simply call a specific Agent for immediate, domain-targeted answers.

#### **Build Custom Agents (Coming Soon)**

For specialized needs, you’ll soon be able to create **custom Agents** that integrate your own rules, data sources, or labeling. Whether you’re in insurance, government, or niche enterprise, this feature will allow you to adapt Geolava’s Spatial AI capabilities to your unique processes.

#### **Single Property | Region | Your Own Data**

* You can query **individual addresses or property IDs**.
* You can also specify **broader regions**, such as cities, states, or bounding boxes, and Geolava will process every covered property in that region.
* For enterprise scenarios, **upload your own dataset** (such as a CSV or JSON with hundreds or thousands of properties). Our API endpoints can process these properties in bulk, returning results for each one.

### Jump right in

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/getting-started/publish-your-docs"><strong>Coverage</strong></a></td><td></td><td><a href="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FYVSqzqr2nw3jEeWSt91g%2FCoverage.png?alt=media&amp;token=bbd75e9e-7a53-43e3-969c-f0becaee15f6">Coverage.png</a></td><td></td><td><a href="/getting-started/publish-your-docs">Coverage</a></td></tr><tr><td><a href="/getting-started/quickstart"><strong>Getting Started</strong></a></td><td></td><td><a href="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2F5pAwWqa516D74FEVGnG0%2FGetting%20Started.png?alt=media&amp;token=7c540d0d-e8c8-4ca1-9ca0-5c4ff984ad1a">Getting Started.png</a></td><td></td><td><a href="/getting-started/quickstart">Getting Started</a></td></tr><tr><td><a href="#pre-trained-agents"><strong>Pre-trained Agents</strong></a></td><td></td><td><a href="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FzQHrI58Kwovot3PfacLH%2FPre-Trained%20Agents.png?alt=media&amp;token=5c9f774e-5db9-4d90-bc12-a982fbfa4a9f">Pre-Trained Agents.png</a></td><td></td><td><a href="/api/editor">Pre-Trained Agents</a></td></tr><tr><td><a href="/api/markdown"><strong>Spatial AI (base model)</strong></a></td><td>Coming soon</td><td><a href="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FP6HIT6AdB8g89iWwLI60%2FSpatial%20AI%20(base%20model).png?alt=media&amp;token=20d6f4ab-3774-4a85-9d65-14aa8b4c1388">Spatial AI (base model).png</a></td><td></td><td><a href="/api/markdown">Spatial AI (base model)</a></td></tr><tr><td><a href="/api/images-and-media"><strong>PDF Reporting</strong></a></td><td>Coming soon</td><td><a href="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FfQPF7b19YR8HhmHmDlLf%2FPDF%20Reporting.png?alt=media&amp;token=09d6c3b7-4b61-4347-9d31-373c8b9b3614">PDF Reporting.png</a></td><td></td><td><a href="/api/images-and-media">PDF Reporting</a></td></tr></tbody></table>


# Quickstart

## Authentication

Obtain your API key from the Geolava team. For each request, include:

```
x-api-key: YOUR_API_KEY
```

in the header. Using the wrong key or omitting the header will lead to a 401/403 error.

## Sandbox vs. Production

* **Sandbox**
  * Base URL: `https://sandbox.geolava.com/v1`
  * Ideal for testing lower-volume or experimental integrations
* **Production**
  * Base URL: `https://api.geolava.com/v1`
  * Designed for higher request rates and enterprise SLAs

#### Simple “Hello World” Example

If you already have a property ID or address, you can test the **Condition Agent**:

```bash
curl -X POST "https://api.geolava.com/v1/agent/condition" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "ADDRESS_OF_INTEREST"
  }'
```

The response includes condition attributes (roof integrity, foundation, etc.). This verifies your integration is working.


# Coverage

Geolava currently supports **USA and Canada.** We continuously expand data feeds in these regions to maintain fresh insights. Data refresh schedules (weekly to monthly) vary by location.


# Pre-Trained Agents

Geolava’s **Pre-Trained Agents** are specialized AI modules that leverage our unified Spatial Embedding Model to perform a range of common real estate and property analytics tasks—right out of the box. Rather than building models from scratch, you can simply call one of these Agents to get near-instant insights about a property or region.

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FFJeUEH8WI9AiRxeTCHRW%2FLogo%20Pre-Trained%20Agents.png?alt=media&amp;token=85d8d941-041f-4a79-b51f-4064e08529c7" alt=""><figcaption></figcaption></figure>

### Why Pre-Trained Agents?

* **Immediate Utility**: Each Agent is tuned to handle a specific domain (e.g., valuation, condition, compliance) so you can quickly integrate Geolava’s intelligence with minimal setup.
* **Ongoing Improvements**: Our Spatial Embedding Model ingests fresh data sources (like newly available satellite imagery or updated municipal records) on a rolling basis, so Agents continuously improve over time.
* **Flexible Scope**: These Agents work at any scale—individual addresses, city-level bounding boxes, or even entire portfolios you upload.

### What’s Available?

1. **Valuation Agent**
   * Generates real-time fair-market value estimates.
2. **Condition Agent**
   * Assesses structural and environmental health (e.g., roof wear, flood damage).
3. **Compliance Agent**
   * Flags code violations or unpermitted structures based on municipal data and overhead footprint detection.
4. **Attribute Search Agent**
   * Finds properties matching specific criteria (e.g., “graffiti,” “boarded doors,” “solar panels”).
5. **Monitoring Agent**
   * Subscribes to changes or events (valuation shifts, new compliance flags, etc.), sending you alerts as soon as they occur.


# Valuation Agent

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FWwjw0ETAkGAYEFVjWSKR%2FValuation%20Agent.png?alt=media&amp;token=f74a3ced-1a15-4c04-9bfe-5149c8900cd9" alt=""><figcaption></figcaption></figure>

**Purpose & Use Cases**\
Provides near-real-time estimates of a property’s fair market value. Works with single properties or larger sets (cities, user portfolios, etc.).

**Sample Request**

```bash
POST /v1/agent/valuation
{
  "address": "415 Mission Street, San Franscisco, CA, US"
}
```

Or to query a region:

```bash
POST /v1/agent/valuation
{
  "region": {
    "city": "Seattle",
    "state": "WA"
  }
}
```

**Sample Response**

```json
{
  "property": {
    "address": "415 Mission Street, San Francisco, CA, US",
    "propertyType": "residential",
    "squareFeet": 1850,
    "yearBuilt": 1995
  },
  "valuation": {
    "timestamp": "2025-02-25T16:30:22Z",
    "homeValue": 1835000,
    "rentalValue": 6500,
    "confidenceScore": 87
  },
  "investment": {
    "maintenanceCost": "Medium",
    "investmentRating": "B",
    "capRate": 3.5,
    "pricePerSqFt": 973
  },
  "range": {
    "minHomeValue": 1599000,
    "maxHomeValue": 1999000,
    "minRentalValue": 5500,
    "maxRentalValue": 7500
  },
  "marketTrends": {
    "yearOverYearChange": 3.5,
    "forecastedAnnualGrowth": 2.9,
  }
}

```

(For regional queries or file uploads, you’d receive a set of results or a job ID to retrieve them asynchronously.)


# Condition Agent

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FU9IlfbN84AeUpCNpzkeU%2FCondition%20Agent.png?alt=media&amp;token=25da58ef-544a-413a-9a10-1b21fbc0476a" alt=""><figcaption></figcaption></figure>

Analyzes overhead imagery (including thermal, SAR) and known property data to detect roof damage, foundation issues, environmental wear, etc.

**Sample Request** (single property):

```bash
POST /v1/agent/condition
{
  "address": "415 Mission Street, San Franscisco, CA, US"
}
```

**Region-based** example:

```bash
POST /v1/agent/condition
{
  "region": {
    "city": "Boston",
    "state": "MA"
  }
}
```

**Sample Response**

```json
{
  "propertyId": "67a771e11bcf52fcce866d6a",
  "address": "415 Mission Street, San Francisco, CA, US",
  "condition_assessment": {
    "timestamp": "2025-02-11T10:20:00Z",
    "overall_score": 7.2,
    "components": {
      "roof": {
        "status": "fair",
        "score": 6.5,
        "details": "Shingle damage detected on southeast corner",
      },
      "foundation": {
        "status": "good",
        "score": 8.3,
        "details": "No significant issues detected"
      },
      "exterior_walls": {
        "status": "moderate_damage",
        "score": 5.8,
        "details": "Weather damage visible on western exposure",
        "recommended_action": "Repair siding and repaint"
      },
      "drainage": {
        "status": "good",
        "score": 8.0,
        "details": "Proper drainage patterns observed"
      }
    },
    "risk_factors": [
      {
        "type": "weather_exposure",
        "severity": "medium",
        "details": "Property has moderate exposure to prevailing winds"
      }
    ],
    "data_sources": ["satellite_imagery_OPTICAL","satellite_imagery_SAR", "satellite_imagery_LiDAR", "street_view_LiDAR", "street_view_OPTICAL", "property_records"],
    "confidence_level": "high"
  }
}
```

If you query multiple properties, you’ll get results in bulk (one entry per property ID).


# Compliance Agent

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FA5Z1SPaCMqxDfd3pNeQD%2FCompliance%20Agent.png?alt=media&amp;token=09cd8db9-261e-40e9-aa39-6efc10b06768" alt=""><figcaption></figcaption></figure>

Checks local codes, building footprints, zoning data, and other metadata to see if the property might have unpermitted structures or code violations.

**Sample Request**

```bash
POST /v1/agent/compliance
{
  "address": "5000 Grand Ave, Seattle, WA"
}
```

or:

```bash
POST /v1/agent/compliance
{
  "region": {
    "city": "Seattle",
    "state": "WA"
  }
}
```

**Sample Response**

```json
{
  "address": "5000 Grand Ave, Seattle, WA",
  "compliance_status": {
    "unpermitted_structures": [
      {
        "structure_type": "ADU",
        "details": "No permit found"
      }
    ],
    "zoning_issues": [
      {
        "issue_type": "setback_violation",
        "details": "Structure is 5ft from property line, minimum required is 10ft in R-1 zone"
      },
      {
        "issue_type": "height_restriction",
        "details": "Fence exceeds 6ft maximum height allowed in residential front yard"
      }
    ],
    "code_violations": [
      {
        "violation_code": "SMC 22.206.140",
        "severity": "moderate",
        "details": "Inadequate drainage causing water accumulation near foundation"
      },
      {
        "violation_code": "SMC 22.206.080",
        "severity": "minor",
        "details": "Missing handrail on exterior stairs with more than three risers"
      },
      {
        "violation_code": "SMC 23.44.041",
        "severity": "major",
        "details": "Illegal conversion of garage to living space without proper permits"
      }
    ]
  },
  "timestamp": "2025-02-15T15:40:00Z"
}
```


# Attribute Search Agent

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FwSetXzZW1N7MoU9oKTg4%2FAttribute%20Search%20Agent.png?alt=media&amp;token=e94c87fc-eabc-43ae-a361-aa0a5a8d3387" alt=""><figcaption></figcaption></figure>

Find properties by custom attributes, e.g., “graffiti,” “fence damage,” or “unpermitted ADU.” Works at individual or multi-property scale.

**Sample Request**

```bash
POST /v1/agent/attribute-search
{
  "query": "graffiti AND fence damage in Los Angeles",
  "limit": 2
}
```

**Sample Response**

```json
{
  "results": [
    {
      "propertyId": "67a771e11bcf52fcce866d6a",
      "address": "415 Mission Street, San Franscisco, CA, US",
      "attributes_detected": ["graffiti", "fence_damage"]
    },
    {
      "propertyId": "67a771e11bcf52fcce866d6b",
      "address": "101 Waller Street, San Franscisco, CA, US",
      "attributes_detected": ["graffiti"]
    }
  ],
  "returned": 2,
  "total_matches": 15
}
```


# Monitoring Agent

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2Faxbgxeg2KSGqaCbhWH2M%2FMonitoring%20Agent.png?alt=media&amp;token=cb7bbbf0-3ab5-44d7-a8c3-44ab3c8a8780" alt=""><figcaption></figcaption></figure>

Subscribe to a property or region and receive push notifications (via webhook) or poll for changes if valuations, conditions, or compliance statuses shift significantly.

**Sample Request**

```bash
POST /v1/agent/monitoring
{
  "subscribe": true,
  "address": "415 Mission Street, San Francisco, CA, US",
  "callback_url": "https://example.com/webhook",
  "notification_options": {
    "threshold": {
      "valuation_percent_change": 5,
      "condition_score_change": 1.5,
      "compliance_status_change": true
    },
    "frequency": "immediate"
  }
}
```

**Sample Webhook Notification**

```
{
  "subscription_id": "mon_8437f92ac1e54b9d",
  "event_type": "property_change_detected",
  "timestamp": "2025-03-02T14:22:10Z",
  "property": {
    "propertyId": "67a771e11bcf52fcce866d6a",
    "address": "415 Mission Street, San Francisco, CA, US"
  },
  "changes": [
    {
      "type": "valuation",
      "previous_value": 4250000,
      "current_value": 4520000,
      "percent_change": 6.35,
      "detected_date": "2025-03-01T22:15:43Z"
    },
    {
      "type": "condition",
      "category": "roof",
      "previous_score": 8.2,
      "current_score": 6.5,
      "detected_date": "2025-03-02T10:45:12Z",
      "notes": "Recent satellite imagery shows potential damage from storm event"
    }
  ],
  "next_assessment_date": "2025-03-09T00:00:00Z"
}
```

*(If you specify a region or an uploaded file, you’ll get updates whenever relevant changes are detected for any property in that set.)*


# Spatial AI (base model)

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FrfgtMWQpLa6Q2TN0FPtI%2FLogo%20Spatial%20AI%20(base%20model).png?alt=media&amp;token=566ae4b2-3b08-4bd6-a09c-d8aad285543e" alt=""><figcaption></figcaption></figure>

While pre-trained agents provide quick answers to common tasks, Geolava also supports a flexible inference endpoint, allowing you to make unstructured or more advanced spatial queries. Instead of naming a specific pre-trained Agent (e.g., “valuation”), you can ask the system for certain insights or let it reason about combined data in near-real time.

### Overview

* **Prompt-Style Requests**: Submit a freeform query about properties or entire regions.
* **Contextual Awareness**: The system leverages the underlying Spatial Embedding (including multi-sensor imagery, historical data, and location data).
* **Open-Ended Output**: Get a textual or JSON response describing the system’s best inference.

Like with pre-trained Agents, you can:

* **Specify a single property** or
* **Provide city, state, bounding polygon** or
* **Upload your own data** (multiple addresses) and ask a general question covering them all.

### Endpoint

```
POST /v1/spatial-reasoning
```

*(API design still subject to change.)*

#### Example Request

```json
{
  "prompt": "Identify blighted properties in LA with boarded windows or doors but high sales potential"
}
```

#### Example Response

```json
{
  "insight": "Found 12 candidate properties in Los Angeles that match the description. Four are near downtown with boarded windows, yet valuations are trending upward in these neighborhoods.",
  "matched_properties": [
    {
      "propertyId": "67a771e11bcf52fcce866d6a",
      "attributes_detected": ["boarded windows"],
      "estimated_value": 310000,
      "confidence": 0.82
    },
    {
      "propertyId": "67a771e11bcf52fcce866d6b",
      "attributes_detected": ["boarded doors, broken fence"],
      "estimated_value": 425000,
      "confidence": 0.79
    }
  ],
  "total_matched": 12,
  "notes": "Neighborhood uptrend suggests strong resale demand despite disrepair."
}
```

### Use Cases

1. **Multi-factor Queries** – E.g., “List properties with severe roof damage but near new developments.”
2. **Regional Summaries** – Provide bounding boxes or city definitions: “In these 5 ZIP codes, show me flood-prone properties with stable valuations.”
3. **Hypothetical Questions** – “If an ADU is added, how does that affect the valuation or compliance status?”
4. **Portfolio/Custom Data** – Upload your data set of addresses, then ask: “Which properties in my dataset have known code violations and might be undervalued?”

### Limits & Best Practices

* **Clarity**: The more specific your prompt, the more targeted the analysis.
* **Rate Limits**: This flexible endpoint can be heavier in compute usage. For large data sets, consider region or file-upload strategies.
* **Confidence Scores**: Because it processes queries in a more open-ended manner, parse the included `confidence` or `confidence_score` to gauge reliability.


# PDF Reporting

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FduVQJ5X9UsHnEOHzT0W0%2FLogo%20PDF%20Reporting.png?alt=media&amp;token=2af9d8a8-a329-49f7-a510-88bb0a3b44f5" alt=""><figcaption></figcaption></figure>

A convenient endpoint to compile results from multiple Agents into a single branded document.

**Usage Flow**

1. Query any combination of Agents.
2. Call `POST /v1/report/generate` with the property ID(s) or region-based results.
3. Download the resulting PDF from the provided `report_url`.

**Sample Request**

```bash
POST /v1/report/generate
{
  "address": "415 Mission Street, San Franscisco, CA, US",
  "include_agents": ["valuation", "condition", "compliance"],
  "branding": {
    "logo_url": "https://example.com/logo.png",
    "footer_text": "Property Report by MyCompany"
  }
}
```

**Response** includes:

```json
{
  "report_id": "rpt-67a771e11bcf52fcce866d6a",
  "report_url": "https://reports.geolava.com/v1/report/rpt-67a771e11bcf52fcce866d6a.pdf",
  "expires_at": "2025-03-01T00:00:00Z"
}
```

{% hint style="info" %}
You can also add your own data to the PDF documents on top of Geolava's insights
{% endhint %}


# SDK (coming soon)

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2F62wJsThSCjf0PJ4eJSBn%2FSDK.png?alt=media&amp;token=7ee7f015-9731-4fdf-84c5-db40e1f98135" alt=""><figcaption></figcaption></figure>


# Fine-Tuning (Coming Soon)

For more **advanced or specialized** scenarios, Geolava will soon let you **fine-tune** our Spatial Embedding Model using your organization’s proprietary data and rules—effectively creating **Custom Agents** tailored to your needs. This involves:

<figure><img src="https://915036663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvXlc832eiw1OxKuyzy6k%2Fuploads%2FHGFdCx29EcBrfrfN02ua%2FFine%20Tuning.png?alt=media&amp;token=dea6120b-9782-41cf-afb2-014202481fdf" alt=""><figcaption></figcaption></figure>

1. **Data Upload**
   * Provide labeled examples (e.g., historical valuations, domain-specific compliance rules, specialized hazards).
2. **Model Fine-Tuning**
   * Train a customized version of Geolava’s core embedding to capture your domain’s nuances.
3. **Deploy a Custom Agent**
   * Access your specialized model via the same API endpoints you already use (e.g., for Valuation or Condition).
   * Enhanced accuracy and domain-aware insights for your unique portfolio or region.

This approach seamlessly bridges the gap between our **pre-trained Agents** and **fully custom solutions**, ensuring you can adapt Geolava’s Spatial AI to your enterprise’s exact requirements—while still benefiting from our ongoing data ingest and model improvements. Keep an eye on our Changelog for updates on when this capability will go live.


