> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# GoogleMapsSkill

> Get driving/walking/transit directions and search for places using Google Maps APIs.

[add-skill]: /docs/server-sdks/reference/typescript/agents/agent-base/add-skill

Get driving/walking/transit directions, find places, geocode addresses, and
compute routes by coordinates using Google Maps APIs.

**Class:** `GoogleMapsSkill`

**Tools:** `compute_route`, `lookup_address`, `geocode_address`,
`compute_route_by_coords` (each tool name is configurable).

**Env vars:** `GOOGLE_MAPS_API_KEY` (required — the tool handlers read this
directly and do not fall back to an `api_key` config value).

**`api_key`** `string` — required

Schema-level declaration for the Google Maps API key. The tool handlers read
the `GOOGLE_MAPS_API_KEY` environment variable at request time; a config
value is not used as a fallback.

---

**`default_mode`** `string` — default: driving

Default travel mode for `compute_route`: `"driving"`, `"walking"`,
`"bicycling"`, or `"transit"`.

---

**`route_tool_name`** `string` — default: compute\_route

Custom name for the route computation tool.

---

**`lookup_tool_name`** `string` — default: lookup\_address

Custom name for the address / place lookup tool.

---

**`geocode_tool_name`** `string` — default: geocode\_address

Custom name for the address-to-coordinates geocode tool.

---

**`route_by_coords_tool_name`** `string` — default: compute\_route\_by\_coords

Custom name for the coordinate-based route computation tool.

---

```typescript {6-8}
import { AgentBase, GoogleMapsSkill } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.setPromptText('You are a helpful assistant.');

await agent.addSkill(new GoogleMapsSkill({
  default_mode: 'transit',
}));

agent.run();
```