|
28 | 28 | from google.adk.sessions import InMemorySessionService |
29 | 29 | from google.genai import types |
30 | 30 | from pydantic import PrivateAttr |
31 | | -from tools import get_calculator_app, calculate_via_mcp, get_pong_app |
| 31 | +from tools import get_calculator_app, calculate_via_mcp, get_pong_app_a2ui_json |
32 | 32 | from agent_executor import get_a2ui_enabled, get_a2ui_catalog, get_a2ui_examples |
33 | 33 |
|
34 | 34 | logger = logging.getLogger(__name__) |
35 | 35 |
|
36 | 36 | ROLE_DESCRIPTION = """ |
37 | 37 | You are an expert A2UI Proxy Agent. Your primary functions are to fetch the Calculator App or the Pong App and display it to the user. |
38 | 38 | When the user asks for the calculator, you MUST call the `get_calculator_app` tool. |
39 | | -When the user asks for Pong, you MUST call the `get_pong_app` tool. |
| 39 | +When the user asks for Pong, you MUST call the `get_pong_app_a2ui_json` tool. |
40 | 40 |
|
41 | 41 | IMPORTANT: Do NOT attempt to construct the JSON manually. The tools handle it automatically. |
42 | 42 |
|
|
46 | 46 | WORKFLOW_DESCRIPTION = """ |
47 | 47 | 1. **Analyze Request**: |
48 | 48 | - If User asks for calculator: Call `get_calculator_app`. |
49 | | - - If User asks for Pong: Call `get_pong_app`. |
| 49 | + - If User asks for Pong: Call `get_pong_app_a2ui_json`. |
50 | 50 | - If User interacts with the calculator (ACTION: calculate): Extract 'operation', 'a', and 'b' from the event context and call `calculate_via_mcp`. Return the result to the user. |
51 | 51 | """ |
52 | 52 |
|
@@ -191,7 +191,7 @@ def _build_llm_agent( |
191 | 191 | name=self._agent_name, |
192 | 192 | description="An agent that provides access to MCP Apps.", |
193 | 193 | instruction=instruction, |
194 | | - tools=[get_calculator_app, calculate_via_mcp, get_pong_app], |
| 194 | + tools=[get_calculator_app, calculate_via_mcp, get_pong_app_a2ui_json], |
195 | 195 | planner=BuiltInPlanner( |
196 | 196 | thinking_config=types.ThinkingConfig( |
197 | 197 | include_thoughts=True, |
|
0 commit comments