Skip to content

Commit b84feeb

Browse files
authored
Merge pull request #6 from googlemaps-samples/docs
Updating docs
2 parents 2fd19ae + a427ac8 commit b84feeb

2 files changed

Lines changed: 159 additions & 1 deletion

File tree

README.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
Welcome to the **Google Maps Agentic UI Toolkit Samples**! 🎉
1111

12-
This repository (`a2ui-samples`) contains the reference demonstration for the Google Maps Agentic UI Toolkit. It provides a fully working, interactive sample application implementing the Agent-to-User Interface (A2UI) standard, allowing AI agents to present rich, dynamic map interfaces directly in your web browser.
12+
This repository (`a2ui-samples`) contains reference samples for the Google Maps Agentic UI Toolkit. It provides a fully working, interactive sample application implementing the Agent-to-User Interface (A2UI) standard, allowing AI agents to present rich, dynamic map interfaces directly in your web browser.
1313

1414
This project is intended for demonstration purposes to help you get up and running quickly!
1515

@@ -174,6 +174,85 @@ To create a new Google Cloud API Key, follow the instructions here in the [Googl
174174

175175
This key must be exported or contained within a `.env` file as `GEMINI_API_KEY`
176176

177+
## Google API Keys
178+
179+
### Google Maps API Key
180+
181+
Agentic UI Toolkit requires an API Key to use Google Maps Platform products. To create a Google Maps API Key, follow the instructions in the [Google Maps Platform documentation](https://developers.google.com/maps/documentation/javascript/get-api-key).
182+
183+
Your API Key must have the following APIs enabled in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials):
184+
185+
* Geocoding API
186+
* Maps JavaScript API
187+
* Places UI Kit
188+
* Routes API
189+
190+
To use Grounding Lite MCP, you must also enable:
191+
192+
* Maps Grounding Lite API
193+
194+
To support the use of Grounding Lite within the Python ADK backend, this API Key must be exported or contained within a `.env` file as `GOOGLE_MAPS_API_KEY`.
195+
196+
**Loading the Google Maps JavaScript API**
197+
198+
Your API Key must also be included when loading the Google Maps JavaScript API code. See the [Google Maps Platform Documentation](https://developers.google.com/maps/documentation/javascript/load-maps-js-api) for instructions on how to load the API, including configuring the API Key.
199+
200+
Agentic UI Toolkit requires features available in the Alpha channel. You must use `v=alpha` when loading the Maps JavaScript API. Learn more about versions in the [Google Maps Platform Documentation](https://developers.google.com/maps/documentation/javascript/versions).
201+
202+
Use of Agentic UI Toolkit requires several [Maps JavaScript API libraries](https://developers.google.com/maps/documentation/javascript/libraries). When loading the Google Maps JavaScript API, you must include the following libraries:
203+
204+
* maps
205+
* maps3d
206+
* marker
207+
* places
208+
* routes
209+
210+
### Gemini API Key
211+
212+
*Note: This API is variously referred to in Google Cloud as the* Gemini API *and the* Generative Language API.
213+
214+
If you are using Gemini as your LLM, you will also need a Google Cloud API Key with the *Generative Language API* enabled. In order to enable this API for your API Key, the *Gemini API* must be enabled for your Google Cloud project. You can enable this API in the [API Library](https://console.cloud.google.com/apis/library/generativelanguage.googleapis.com).
215+
216+
To create a new Google Cloud API Key, follow the instructions here in the [Google Cloud docs](https://docs.cloud.google.com/docs/authentication/api-keys#create).
217+
218+
This key must be exported or contained within a `.env` file as `GEMINI_API_KEY`
219+
220+
## Accessing Google Maps grounding data
221+
222+
Your agent can access Google Maps grounding data in two ways, depending on your project setup and needs:
223+
224+
1. [Grounding Lite MCP](https://developers.google.com/maps/ai/grounding-lite)
225+
2. [Grounding with Google Maps](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-maps)
226+
227+
### Grounding Lite MCP
228+
229+
To use Grounding Lite MCP, you must first enable the Maps Grounding Lite API and create or update an API Key to support the required APIs following the [documentation](https://developers.google.com/maps/ai/grounding-lite#configure_llms_to_use_the_mcp_server).
230+
231+
### Grounding with Google Maps
232+
233+
To use Grounding with Google Maps, there are additional steps you must take to configure your environment:
234+
235+
1. Ensure you have the latest version of the genai python package.
236+
```bash
237+
pip install --upgrade google-genai
238+
```
239+
240+
2. Configure additional environment variables to connect to your project.
241+
```bash
242+
## Replace the `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION` values
243+
## with appropriate values for your project.
244+
export GOOGLE_CLOUD_PROJECT=GOOGLE_CLOUD_PROJECT
245+
export GOOGLE_CLOUD_LOCATION=global
246+
export GOOGLE_GENAI_USE_VERTEXAI=True
247+
```
248+
249+
3. Ensure you are authenticated to Google Cloud.
250+
```bash
251+
gcloud auth application-default login
252+
```
253+
254+
See the [documentation](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-maps#googlegenaisdk_tools_google_maps_with_txt-python_genai_sdk) for more information.
255+
177256
## Contributing
178257

179258
External contributions are not accepted for this repository. See [contributing guide] for more info.

agent/python/README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,82 @@ This example requires the following environment variables to be set:
3737
This will automatically resolve dependencies, install them in a local virtual environment, and start the A2A server on port 10002.
3838

3939
To run the frontend, follow the instructions in [../../client/web/react/README.md](../../client/web/react/README.md)
40+
41+
## Google API Keys
42+
43+
### Google Maps API Key
44+
45+
Agentic UI Toolkit requires an API Key to use Google Maps Platform products. To create a Google Maps API Key, follow the instructions in the [Google Maps Platform documentation](https://developers.google.com/maps/documentation/javascript/get-api-key).
46+
47+
Your API Key must have the following APIs enabled in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials):
48+
49+
* Geocoding API
50+
* Maps JavaScript API
51+
* Places UI Kit
52+
* Routes API
53+
54+
To use Grounding Lite MCP, you must also enable:
55+
56+
* Maps Grounding Lite API
57+
58+
To support the use of Grounding Lite within the Python ADK backend, this API Key must be exported or contained within a `.env` file as `GOOGLE_MAPS_API_KEY`.
59+
60+
**Loading the Google Maps JavaScript API**
61+
62+
Your API Key must also be included when loading the Google Maps JavaScript API code. See the [Google Maps Platform Documentation](https://developers.google.com/maps/documentation/javascript/load-maps-js-api) for instructions on how to load the API, including configuring the API Key.
63+
64+
Agentic UI Toolkit requires features available in the Alpha channel. You must use `v=alpha` when loading the Maps JavaScript API. Learn more about versions in the [Google Maps Platform Documentation](https://developers.google.com/maps/documentation/javascript/versions).
65+
66+
Use of Agentic UI Toolkit requires several [Maps JavaScript API libraries](https://developers.google.com/maps/documentation/javascript/libraries). When loading the Google Maps JavaScript API, you must include the following libraries:
67+
68+
* maps
69+
* maps3d
70+
* marker
71+
* places
72+
* routes
73+
74+
### Gemini API Key
75+
76+
*Note: This API is variously referred to in Google Cloud as the* Gemini API *and the* Generative Language API.
77+
78+
If you are using Gemini as your LLM, you will also need a Google Cloud API Key with the *Generative Language API* enabled. In order to enable this API for your API Key, the *Gemini API* must be enabled for your Google Cloud project. You can enable this API in the [API Library](https://console.cloud.google.com/apis/library/generativelanguage.googleapis.com).
79+
80+
To create a new Google Cloud API Key, follow the instructions here in the [Google Cloud docs](https://docs.cloud.google.com/docs/authentication/api-keys#create).
81+
82+
This key must be exported or contained within a `.env` file as `GEMINI_API_KEY`
83+
84+
## Accessing Google Maps grounding data
85+
86+
Your agent can access Google Maps grounding data in two ways, depending on your project setup and needs:
87+
88+
1. [Grounding Lite MCP](https://developers.google.com/maps/ai/grounding-lite)
89+
2. [Grounding with Google Maps](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-maps)
90+
91+
### Grounding Lite MCP
92+
93+
To use Grounding Lite MCP, you must first enable the Maps Grounding Lite API and create or update an API Key to support the required APIs following the [documentation](https://developers.google.com/maps/ai/grounding-lite#configure_llms_to_use_the_mcp_server).
94+
95+
### Grounding with Google Maps
96+
97+
To use Grounding with Google Maps, there are additional steps you must take to configure your environment:
98+
99+
1. Ensure you have the latest version of the genai python package.
100+
```bash
101+
pip install --upgrade google-genai
102+
```
103+
104+
2. Configure additional environment variables to connect to your project.
105+
```bash
106+
## Replace the `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION` values
107+
## with appropriate values for your project.
108+
export GOOGLE_CLOUD_PROJECT=GOOGLE_CLOUD_PROJECT
109+
export GOOGLE_CLOUD_LOCATION=global
110+
export GOOGLE_GENAI_USE_VERTEXAI=True
111+
```
112+
113+
3. Ensure you are authenticated to Google Cloud.
114+
```bash
115+
gcloud auth application-default login
116+
```
117+
118+
See the [documentation](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-maps#googlegenaisdk_tools_google_maps_with_txt-python_genai_sdk) for more information.

0 commit comments

Comments
 (0)