agent-starter-pack 0.13.1__py3-none-any.whl → 0.14.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agent_starter_pack-0.13.1.dist-info → agent_starter_pack-0.14.0.dist-info}/METADATA +11 -3
- {agent_starter_pack-0.13.1.dist-info → agent_starter_pack-0.14.0.dist-info}/RECORD +22 -24
- agents/adk_base/notebooks/evaluating_adk_agent.ipynb +78 -71
- agents/agentic_rag/notebooks/evaluating_adk_agent.ipynb +78 -71
- llm.txt +87 -39
- src/base_template/Makefile +16 -1
- src/cli/commands/create.py +27 -5
- src/cli/commands/enhance.py +132 -6
- src/cli/commands/setup_cicd.py +91 -69
- src/cli/utils/cicd.py +105 -0
- src/cli/utils/gcp.py +19 -13
- src/cli/utils/logging.py +13 -1
- src/cli/utils/template.py +3 -0
- src/frontends/live_api_react/frontend/package-lock.json +9 -9
- src/frontends/live_api_react/frontend/src/App.tsx +12 -153
- src/frontends/live_api_react/frontend/src/components/side-panel/SidePanel.tsx +352 -3
- src/frontends/live_api_react/frontend/src/components/side-panel/side-panel.scss +249 -2
- src/frontends/live_api_react/frontend/src/utils/multimodal-live-client.ts +4 -1
- src/resources/docs/adk-cheatsheet.md +285 -38
- src/frontends/live_api_react/frontend/src/components/control-tray/ControlTray.tsx +0 -217
- src/frontends/live_api_react/frontend/src/components/control-tray/control-tray.scss +0 -201
- {agent_starter_pack-0.13.1.dist-info → agent_starter_pack-0.14.0.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.13.1.dist-info → agent_starter_pack-0.14.0.dist-info}/entry_points.txt +0 -0
- {agent_starter_pack-0.13.1.dist-info → agent_starter_pack-0.14.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: agent-starter-pack
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.14.0
|
4
4
|
Summary: CLI to bootstrap production-ready Google Cloud GenAI agent projects from templates.
|
5
5
|
Author-email: Google LLC <agent-starter-pack@google.com>
|
6
6
|
License: Apache-2.0
|
@@ -78,10 +78,10 @@ This command handles creating the project without needing to pre-install the pac
|
|
78
78
|
|
79
79
|
### 🔧 Enhance Existing Agents
|
80
80
|
|
81
|
-
Already have an agent? Add production-ready deployment and infrastructure:
|
81
|
+
Already have an agent? Add production-ready deployment and infrastructure by running this command in your project's root folder:
|
82
82
|
|
83
83
|
```bash
|
84
|
-
agent-starter-pack enhance
|
84
|
+
uvx agent-starter-pack enhance
|
85
85
|
```
|
86
86
|
|
87
87
|
See [Installation Guide](https://googlecloudplatform.github.io/agent-starter-pack/guide/installation) for more options, or try with zero setup in [Firebase Studio](https://studio.firebase.google.com/new?template=https%3A%2F%2Fgithub.com%2FGoogleCloudPlatform%2Fagent-starter-pack%2Ftree%2Fmain%2Fsrc%2Fresources%2Fidx) or [Cloud Shell](https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Feliasecchig%2Fasp-open-in-cloud-shell&cloudshell_print=open-in-cs).
|
@@ -104,6 +104,14 @@ See [Installation Guide](https://googlecloudplatform.github.io/agent-starter-pac
|
|
104
104
|
|
105
105
|
Looking to explore more ADK examples? Check out the [ADK Samples Repository](https://github.com/google/adk-samples) for additional examples and use cases demonstrating ADK's capabilities.
|
106
106
|
|
107
|
+
---
|
108
|
+
|
109
|
+
## 🌟 Community Showcase
|
110
|
+
|
111
|
+
Explore amazing projects built with the Agent Starter Pack!
|
112
|
+
|
113
|
+
**[View Community Showcase →](https://googlecloudplatform.github.io/agent-starter-pack/guide/community-showcase)**
|
114
|
+
|
107
115
|
#### Extra Features
|
108
116
|
|
109
117
|
The `agent-starter-pack` offers two key features to accelerate and simplify the development of your agent:
|
@@ -4,7 +4,7 @@ agents/adk_base/.template/templateconfig.yaml,sha256=8mQ_IIgC0h4eiTUM7FEIPSxwI73
|
|
4
4
|
agents/adk_base/app/__init__.py,sha256=wT1TtenBOdA4LTtf6mQjvAT5aRR1N2PCx_A-MrDLGsg,631
|
5
5
|
agents/adk_base/app/agent.py,sha256=6Q6QegQDxEaAck989DPIb3ArHMZtw_YJBqhHFqg-UjQ,2182
|
6
6
|
agents/adk_base/notebooks/adk_app_testing.ipynb,sha256=WFyizTOhbIgTPgQ115WTQaH9qNkozTESsNmxLYUb3JY,10003
|
7
|
-
agents/adk_base/notebooks/evaluating_adk_agent.ipynb,sha256=
|
7
|
+
agents/adk_base/notebooks/evaluating_adk_agent.ipynb,sha256=SdZC1htgXtXw3oyi8d70dNVpDgUmV9T5hqiwGxM9plk,57034
|
8
8
|
agents/adk_base/tests/integration/test_agent.py,sha256=_zb3GMWMtMRq2rOyYC-uL1eNhpg2XBkm8Noj0O_UOng,1998
|
9
9
|
agents/agentic_rag/README.md,sha256=cPeY_XGt79ava22PIM0x92oi67R-TnlEKBQGpK1MOkA,2262
|
10
10
|
agents/agentic_rag/.template/templateconfig.yaml,sha256=Gfw3FOjj3XNxoXn6WGwC2PG59f4qB3p2cYTQ49ykvJc,1248
|
@@ -13,7 +13,7 @@ agents/agentic_rag/app/agent.py,sha256=joSAfrVcS9eRtOT3MXPSoiwElpwVq-hjpCHkqTj6v
|
|
13
13
|
agents/agentic_rag/app/retrievers.py,sha256=qfxwSEixMddvAu4FvUTZAFh1Gdp3RPY65s0Wp6gEFVk,4561
|
14
14
|
agents/agentic_rag/app/templates.py,sha256=8N_uRchwiN7hlH9Y8rdJ1CAtOhpHUWZkXZZ7IU-YJJk,867
|
15
15
|
agents/agentic_rag/notebooks/adk_app_testing.ipynb,sha256=WFyizTOhbIgTPgQ115WTQaH9qNkozTESsNmxLYUb3JY,10003
|
16
|
-
agents/agentic_rag/notebooks/evaluating_adk_agent.ipynb,sha256=
|
16
|
+
agents/agentic_rag/notebooks/evaluating_adk_agent.ipynb,sha256=SdZC1htgXtXw3oyi8d70dNVpDgUmV9T5hqiwGxM9plk,57034
|
17
17
|
agents/agentic_rag/tests/integration/test_agent.py,sha256=YcwOZXa9uJqcqZN8UPikNm_dlSh9XduEfcuQa0wkby8,2170
|
18
18
|
agents/crewai_coding_crew/README.md,sha256=4No7sfHQVHELARGiT3fWANJzDR0NP48ow4ct3FoPwlA,1672
|
19
19
|
agents/crewai_coding_crew/.template/templateconfig.yaml,sha256=WjsvXcih4zqrhV0pX_3eH7PZIf3H1KHdcUAaD2n5I6U,1051
|
@@ -35,10 +35,10 @@ agents/live_api/app/agent.py,sha256=dYE2qd64OhL-fOgwzrjqN50LYXAgJ1TWbx6ohqtV5Rc,
|
|
35
35
|
agents/live_api/tests/integration/test_server_e2e.py,sha256=SBowHiVj-_Okbk1dqyITFVIG6yvr5BGNrfxHVpO4TFs,8635
|
36
36
|
agents/live_api/tests/load_test/load_test.py,sha256=HHZyfC4gqiQtZVF_CbbxENGgWQccMLpwMv0IdoQ6cbQ,1275
|
37
37
|
agents/live_api/tests/unit/test_server.py,sha256=_tf9nHkb7aOe3lZRlyp7cVklOTOYTuXDTy7Djn_lhik,5003
|
38
|
-
llm.txt,sha256=
|
38
|
+
llm.txt,sha256=3beEnDz6DIQT345TibJCi60Mw8xh2PaY-lFc-EJpR8s,15380
|
39
39
|
src/base_template/.gitignore,sha256=Fq0w34x4sfbwP4RqDqh6hdHNYRUEsFNI-9XONzLWBIs,2580
|
40
40
|
src/base_template/GEMINI.md,sha256=WzscHWlQeYkKORZ-453P8KM9IHuj1kAxW-69c7Ytuwk,133
|
41
|
-
src/base_template/Makefile,sha256=
|
41
|
+
src/base_template/Makefile,sha256=DyOZKzcP4i6oBHx_snqlsOK99JuKWjlPVAy9Tgfc_wg,7824
|
42
42
|
src/base_template/README.md,sha256=ywTmrlWmivgHAtzXQCZqNu_Hfxp51QTnX4USNgGk6kU,10040
|
43
43
|
src/base_template/pyproject.toml,sha256=dTyxaWetB-XCKQEDV3lXxAUxtBEpustNdlAEcT8ZZpo,2932
|
44
44
|
src/base_template/deployment/README.md,sha256=gZJvSWdQh_Mi-bZ3dmuPv7fMezIw04fgN5tq7KgglPw,692
|
@@ -72,17 +72,17 @@ src/base_template/{{cookiecutter.agent_directory}}/utils/gcs.py,sha256=jKblaWOGQ
|
|
72
72
|
src/base_template/{{cookiecutter.agent_directory}}/utils/tracing.py,sha256=2rv1Ukh2jTBENDwoghCItJ28l-Sjz9gMlzdojlVgJa4,6052
|
73
73
|
src/base_template/{{cookiecutter.agent_directory}}/utils/typing.py,sha256=DP5OZC3IGvqA1XbvWt8kI3gyAK3ZjzUSL5Ca17wNeLI,4249
|
74
74
|
src/cli/main.py,sha256=Dya7Sw3ozMTaGDcwMh_-W7udkGZHGzgAj8aBdSZaZxI,1832
|
75
|
-
src/cli/commands/create.py,sha256=
|
76
|
-
src/cli/commands/enhance.py,sha256=
|
75
|
+
src/cli/commands/create.py,sha256=tkHpnVrhy2ApJCwL4bg2uYgfSwciPQvdurTwSANLSsE,46071
|
76
|
+
src/cli/commands/enhance.py,sha256=6_daqd0te1vj0eMrsyQwr9psr0d1PKU1UEVya8KOcy8,19472
|
77
77
|
src/cli/commands/list.py,sha256=ZGol9eYB9Yon7JysMUCtpEOwdXzrApdTHzErx6KvT04,6856
|
78
|
-
src/cli/commands/setup_cicd.py,sha256=
|
78
|
+
src/cli/commands/setup_cicd.py,sha256=3BtHChOPvp0I-4tlPqwz5hZFm13gtw9gvlWQwF-F7oE,32492
|
79
79
|
src/cli/utils/__init__.py,sha256=_cTmsXGPqOtK0q8UW5164QTltbJRJFR_Efxq_BRL1-o,1311
|
80
|
-
src/cli/utils/cicd.py,sha256=
|
80
|
+
src/cli/utils/cicd.py,sha256=l9hPdqFXo5SxdtOG1yEoQdmRff5vNcqf0sqxBTtPQig,30704
|
81
81
|
src/cli/utils/datastores.py,sha256=gv1V6eDcOEKx4MRNG5C3Y-VfixYq1AzQuaYMLp8QRNo,1058
|
82
|
-
src/cli/utils/gcp.py,sha256=
|
83
|
-
src/cli/utils/logging.py,sha256=
|
82
|
+
src/cli/utils/gcp.py,sha256=umhHu4P4oIDpK0Hsg8IATji9SpONlBA9bBbhrjzQYyc,8513
|
83
|
+
src/cli/utils/logging.py,sha256=61ulUY1hUrpxHDFi0szqsjPlrpxdBvwzfYEEV0o97GA,3530
|
84
84
|
src/cli/utils/remote_template.py,sha256=BYdV9Bgj54UUgOTnxlkOr8xA9ZgqKSEE-lWnmpJ05UY,18529
|
85
|
-
src/cli/utils/template.py,sha256=
|
85
|
+
src/cli/utils/template.py,sha256=bS6qS2O9lQiy2pogoLtc0M9RYjSkAbbsCkilQXUiaaE,50179
|
86
86
|
src/cli/utils/version.py,sha256=F4udQmzniPStqWZFIgnv3Qg3l9non4mfy2An-Oveqmc,2916
|
87
87
|
src/data_ingestion/README.md,sha256=LNxSQoJW9JozK-TbyGQLj5L_MGWNwrfLk6V6RmQ2oBQ,4032
|
88
88
|
src/data_ingestion/pyproject.toml,sha256=-1Mf2QB8K70ICQV5UPZDpf-fN3UwEQLVzQyxfakCSTY,445
|
@@ -106,7 +106,7 @@ src/deployment_targets/cloud_run/tests/load_test/README.md,sha256=clrCwgwUDr_Asi
|
|
106
106
|
src/deployment_targets/cloud_run/tests/load_test/load_test.py,sha256=kK3KaCdBFHKlni3ZVY2u4h_ugNla4o6pbhGRZlQ-haI,4270
|
107
107
|
src/deployment_targets/cloud_run/tests/load_test/.results/.placeholder,sha256=ZbWpSgDo8bT33PstD_73aQSeN_0oo0F104NMUGuZ8lE,14903
|
108
108
|
src/deployment_targets/cloud_run/{{cookiecutter.agent_directory}}/server.py,sha256=TKUFGNVxBlWh61owDIemiE734ENWKtWHXSAZ5Oix2t0,15463
|
109
|
-
src/frontends/live_api_react/frontend/package-lock.json,sha256=
|
109
|
+
src/frontends/live_api_react/frontend/package-lock.json,sha256=_vWIfornMhB4lrRIwUmy4CqKGINCKjeUuYcTw2Sc_IY,734344
|
110
110
|
src/frontends/live_api_react/frontend/package.json,sha256=OBOzzDiDiESPzmbLDlZ6KM1Trit71vXdP692dI-g9Uo,1381
|
111
111
|
src/frontends/live_api_react/frontend/tsconfig.json,sha256=cyqEhf7-Yydz-PX8_cuF8JpsyC363NDTNkrmCk0sKAo,595
|
112
112
|
src/frontends/live_api_react/frontend/public/favicon.ico,sha256=FY9oTN01RzaJ2lZ1rCjNXsEfT1gWZJA3fPx0QMBlMCU,15086
|
@@ -114,7 +114,7 @@ src/frontends/live_api_react/frontend/public/index.html,sha256=tOhOQOx5kMi9WhxT-
|
|
114
114
|
src/frontends/live_api_react/frontend/public/robots.txt,sha256=kNJLw79pisHhc3OVAimMzKcq3x9WT6sF9IS4xI0crdI,67
|
115
115
|
src/frontends/live_api_react/frontend/src/App.scss,sha256=477MjERLsjhhzSS5WvROHfgdLi41F0PeW7zFTIROlH4,3472
|
116
116
|
src/frontends/live_api_react/frontend/src/App.test.tsx,sha256=l4bj_dLHDggvlcxZZgbhXdR9oIpdCwrGglRWtSqNqUU,869
|
117
|
-
src/frontends/live_api_react/frontend/src/App.tsx,sha256=
|
117
|
+
src/frontends/live_api_react/frontend/src/App.tsx,sha256=2iY35ZFsNizUa7FQ9DSlSosGJIqFDcGJ8tu8mQLfgfM,2251
|
118
118
|
src/frontends/live_api_react/frontend/src/index.css,sha256=THy1DxvcOTW4WypzWvYEL_SVAVzda1iPEQ0M6pvgNUo,950
|
119
119
|
src/frontends/live_api_react/frontend/src/index.tsx,sha256=c3VCNMXzTZInNqpHaQUMPPwZsicO468Ujc5u3jLGLZ8,1150
|
120
120
|
src/frontends/live_api_react/frontend/src/multimodal-live-types.ts,sha256=J52j9vfza9EyODprh9w29psdBSEygTnXZF8yJIsfsDs,6037
|
@@ -123,13 +123,11 @@ src/frontends/live_api_react/frontend/src/reportWebVitals.ts,sha256=mGju88uviGA8
|
|
123
123
|
src/frontends/live_api_react/frontend/src/setupTests.ts,sha256=7Iq1rAaeoGzkLb3FhpNU2XlVmnu1O1cS56foEBFISTg,837
|
124
124
|
src/frontends/live_api_react/frontend/src/components/audio-pulse/AudioPulse.tsx,sha256=lnB4GWVy9HW4nI6YuRes059ywhU-WwZO0K_zvAadUZY,1690
|
125
125
|
src/frontends/live_api_react/frontend/src/components/audio-pulse/audio-pulse.scss,sha256=L8MzlqHkoJ3B-qnlYD62nGlTTUOkgX5H3yxKVBeHh-c,1346
|
126
|
-
src/frontends/live_api_react/frontend/src/components/control-tray/ControlTray.tsx,sha256=M9mbTHI4aIR4HV1RrnomDt2dP_zJybBVGeFmrRAUcKA,6875
|
127
|
-
src/frontends/live_api_react/frontend/src/components/control-tray/control-tray.scss,sha256=pKzOcyA3Xe8CXFpJIeHytBn_7eKcAeGLbL3Q70RsKvM,3976
|
128
126
|
src/frontends/live_api_react/frontend/src/components/logger/Logger.tsx,sha256=E11x8IaWcCJFtVOml9NSiqZV6OQLfuEjHWc6vm12tVU,6696
|
129
127
|
src/frontends/live_api_react/frontend/src/components/logger/logger.scss,sha256=0ObbIB4mCYNshL650inZN24-HXPvNBxAvMIVhqc0hdg,2432
|
130
128
|
src/frontends/live_api_react/frontend/src/components/logger/mock-logs.ts,sha256=7r7bRNowJxdSkDJN2awTX82etfNu7V-ThufCRACYhU0,3293
|
131
|
-
src/frontends/live_api_react/frontend/src/components/side-panel/SidePanel.tsx,sha256=
|
132
|
-
src/frontends/live_api_react/frontend/src/components/side-panel/side-panel.scss,sha256=
|
129
|
+
src/frontends/live_api_react/frontend/src/components/side-panel/SidePanel.tsx,sha256=NsrRdCorl34MggRSiKLeDfGdgHZXFOf7oinng2ig-WM,16363
|
130
|
+
src/frontends/live_api_react/frontend/src/components/side-panel/side-panel.scss,sha256=Pq27rQAM-2-Z5tYShtJoVk85w541ywkF6X30F5tXQwI,11477
|
133
131
|
src/frontends/live_api_react/frontend/src/contexts/LiveAPIContext.tsx,sha256=qBQ6KLxVNCeaydwPtXIiOMFJ04_ETUqU0hRypLkF03M,1383
|
134
132
|
src/frontends/live_api_react/frontend/src/hooks/use-live-api.ts,sha256=9t2rkByVRmRJkO3Lgi44FxYAuLccKXySCnbokY4erJw,3035
|
135
133
|
src/frontends/live_api_react/frontend/src/hooks/use-media-stream-mux.ts,sha256=83cmRJlQYoLLy9VDc0GO3e4VBfkKpiEHrvV26Z5rHng,776
|
@@ -138,7 +136,7 @@ src/frontends/live_api_react/frontend/src/hooks/use-webcam.ts,sha256=NuTM7meIwaS
|
|
138
136
|
src/frontends/live_api_react/frontend/src/utils/audio-recorder.ts,sha256=JcO69YeM7boSf1gM5VVX6cbLvGRT-dYYJjWUVBJFWbM,3699
|
139
137
|
src/frontends/live_api_react/frontend/src/utils/audio-streamer.ts,sha256=xgtnrm_jbmKzwUkeCQiv3C7jmU7DfdaJU2su6NLpXCk,8301
|
140
138
|
src/frontends/live_api_react/frontend/src/utils/audioworklet-registry.ts,sha256=2I1va0WszQ3-SHfSmgp5-ToOSof5H6q-rgFnlf8mGUI,1258
|
141
|
-
src/frontends/live_api_react/frontend/src/utils/multimodal-live-client.ts,sha256=
|
139
|
+
src/frontends/live_api_react/frontend/src/utils/multimodal-live-client.ts,sha256=1XYFpfF9jCa6k7oCWbVYqErQchoTBQBKKwM-zQcyQBI,9932
|
142
140
|
src/frontends/live_api_react/frontend/src/utils/store-logger.ts,sha256=YxS0TjiGntFPIrHVVU14WplpITzzxP2faTeAVOMvbQA,1761
|
143
141
|
src/frontends/live_api_react/frontend/src/utils/utils.ts,sha256=qQIhLzfyCBLecU0ksQCKIbD3cIflb0hxt0SPZGdYFEo,2457
|
144
142
|
src/frontends/live_api_react/frontend/src/utils/worklets/audio-processing.ts,sha256=ULgnXphZUfbHkRhGoPT_670WHjzaXJwWgYU0ISQRSXI,1979
|
@@ -154,7 +152,7 @@ src/frontends/streamlit/frontend/utils/stream_handler.py,sha256=-XVRfLH6ck1KP6NS
|
|
154
152
|
src/frontends/streamlit/frontend/utils/title_summary.py,sha256=B0cadS_KPW-tsbABauI4J681aqjEtuKFDa25e9R1WKc,3030
|
155
153
|
src/resources/containers/data_processing/Dockerfile,sha256=VoB9d5yZiiWnqRfWrIq0gGNMzZg-eVy733OgP72ZgO0,950
|
156
154
|
src/resources/containers/e2e-tests/Dockerfile,sha256=yA3HxeX0HNpl8B4oEQUICCVZDCXdRn2Igmii4jt-r7k,1895
|
157
|
-
src/resources/docs/adk-cheatsheet.md,sha256=
|
155
|
+
src/resources/docs/adk-cheatsheet.md,sha256=9VZpM5bG3pJq4PbNfym7LOLzgeLZfqkAGA0YlIhShKQ,71375
|
158
156
|
src/resources/idx/idx-template.json,sha256=07OQZCPp45Iqor2O7Tm1e1Gmsdd-AmmUofSvA7y-oRs,793
|
159
157
|
src/resources/idx/idx-template.nix,sha256=sesHGev_PYtVDg0J5tHkg0OO7IR1Bz2iAtl_if3Ar3M,892
|
160
158
|
src/resources/idx/.idx/dev.nix,sha256=XQ4T1xt5I-8SVwnI37v56RFFlxa58Ko-a9G2-oelYAI,1602
|
@@ -170,8 +168,8 @@ src/resources/locks/uv-live_api-cloud_run.lock,sha256=AMgJt_aeoXU3LDvZv4iph9XCVs
|
|
170
168
|
src/utils/generate_locks.py,sha256=6V1B8V2BEuevWnXUsxZVTrLjXwFRII8UfsIGrQqZxVs,4320
|
171
169
|
src/utils/lock_utils.py,sha256=IFOMUWtb-ypm2Y8w8J5y2oI_-MaPuwPF_JOAAlnNudA,2275
|
172
170
|
src/utils/watch_and_rebuild.py,sha256=vP4yIiA7E_lj5sfQdJUl8TXas6V7msDg8XWUutAC05Q,6679
|
173
|
-
agent_starter_pack-0.
|
174
|
-
agent_starter_pack-0.
|
175
|
-
agent_starter_pack-0.
|
176
|
-
agent_starter_pack-0.
|
177
|
-
agent_starter_pack-0.
|
171
|
+
agent_starter_pack-0.14.0.dist-info/METADATA,sha256=gbA6g4uKpEnsSpWnb3zhMxLqzdM9KWLoHXVjTuV5ofw,11408
|
172
|
+
agent_starter_pack-0.14.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
173
|
+
agent_starter_pack-0.14.0.dist-info/entry_points.txt,sha256=U7uCxR7YulIhZ0L8R8Hui0Bsy6J7oyESBeDYJYMrQjA,56
|
174
|
+
agent_starter_pack-0.14.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
175
|
+
agent_starter_pack-0.14.0.dist-info/RECORD,,
|
@@ -234,6 +234,7 @@
|
|
234
234
|
"outputs": [],
|
235
235
|
"source": [
|
236
236
|
"import json\n",
|
237
|
+
"import asyncio\n",
|
237
238
|
"\n",
|
238
239
|
"# General\n",
|
239
240
|
"import random\n",
|
@@ -285,7 +286,7 @@
|
|
285
286
|
" return \"\".join(random.choices(string.ascii_lowercase + string.digits, k=length))\n",
|
286
287
|
"\n",
|
287
288
|
"\n",
|
288
|
-
"def parse_adk_output_to_dictionary(events: list[Event]
|
289
|
+
"def parse_adk_output_to_dictionary(events: list[Event], *, as_json: bool = False):\n",
|
289
290
|
" \"\"\"\n",
|
290
291
|
" Parse ADK event output into a structured dictionary format,\n",
|
291
292
|
" with the predicted trajectory dumped as a JSON string.\n",
|
@@ -293,63 +294,54 @@
|
|
293
294
|
" \"\"\"\n",
|
294
295
|
"\n",
|
295
296
|
" final_response = \"\"\n",
|
296
|
-
"
|
297
|
+
" trajectory = []\n",
|
297
298
|
"\n",
|
298
299
|
" for event in events:\n",
|
299
|
-
"
|
300
|
-
" if not event.content or not event.content.parts:\n",
|
300
|
+
" if not getattr(event, \"content\", None) or not getattr(event.content, \"parts\", None):\n",
|
301
301
|
" continue\n",
|
302
|
-
"\n",
|
303
|
-
" # Iterate through ALL parts in the event's content\n",
|
304
302
|
" for part in event.content.parts:\n",
|
305
|
-
" if part
|
306
|
-
"
|
303
|
+
" if getattr(part, \"function_call\", None):\n",
|
304
|
+
" info = {\n",
|
307
305
|
" \"tool_name\": part.function_call.name,\n",
|
308
306
|
" \"tool_input\": dict(part.function_call.args),\n",
|
309
307
|
" }\n",
|
310
|
-
"
|
311
|
-
"
|
312
|
-
"
|
313
|
-
"\n",
|
314
|
-
" # The final text response is usually in the last event from the model\n",
|
315
|
-
" if event.content.role == \"model\" and part.text:\n",
|
316
|
-
" # Overwrite response; the last text response found is likely the final one\n",
|
308
|
+
" if info not in trajectory:\n",
|
309
|
+
" trajectory.append(info)\n",
|
310
|
+
" if event.content.role == \"model\" and getattr(part, \"text\", None):\n",
|
317
311
|
" final_response = part.text.strip()\n",
|
318
312
|
"\n",
|
319
|
-
"
|
320
|
-
"
|
321
|
-
"
|
322
|
-
" \
|
323
|
-
" }\n",
|
313
|
+
" if as_json:\n",
|
314
|
+
" trajectory_out = json.dumps(trajectory)\n",
|
315
|
+
" else:\n",
|
316
|
+
" trajectory_out = trajectory\n",
|
324
317
|
"\n",
|
325
|
-
" return
|
318
|
+
" return {\"response\": final_response, \"predicted_trajectory\": trajectory_out}\n",
|
326
319
|
"\n",
|
327
320
|
"\n",
|
328
321
|
"def format_output_as_markdown(output: dict) -> str:\n",
|
329
322
|
" \"\"\"Convert the output dictionary to a formatted markdown string.\"\"\"\n",
|
330
|
-
" markdown = \"### AI Response\\n\"\n",
|
331
|
-
" markdown += f\"{output['response']}\\n\\n\"\n",
|
332
|
-
"\n",
|
323
|
+
" markdown = \"### AI Response\\n\" + output[\"response\"] + \"\\n\\n\"\n",
|
333
324
|
" if output[\"predicted_trajectory\"]:\n",
|
334
|
-
" output[\"predicted_trajectory\"] = json.loads(output[\"predicted_trajectory\"])\n",
|
335
325
|
" markdown += \"### Function Calls\\n\"\n",
|
336
326
|
" for call in output[\"predicted_trajectory\"]:\n",
|
337
327
|
" markdown += f\"- **Function**: `{call['tool_name']}`\\n\"\n",
|
338
|
-
" markdown += \" - **Arguments
|
328
|
+
" markdown += \" - **Arguments**\\n\"\n",
|
339
329
|
" for key, value in call[\"tool_input\"].items():\n",
|
340
330
|
" markdown += f\" - `{key}`: `{value}`\\n\"\n",
|
341
|
-
"\n",
|
342
331
|
" return markdown\n",
|
343
332
|
"\n",
|
344
333
|
"\n",
|
345
334
|
"def display_eval_report(eval_result: pd.DataFrame) -> None:\n",
|
346
335
|
" \"\"\"Display the evaluation results.\"\"\"\n",
|
347
|
-
" metrics_df = pd.DataFrame.from_dict(eval_result.summary_metrics, orient=\"index\").T\n",
|
348
336
|
" display(Markdown(\"### Summary Metrics\"))\n",
|
349
|
-
" display(
|
350
|
-
"\n",
|
351
|
-
"
|
352
|
-
"
|
337
|
+
" display(\n",
|
338
|
+
" pd.DataFrame(\n",
|
339
|
+
" eval_result.summary_metrics.items(), columns=[\"metric\", \"value\"]\n",
|
340
|
+
" )\n",
|
341
|
+
" )\n",
|
342
|
+
" if getattr(eval_result, \"metrics_table\", None) is not None:\n",
|
343
|
+
" display(Markdown(\"### Row‑wise Metrics\"))\n",
|
344
|
+
" display(eval_result.metrics_table.head())\n",
|
353
345
|
"\n",
|
354
346
|
"\n",
|
355
347
|
"def display_drilldown(row: pd.Series) -> None:\n",
|
@@ -586,37 +578,49 @@
|
|
586
578
|
},
|
587
579
|
"outputs": [],
|
588
580
|
"source": [
|
589
|
-
"def agent_parsed_outcome(query):\n",
|
590
|
-
"\n",
|
591
|
-
"
|
592
|
-
"
|
593
|
-
"
|
594
|
-
"\n",
|
595
|
-
"
|
596
|
-
"
|
597
|
-
"
|
598
|
-
"
|
599
|
-
"
|
600
|
-
"
|
601
|
-
"
|
602
|
-
"
|
603
|
-
"
|
604
|
-
"
|
605
|
-
"
|
606
|
-
"\n",
|
607
|
-
"
|
608
|
-
"
|
609
|
-
"
|
610
|
-
"
|
611
|
-
"
|
612
|
-
"
|
613
|
-
"
|
614
|
-
"\n",
|
615
|
-
"
|
616
|
-
"
|
617
|
-
"
|
618
|
-
"
|
619
|
-
|
581
|
+
"async def agent_parsed_outcome(query):\n",
|
582
|
+
" app_name = \"product_research_app\"\n",
|
583
|
+
" user_id = \"user_one\"\n",
|
584
|
+
" session_id = \"session_one\"\n",
|
585
|
+
" \n",
|
586
|
+
" product_research_agent = Agent(\n",
|
587
|
+
" name=\"ProductResearchAgent\",\n",
|
588
|
+
" model=model,\n",
|
589
|
+
" description=\"An agent that performs product research.\",\n",
|
590
|
+
" instruction=f\"\"\"\n",
|
591
|
+
" Analyze this user request: '{query}'.\n",
|
592
|
+
" If the request is about price, use get_product_price tool.\n",
|
593
|
+
" Otherwise, use get_product_details tool to get product information.\n",
|
594
|
+
" \"\"\",\n",
|
595
|
+
" tools=[get_product_details, get_product_price],\n",
|
596
|
+
" )\n",
|
597
|
+
"\n",
|
598
|
+
" session_service = InMemorySessionService()\n",
|
599
|
+
" await session_service.create_session(\n",
|
600
|
+
" app_name=app_name, user_id=user_id, session_id=session_id\n",
|
601
|
+
" )\n",
|
602
|
+
"\n",
|
603
|
+
" runner = Runner(\n",
|
604
|
+
" agent=product_research_agent, app_name=app_name, session_service=session_service\n",
|
605
|
+
" )\n",
|
606
|
+
"\n",
|
607
|
+
" content = types.Content(role=\"user\", parts=[types.Part(text=query)])\n",
|
608
|
+
" events = [event async for event in runner.run_async(user_id=user_id, session_id=session_id, new_message=content)]\n",
|
609
|
+
" \n",
|
610
|
+
" return parse_adk_output_to_dictionary(events)\n"
|
611
|
+
]
|
612
|
+
},
|
613
|
+
{
|
614
|
+
"cell_type": "code",
|
615
|
+
"execution_count": null,
|
616
|
+
"metadata": {},
|
617
|
+
"outputs": [],
|
618
|
+
"source": [
|
619
|
+
"# --- Sync wrapper for Vertex‑AI evaluation\n",
|
620
|
+
"def agent_parsed_outcome_sync(prompt: str):\n",
|
621
|
+
" result = asyncio.run(agent_parsed_outcome(prompt))\n",
|
622
|
+
" result[\"predicted_trajectory\"] = json.dumps(result[\"predicted_trajectory\"])\n",
|
623
|
+
" return result"
|
620
624
|
]
|
621
625
|
},
|
622
626
|
{
|
@@ -638,7 +642,7 @@
|
|
638
642
|
},
|
639
643
|
"outputs": [],
|
640
644
|
"source": [
|
641
|
-
"response = agent_parsed_outcome(query=\"Get product details for shoes\")\n",
|
645
|
+
"response = await agent_parsed_outcome(query=\"Get product details for shoes\")\n",
|
642
646
|
"display(Markdown(format_output_as_markdown(response)))"
|
643
647
|
]
|
644
648
|
},
|
@@ -650,7 +654,7 @@
|
|
650
654
|
},
|
651
655
|
"outputs": [],
|
652
656
|
"source": [
|
653
|
-
"response = agent_parsed_outcome(query=\"Get product price for shoes\")\n",
|
657
|
+
"response = await agent_parsed_outcome(query=\"Get product price for shoes\")\n",
|
654
658
|
"display(Markdown(format_output_as_markdown(response)))"
|
655
659
|
]
|
656
660
|
},
|
@@ -714,7 +718,7 @@
|
|
714
718
|
" \"Get product details and price for shoes\",\n",
|
715
719
|
" \"Get product details for speaker?\",\n",
|
716
720
|
" ],\n",
|
717
|
-
" \"
|
721
|
+
" \"predicted_trajectory\": [\n",
|
718
722
|
" [\n",
|
719
723
|
" {\n",
|
720
724
|
" \"tool_name\": \"get_product_price\",\n",
|
@@ -840,7 +844,7 @@
|
|
840
844
|
")\n",
|
841
845
|
"\n",
|
842
846
|
"single_tool_call_eval_result = single_tool_call_eval_task.evaluate(\n",
|
843
|
-
" runnable=
|
847
|
+
" runnable=agent_parsed_outcome_sync, experiment_run_name=EXPERIMENT_RUN\n",
|
844
848
|
")\n",
|
845
849
|
"\n",
|
846
850
|
"display_eval_report(single_tool_call_eval_result)"
|
@@ -948,7 +952,7 @@
|
|
948
952
|
")\n",
|
949
953
|
"\n",
|
950
954
|
"trajectory_eval_result = trajectory_eval_task.evaluate(\n",
|
951
|
-
" runnable=
|
955
|
+
" runnable=agent_parsed_outcome_sync, experiment_run_name=EXPERIMENT_RUN\n",
|
952
956
|
")\n",
|
953
957
|
"\n",
|
954
958
|
"display_eval_report(trajectory_eval_result)"
|
@@ -1055,7 +1059,7 @@
|
|
1055
1059
|
")\n",
|
1056
1060
|
"\n",
|
1057
1061
|
"response_eval_result = response_eval_task.evaluate(\n",
|
1058
|
-
" runnable=
|
1062
|
+
" runnable=agent_parsed_outcome_sync, experiment_run_name=EXPERIMENT_RUN\n",
|
1059
1063
|
")\n",
|
1060
1064
|
"\n",
|
1061
1065
|
"display_eval_report(response_eval_result)"
|
@@ -1240,7 +1244,9 @@
|
|
1240
1244
|
")\n",
|
1241
1245
|
"\n",
|
1242
1246
|
"response_eval_tool_result = response_eval_tool_task.evaluate(\n",
|
1243
|
-
"
|
1247
|
+
" # Uncomment the line below if you are providing the agent with an unparsed dataset\n",
|
1248
|
+
" #runnable=agent_parsed_outcome_sync, \n",
|
1249
|
+
" experiment_run_name=EXPERIMENT_RUN\n",
|
1244
1250
|
")\n",
|
1245
1251
|
"\n",
|
1246
1252
|
"display_eval_report(response_eval_tool_result)"
|
@@ -1410,7 +1416,8 @@
|
|
1410
1416
|
"].apply(json.dumps)\n",
|
1411
1417
|
"byod_eval_sample_dataset[\"reference_trajectory\"] = byod_eval_sample_dataset[\n",
|
1412
1418
|
" \"reference_trajectory\"\n",
|
1413
|
-
"].apply(json.dumps)"
|
1419
|
+
"].apply(json.dumps)\n",
|
1420
|
+
"byod_eval_sample_dataset[\"response\"] = byod_eval_sample_dataset[\"response\"].apply(json.dumps)"
|
1414
1421
|
]
|
1415
1422
|
},
|
1416
1423
|
{
|