Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ jobs:
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1

with:
node-version: 20
node-version: 22
registry-url: "https://wombat-dressing-room.appspot.com/"

- name: Run Semantic Release
working-directory: client/web
env:
GITHUB_TOKEN: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_WOMBAT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_WOMBAT_TOKEN }}
run: npm run release
NODE_PATH: ${{ github.workspace }}/client/web/node_modules
run: npx --prefix client/web semantic-release

14 changes: 14 additions & 0 deletions .github/workflows/web-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Web CI

on:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
[![iOS Library](https://img.shields.io/badge/iOS_Library-SwiftUI-007AFF)](https://github.com/googlemaps/a2ui/tree/main/client/ios)

> **Note:** This toolkit is in **Experimental** status.
>
> 🔔 Stay Updated: Click the **Watch** button at the top right of this repository and select Custom → Releases to get notified whenever a new version is published.

This repository contains the A2UI implementation for the Maps Agentic UI Toolkit. It includes components and handlers implementing the Agent-to-User Interface (A2UI) standard, allowing agents to present rich, interactive interfaces across different platforms.

Expand Down
2 changes: 1 addition & 1 deletion agent/python_agent/agent_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class AgentConfig:
generic_model: str = "gemini/gemini-3-flash-preview"
router_thinking_budget: int = 0
extractor_thinking_budget: int = 0
fallback_mode: FallbackMode = FallbackMode.DYNAMIC
fallback_mode: FallbackMode = FallbackMode.TEXT

def __post_init__(self):
if not isinstance(self.fallback_mode, FallbackMode):
Expand Down
40 changes: 32 additions & 8 deletions agent/python_agent/agent_with_grounding.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from a2ui.schema.manager import A2uiSchemaManager

# Import MAUIAgent to inherit from it
from .agent import AGENT_INSTRUCTION, MAUIAgent, MergedCatalogProvider
from agent import AGENT_INSTRUCTION, MAUIAgent, MergedCatalogProvider

logger = logging.getLogger(__name__)

Expand All @@ -52,11 +52,15 @@
logger.warning("Skill file not found at %s", skill_path)


async def query_vertex_map(query: str) -> str:
async def query_vertex_map(
query: str,
model_id: str = "gemini-3-flash-preview",
) -> str:
"""Query Google Maps via Vertex Grounding and return cleaned response.

Args:
query: The location query or question.
model_id: The model ID to use for Vertex Grounding.

Returns:
The grounded and cleaned A2UI response string.
Expand All @@ -74,8 +78,6 @@ async def query_vertex_map(query: str) -> str:
location = "global"
logger.warning("GOOGLE_CLOUD_LOCATION is not set, defaulting to 'global'.")

model_id = "gemini-3-flash-preview"

client = genai.Client(vertexai=True, project=project_id, location=location)

# Construct instruction
Expand Down Expand Up @@ -203,8 +205,30 @@ async def query_vertex_map(query: str) -> str:
class MAUIAgentWithGrounding(MAUIAgent):
"""An agent that finds restaurants based on user criteria, using Vertex Grounding."""

def __init__(self, base_url: str):
super().__init__(base_url, agent_name="MAUI Agent with Grounding")
def __init__(
self,
base_url: str,
model_name: str = "gemini/gemini-3-flash-preview",
):
super().__init__(
base_url,
agent_name="MAUI Agent with Grounding",
model_name=model_name,
)

async def query_vertex_map(self, query: str) -> str:
"""Query Google Maps via Vertex Grounding and return cleaned response.

Args:
query: The location query or question.

Returns:
The grounded and cleaned A2UI response string.
"""
model_id = (
self._model_name.removeprefix("gemini/").removeprefix("models/")
)
return await query_vertex_map(query, model_id=model_id)

def _build_llm_agent(
self, schema_manager: A2uiSchemaManager | None = None
Expand All @@ -223,7 +247,7 @@ def _build_llm_agent(
skill_manager_tool = skill_toolset.SkillToolset(skills=skills)

# Use FunctionTool for Vertex grounding
grounding_tool = FunctionTool(func=query_vertex_map)
grounding_tool = FunctionTool(func=self.query_vertex_map)

agent_instruction = """You are a location routing agent.
Whenever the user asks a question about a location, directions, places, or maps,
Expand All @@ -245,7 +269,7 @@ def _build_llm_agent(
instruction = agent_instruction

return LlmAgent(
model=LiteLlm(model="gemini/gemini-3-flash-preview"),
model=LiteLlm(model=self._model_name),
name="maui_agent_grounding",
description=(
"An agent that can provide Google Maps UI-enriched responses using"
Expand Down
Loading
Loading