# Google Maps

The Google Maps tool gives AI agents spatial awareness, enabling them to resolve human-readable addresses into precise geographic coordinates (latitude and longitude), locate venues (geolocation), and plan routes (routing).

Tool Identifier: `geo-google-maps`

## Capabilities

- **Address Geocoding**: Convert place names and street addresses (e.g. _"Piazza San Marco, Venice"_) into exact GPS latitude and longitude coordinates.
- **Venue & POI Lookup**: Find business locations, points of interest, restaurants, and transit hubs.
- **Route & Distance Estimation**: Determine geographical distances and transit paths between multiple destinations.

## Integration with Conversational Forms

One of the most powerful use cases for the Google Maps tool is in **[Conversational Forms](../form.md)**.

For example, in the [Transport Planner Agent](/agents/demo/transport#code), the form schema requires `origin_latitude`, `origin_longitude`, `destination_latitude`, and `destination_longitude`. Instead of asking users for numeric GPS coordinates, the user simply states their departure and arrival cities:

```mermaid
sequenceDiagram
    autonumber
    actor User
    participant Agent
    participant Maps as Google Maps Tool
    participant Form as Transport Schema

    User->>Agent: "I need to travel from Novello to Barolo"
    Agent->>Maps: Geocode "Novello" & "Barolo"
    Maps-->>Agent: Coordinates (Novello: 44.5894°N, 7.9258°E | Barolo: 44.6104°N, 7.9414°E)
    Agent->>Form: Populate origin & destination lat/lng
    Form-->>User: Form populated & ready for confirmation
```

## How to Enable

### In the UI

When configuring an agent in the [Agent Builder](/agents/new) or editing an existing agent, check the box for:
☑️ **Google Maps 🗺️**

### In Agent YAML

Add `geo-google-maps` to the `tools` array:

```yaml
tools:
  - geo-google-maps
```

## Try It in Practice

- Test geographic form resolution live with the [Transport Planner in Chat](/chat/agent/demo/transport).
- Inspect how the agent is configured in the [Transport Agent Code Tab](/agents/demo/transport#code).

## Related Tools

- 📝 **[Conversational Forms](../form.md)**: Capture structured travel and reservation details.
- 🔎 **[Google Search Grounding](search.md)**: Find opening hours, contact info, and reviews for venues.
- 📖 **[Connected Tools Overview](index.md)**
