You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instruction="You are a helpful assistant that can provide current weather.",
37
+
tools=[get_weather]
38
+
)
39
+
```
40
+
17
41
## vLLM Example
18
42
19
43
To access Gemma 4 endpoints in these services,
@@ -90,12 +114,13 @@ root_agent = LlmAgent(
90
114
This sample shows how to build a personalized food tour agent using Gemma 4, ADK, and the Google Maps MCP server. The agent takes a user’s dish photo or text description, a location, and an optional budget, then recommends places to eat and organizes them into a walking route.
91
115
92
116
### Prerequisites
93
-
- Deploy Gemma 4 using one of the options listed in the [vLLM Example](#vllm-example) section.
94
-
Set `VLLM_API_BASE_URL` environment variable to the base URL of your deployed model (must end with `/v1`).
117
+
118
+
- Get an API key in [Google AI Studio](https://aistudio.google.com/app/apikey).
119
+
Set `GEMINI_API_KEY` environment variable to your Gemini API key.
95
120
- Enable [Google Maps API](https://console.cloud.google.com/maps-api/) on Google Cloud Console.
96
121
- Create a [Google Maps Platform API key](https://console.cloud.google.com/maps-api/credentials).
97
122
Set `MAPS_API_KEY` environment variable to your API key.
98
-
- ADK installed and configured in your Python environment
123
+
-Install ADK and configure it in your Python environment.
99
124
100
125
### Project structure
101
126
```bash
@@ -108,10 +133,9 @@ food_tour_app/
108
133
`agent.py`
109
134
```python
110
135
import os
111
-
import subprocess
112
136
import dotenv
113
137
from google.adk.agents import LlmAgent
114
-
from google.adk.models.lite_llmimportLiteLlm
138
+
from google.adk.models importGemini
115
139
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
116
140
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams
117
141
@@ -154,32 +178,8 @@ def get_maps_mcp_toolset():
154
178
155
179
maps_toolset = get_maps_mcp_toolset()
156
180
157
-
# Authentication (Example: using gcloud identity token for a Cloud Run deployment)
0 commit comments