google-adk 0.4.0__py3-none-any.whl → 1.0.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.
Files changed (129) hide show
  1. google/adk/agents/active_streaming_tool.py +1 -0
  2. google/adk/agents/base_agent.py +91 -47
  3. google/adk/agents/base_agent.py.orig +330 -0
  4. google/adk/agents/callback_context.py +4 -9
  5. google/adk/agents/invocation_context.py +1 -0
  6. google/adk/agents/langgraph_agent.py +1 -0
  7. google/adk/agents/live_request_queue.py +1 -0
  8. google/adk/agents/llm_agent.py +172 -35
  9. google/adk/agents/loop_agent.py +1 -1
  10. google/adk/agents/parallel_agent.py +7 -0
  11. google/adk/agents/readonly_context.py +7 -1
  12. google/adk/agents/run_config.py +5 -1
  13. google/adk/agents/sequential_agent.py +31 -0
  14. google/adk/agents/transcription_entry.py +5 -2
  15. google/adk/artifacts/base_artifact_service.py +5 -10
  16. google/adk/artifacts/gcs_artifact_service.py +9 -9
  17. google/adk/artifacts/in_memory_artifact_service.py +6 -6
  18. google/adk/auth/auth_credential.py +9 -5
  19. google/adk/auth/auth_preprocessor.py +7 -1
  20. google/adk/auth/auth_tool.py +3 -4
  21. google/adk/cli/agent_graph.py +5 -5
  22. google/adk/cli/browser/index.html +2 -2
  23. google/adk/cli/browser/{main-HWIBUY2R.js → main-QOEMUXM4.js} +58 -58
  24. google/adk/cli/cli.py +7 -7
  25. google/adk/cli/cli_deploy.py +7 -2
  26. google/adk/cli/cli_eval.py +181 -106
  27. google/adk/cli/cli_tools_click.py +147 -62
  28. google/adk/cli/fast_api.py +340 -158
  29. google/adk/cli/fast_api.py.orig +822 -0
  30. google/adk/cli/utils/common.py +23 -0
  31. google/adk/cli/utils/evals.py +83 -1
  32. google/adk/cli/utils/logs.py +13 -5
  33. google/adk/code_executors/__init__.py +3 -1
  34. google/adk/code_executors/built_in_code_executor.py +52 -0
  35. google/adk/evaluation/__init__.py +1 -1
  36. google/adk/evaluation/agent_evaluator.py +168 -128
  37. google/adk/evaluation/eval_case.py +102 -0
  38. google/adk/evaluation/eval_set.py +37 -0
  39. google/adk/evaluation/eval_sets_manager.py +42 -0
  40. google/adk/evaluation/evaluation_constants.py +1 -0
  41. google/adk/evaluation/evaluation_generator.py +89 -114
  42. google/adk/evaluation/evaluator.py +56 -0
  43. google/adk/evaluation/local_eval_sets_manager.py +264 -0
  44. google/adk/evaluation/response_evaluator.py +107 -3
  45. google/adk/evaluation/trajectory_evaluator.py +83 -2
  46. google/adk/events/event.py +7 -1
  47. google/adk/events/event_actions.py +7 -1
  48. google/adk/examples/example.py +1 -0
  49. google/adk/examples/example_util.py +3 -2
  50. google/adk/flows/__init__.py +0 -1
  51. google/adk/flows/llm_flows/_code_execution.py +19 -11
  52. google/adk/flows/llm_flows/audio_transcriber.py +4 -3
  53. google/adk/flows/llm_flows/base_llm_flow.py +86 -22
  54. google/adk/flows/llm_flows/basic.py +3 -0
  55. google/adk/flows/llm_flows/functions.py +10 -9
  56. google/adk/flows/llm_flows/instructions.py +28 -9
  57. google/adk/flows/llm_flows/single_flow.py +1 -1
  58. google/adk/memory/__init__.py +1 -1
  59. google/adk/memory/_utils.py +23 -0
  60. google/adk/memory/base_memory_service.py +25 -21
  61. google/adk/memory/base_memory_service.py.orig +76 -0
  62. google/adk/memory/in_memory_memory_service.py +59 -27
  63. google/adk/memory/memory_entry.py +37 -0
  64. google/adk/memory/vertex_ai_rag_memory_service.py +40 -17
  65. google/adk/models/anthropic_llm.py +36 -11
  66. google/adk/models/base_llm.py +45 -4
  67. google/adk/models/gemini_llm_connection.py +15 -2
  68. google/adk/models/google_llm.py +9 -44
  69. google/adk/models/google_llm.py.orig +305 -0
  70. google/adk/models/lite_llm.py +94 -38
  71. google/adk/models/llm_request.py +1 -1
  72. google/adk/models/llm_response.py +15 -3
  73. google/adk/models/registry.py +1 -1
  74. google/adk/runners.py +68 -44
  75. google/adk/sessions/__init__.py +1 -1
  76. google/adk/sessions/_session_util.py +14 -0
  77. google/adk/sessions/base_session_service.py +8 -32
  78. google/adk/sessions/database_session_service.py +58 -61
  79. google/adk/sessions/in_memory_session_service.py +108 -26
  80. google/adk/sessions/session.py +4 -0
  81. google/adk/sessions/vertex_ai_session_service.py +23 -45
  82. google/adk/telemetry.py +3 -0
  83. google/adk/tools/__init__.py +4 -7
  84. google/adk/tools/{built_in_code_execution_tool.py → _built_in_code_execution_tool.py} +11 -0
  85. google/adk/tools/_memory_entry_utils.py +30 -0
  86. google/adk/tools/agent_tool.py +16 -13
  87. google/adk/tools/apihub_tool/apihub_toolset.py +55 -74
  88. google/adk/tools/application_integration_tool/application_integration_toolset.py +107 -85
  89. google/adk/tools/application_integration_tool/clients/connections_client.py +29 -25
  90. google/adk/tools/application_integration_tool/clients/integration_client.py +6 -6
  91. google/adk/tools/application_integration_tool/integration_connector_tool.py +69 -26
  92. google/adk/tools/base_toolset.py +58 -0
  93. google/adk/tools/enterprise_search_tool.py +65 -0
  94. google/adk/tools/function_parameter_parse_util.py +2 -2
  95. google/adk/tools/google_api_tool/__init__.py +18 -70
  96. google/adk/tools/google_api_tool/google_api_tool.py +11 -5
  97. google/adk/tools/google_api_tool/google_api_toolset.py +126 -0
  98. google/adk/tools/google_api_tool/google_api_toolsets.py +102 -0
  99. google/adk/tools/google_api_tool/googleapi_to_openapi_converter.py +40 -42
  100. google/adk/tools/langchain_tool.py +96 -49
  101. google/adk/tools/load_artifacts_tool.py +4 -4
  102. google/adk/tools/load_memory_tool.py +16 -5
  103. google/adk/tools/mcp_tool/__init__.py +3 -2
  104. google/adk/tools/mcp_tool/conversion_utils.py +1 -1
  105. google/adk/tools/mcp_tool/mcp_session_manager.py +167 -16
  106. google/adk/tools/mcp_tool/mcp_session_manager.py.orig +322 -0
  107. google/adk/tools/mcp_tool/mcp_tool.py +12 -12
  108. google/adk/tools/mcp_tool/mcp_toolset.py +155 -195
  109. google/adk/tools/openapi_tool/common/common.py +2 -5
  110. google/adk/tools/openapi_tool/openapi_spec_parser/openapi_toolset.py +32 -7
  111. google/adk/tools/openapi_tool/openapi_spec_parser/operation_parser.py +43 -33
  112. google/adk/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.py +1 -1
  113. google/adk/tools/preload_memory_tool.py +27 -18
  114. google/adk/tools/retrieval/__init__.py +1 -1
  115. google/adk/tools/retrieval/vertex_ai_rag_retrieval.py +1 -1
  116. google/adk/tools/tool_context.py +4 -4
  117. google/adk/tools/toolbox_toolset.py +79 -0
  118. google/adk/tools/transfer_to_agent_tool.py +0 -1
  119. google/adk/version.py +1 -1
  120. {google_adk-0.4.0.dist-info → google_adk-1.0.0.dist-info}/METADATA +7 -5
  121. google_adk-1.0.0.dist-info/RECORD +195 -0
  122. google/adk/agents/remote_agent.py +0 -50
  123. google/adk/tools/google_api_tool/google_api_tool_set.py +0 -110
  124. google/adk/tools/google_api_tool/google_api_tool_sets.py +0 -112
  125. google/adk/tools/toolbox_tool.py +0 -46
  126. google_adk-0.4.0.dist-info/RECORD +0 -179
  127. {google_adk-0.4.0.dist-info → google_adk-1.0.0.dist-info}/WHEEL +0 -0
  128. {google_adk-0.4.0.dist-info → google_adk-1.0.0.dist-info}/entry_points.txt +0 -0
  129. {google_adk-0.4.0.dist-info → google_adk-1.0.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,195 @@
1
+ google/adk/__init__.py,sha256=sSPQK3r0tW8ahl-k8SXkZvMcbiTbGICCtrw6KkFucyg,726
2
+ google/adk/runners.py,sha256=jj3Q9LyImrZwuHoYPcuFYcoHuR1C6D9ab5x5v8avVuw,16860
3
+ google/adk/telemetry.py,sha256=Oyb_Uc-onV2NhxmqAp3owTWvYPUYQ-2jKeefq7c3FBE,6378
4
+ google/adk/version.py,sha256=d6uopJQTFu9fhC6YO3UWq_iyL_3iwFy_A4bnkw0Z7i4,621
5
+ google/adk/agents/__init__.py,sha256=WsCiBlvI-ISWrcntboo_sULvVJNwLNxXCe42UGPLKdY,1041
6
+ google/adk/agents/active_streaming_tool.py,sha256=vFuh_PkdF5EyyneBBJ7Al8ojeTIR3OtsxLjckr9DbXE,1194
7
+ google/adk/agents/base_agent.py,sha256=3OBJWLnRsnWuBPA2zLYo-6Yhs1bFDJGKHoa8_RPgndg,12271
8
+ google/adk/agents/base_agent.py.orig,sha256=B7qXtEiHwOQigX45R5XLv0dXWG6mATg-nOOMqvFNcYI,10102
9
+ google/adk/agents/callback_context.py,sha256=ENK7Z27KD-orAr3kaa0n4NCtstZyUx1OrquhEnIN0Z4,3410
10
+ google/adk/agents/invocation_context.py,sha256=hN3T06F7T4-IpI2CGcmBqrzH4yo9fpW1O79iZwajQB4,6208
11
+ google/adk/agents/langgraph_agent.py,sha256=1MI-jsLRncMy4mpjSsGU5FL6zbK-k4FxiupnujgYVNE,4287
12
+ google/adk/agents/live_request_queue.py,sha256=AudgMP6VfGjNgH7VeQamKJ6Yo2n5eIlikcscoOqprNU,2109
13
+ google/adk/agents/llm_agent.py,sha256=DsM7np-ASB8YE-cUnReif488vnT00Oy_4ry8EYtiASU,16858
14
+ google/adk/agents/loop_agent.py,sha256=BRGCwSopdOX_x7oUTnUe7udS9GpV0zOn5vXf1USsCf0,1935
15
+ google/adk/agents/parallel_agent.py,sha256=-KnMjMRdl4y9j2MrlzREIE4LPedjesH_EqzsujYMCtc,3244
16
+ google/adk/agents/readonly_context.py,sha256=Z_eVpkMCQHL_Ufal_Qp4wQ-EtCN7SsRKuz679-AcABM,1640
17
+ google/adk/agents/run_config.py,sha256=6IorXL0OsgnWbsMRzVRQ6NJ2vz4zE_GT0S5em95fzwk,3116
18
+ google/adk/agents/sequential_agent.py,sha256=LFNVRbSNp1-gQtEpNpzChAIqKb7sbCojiMQRqxQbigk,2714
19
+ google/adk/agents/transcription_entry.py,sha256=HL8j2xvtdrcP4_uxy55ASCmLFrc8KchvV2eoGnwZnqc,1178
20
+ google/adk/artifacts/__init__.py,sha256=D5DYoVYR0tOd2E_KwRu0Cp7yvV25KGuIQmQeCRDyK-k,846
21
+ google/adk/artifacts/base_artifact_service.py,sha256=H-t5nckLTfr330utj8vxjH45z81h_h_c9EZzd3A76dY,3452
22
+ google/adk/artifacts/gcs_artifact_service.py,sha256=-YU4NhZiGMnHHCg00aJWgKq4JWkQLh7EH5OuGusM5bE,5608
23
+ google/adk/artifacts/in_memory_artifact_service.py,sha256=Iw34Ja89JwGgd3sulbxxk5pVMqzEZJCt4F2m15MC37U,4059
24
+ google/adk/auth/__init__.py,sha256=GoFe0aZGdp0ExNE4rXNn1RuXLaB64j7Z-2C5e2Hsh8c,908
25
+ google/adk/auth/auth_credential.py,sha256=4fPDJUZy82RGBGTK-vytKk4KdDNRFa2T3sI-9L3m3OE,6852
26
+ google/adk/auth/auth_handler.py,sha256=ViqVsH5pzO8Pzq6HwlI4b1Y98NZO822TYRPnYAzIbNc,9478
27
+ google/adk/auth/auth_preprocessor.py,sha256=RQLkCajcyWDwRL-griI2r2KpkRGARoC228WKcDQ_RtI,4372
28
+ google/adk/auth/auth_schemes.py,sha256=dxx9bxjOWoae1fSVxbpaVTwa0I4v76_QJJFEX--1ueA,2260
29
+ google/adk/auth/auth_tool.py,sha256=b6VG3yuHNqk3HTCh9AheYz1T664M8SI4MzT5mfCyleo,2302
30
+ google/adk/cli/__init__.py,sha256=ouPYnIY02VmGNfpA6IT8oSQdfeZd1LHVoDSt_x8zQPU,609
31
+ google/adk/cli/__main__.py,sha256=gN8rRWlkh_3gLI-oYByxrKpCW9BIfDwrr0YuyisxmHo,646
32
+ google/adk/cli/agent_graph.py,sha256=0jCqJYwuCHYH7UM2Qj0YGCBL3wcRsYfctiD59DDC0Dg,4796
33
+ google/adk/cli/cli.py,sha256=6XwAKg42_fuu95ohtRhtPTU0KTgs3Y6L_AuuFPs0MwQ,6231
34
+ google/adk/cli/cli_create.py,sha256=S5sAKIzTjaf3bWoh6nUCSxm9koxdkN0SkTnOtsl0Oqs,8010
35
+ google/adk/cli/cli_deploy.py,sha256=JijllmdqkOj0PgKZZk6TPRsf4dxjFUZ1_7R1gL-HzVY,5579
36
+ google/adk/cli/cli_eval.py,sha256=MDXIUKpYEgcQd9xsL8P-i81N2iNBHKZUfisn8foq6Tw,12511
37
+ google/adk/cli/cli_tools_click.py,sha256=D7QZ8RZwymoVwVQziLomudA4hs0wY8M6cj3G7WIIOdI,20453
38
+ google/adk/cli/fast_api.py,sha256=9fmY-AHqmoJ0QbyggFvlB5S29XCeqf6PIAyUHYoUuxE,33932
39
+ google/adk/cli/fast_api.py.orig,sha256=WHO8EDtsp2si_ohde12R08cWbr79tyh4fzz5jFhIvGE,26936
40
+ google/adk/cli/browser/adk_favicon.svg,sha256=giyzTZ5Xe6HFU63NgTIZDm35L-RmID-odVFOZ4vMo1M,3132
41
+ google/adk/cli/browser/index.html,sha256=h5kf2HqPLK0avvngvh_6eJKiL4WN7SvIDfmF5eS4Ny0,18483
42
+ google/adk/cli/browser/main-QOEMUXM4.js,sha256=3sO-T6idDB2rFubxvuc2OJHgxVRmScAenLlFVlXTR98,2488024
43
+ google/adk/cli/browser/polyfills-FFHMD2TL.js,sha256=6tcwOogi31Djphkq1hP2H5TxfN1MBg3P4YYrxHNdH5M,35115
44
+ google/adk/cli/browser/styles-4VDSPQ37.css,sha256=QF3xmtXMt44nFiCh0aKnvQwQiZptr3sW1u9bzltukAI,5522
45
+ google/adk/cli/browser/assets/audio-processor.js,sha256=BTYefpDeOz7VQveAoC_WFleLY9JkJs_FuGS0oQiadIA,1769
46
+ google/adk/cli/browser/assets/config/runtime-config.json,sha256=obOpZdzA-utX_wG6I687-5W7i1f8W9ixXOb7ky7rdvU,22
47
+ google/adk/cli/utils/__init__.py,sha256=2PrkBZeLjc3mXZMDJkev3IKgd07d4CheASgTB3tqz8Y,1528
48
+ google/adk/cli/utils/common.py,sha256=brmJF3t-h_HCCS9FQtgqY0Ozk1meeM6a1omwcmsbDBQ,788
49
+ google/adk/cli/utils/envs.py,sha256=S8_aqTZL8bQ4-FDYpgmNzPBTrz2UlMbV0Dg5sx-9p_0,1683
50
+ google/adk/cli/utils/evals.py,sha256=-pO0h56I06blXeOIwolnjlhxymc-ArT1JuevtGigbQM,6546
51
+ google/adk/cli/utils/logs.py,sha256=duZ6rQmj-L2s9XfQV9Z0S9ci1QcvIodCGGb09plpQvY,2476
52
+ google/adk/code_executors/__init__.py,sha256=dJ8qAZyj3jm8fNnzQWoWpI7xSVUGhU5qIxbEDpouizc,1641
53
+ google/adk/code_executors/base_code_executor.py,sha256=QLpgVcFNI5V21U-kVleze24ADeuDKgE3wI7Uui6vUeo,3030
54
+ google/adk/code_executors/built_in_code_executor.py,sha256=nAAB8lMrbVdMlAa3dYMrXJO5CndjGT4BJo27-7VUVwQ,1895
55
+ google/adk/code_executors/code_execution_utils.py,sha256=95VgarO7Q9EvwfEdQKc8RAD4XotcYYzagiIwIuEO6_s,7354
56
+ google/adk/code_executors/code_executor_context.py,sha256=W8kLnyDLq0Ci_8dDHXv9CmkQITmNKhGc8f82gC7v5ik,6732
57
+ google/adk/code_executors/container_code_executor.py,sha256=KW6ESSFcsh9WMmohOJIntV7cct2QRclNhBkYGiRwEy8,6418
58
+ google/adk/code_executors/unsafe_local_code_executor.py,sha256=0UHcjaFF5V8swin3WLs6UjAaW7P_tPmSyaaPOOiDPys,2387
59
+ google/adk/code_executors/vertex_ai_code_executor.py,sha256=CvPv0cZw-PjPxMFzf01e83bTSy_yksunub8r62hBOgg,7254
60
+ google/adk/evaluation/__init__.py,sha256=MjSF-43UTBEp_4RKf7VK7RpFbt-9SKYYfiOgSwvco8c,1020
61
+ google/adk/evaluation/agent_evaluator.py,sha256=zsUIiXNuilFEnlhdIu2hYpzwbR9AIx1Ku-wg8iHRnN8,12997
62
+ google/adk/evaluation/eval_case.py,sha256=A4c2ovY49VMxejGKf2nmw6fFuEAUcIO5P4oosFn6kB8,3165
63
+ google/adk/evaluation/eval_set.py,sha256=yRMnwW1DR59wz-TfZQ2ncxARPqx7CHPCH79m0pW5qtM,1141
64
+ google/adk/evaluation/eval_sets_manager.py,sha256=g9Hu-JpRTDfFqaNpkV6rM4NVyzHrtM0cSehOssuJGGs,1534
65
+ google/adk/evaluation/evaluation_constants.py,sha256=q3FpEx1PDoj0VjVwHDZ6U-LNZ1_uApM03d2vOevvHA4,857
66
+ google/adk/evaluation/evaluation_generator.py,sha256=4qKyeWK8PCABEuQe-jSgFFXCAHRtNZ5Z3Xh5MWbstYk,8191
67
+ google/adk/evaluation/evaluator.py,sha256=9rg_URtCMQljCo8M4L6EbsEbiF6pjVpTK5xwPD7DYCM,1671
68
+ google/adk/evaluation/local_eval_sets_manager.py,sha256=jZf6kxUzZTvYWanuKZFiahbr2xLYe5TNVQ5DvasNRAg,8615
69
+ google/adk/evaluation/response_evaluator.py,sha256=APeYkVLfriP2Uyc5WN-De8Li1xh2UGJSltBovpuS08E,8368
70
+ google/adk/evaluation/trajectory_evaluator.py,sha256=WGqieqQimM5ls4xOiCzvVmQRAO1rB_wf6-JhOSp3Z6c,8069
71
+ google/adk/events/__init__.py,sha256=Lh0rh6RAt5DIxbwBUajjGMbB6bZW5K4Qli6PD_Jv74Q,688
72
+ google/adk/events/event.py,sha256=LZal8tipy5mCln4WLYatFQ3yWRL5QDB30oBK0z7aczM,4719
73
+ google/adk/events/event_actions.py,sha256=-f_WTN8eQdhAj2celU5AoynGlBfplj3nia9C7OrT534,2275
74
+ google/adk/examples/__init__.py,sha256=LCuLG_SOF9OAV3vc1tHAaBAOeQEZl0MFHC2LGmZ6e-A,851
75
+ google/adk/examples/base_example_provider.py,sha256=MkY_4filPUOd_M_YgK-pJpOuNxvD1b8sp_pty-BNnmM,1073
76
+ google/adk/examples/example.py,sha256=HVnntZLa-HLSwEzALydRUw6DuxQpoBYUnSQyYOsSuSE,868
77
+ google/adk/examples/example_util.py,sha256=S_DaDUnMe1VM0esRr0VoSBBYCYBuvz6_xV2e7X5PcHM,4271
78
+ google/adk/examples/vertex_ai_example_store.py,sha256=0w2N8oB0QTLjbM2gRRUMGY3D9zt8kQDlW4Y6p2jAcJQ,3632
79
+ google/adk/flows/__init__.py,sha256=Q9FlRO2IfSE9yEaiAYzWkOMBJPCaNYqh4ihcp0t0BQs,574
80
+ google/adk/flows/llm_flows/__init__.py,sha256=KLTQguz-10H8LbB6Ou-rjyJzX6rx9N1G5BRVWJTKdho,729
81
+ google/adk/flows/llm_flows/_base_llm_processor.py,sha256=Y7p-zwW7MxLB3vLlZthSdCjqjqMRl0DaoSVNCzyADw0,1770
82
+ google/adk/flows/llm_flows/_code_execution.py,sha256=GP7-Hwy4ebFM0bwI_tEnvCmWl5qBy8b-EyKXjL7jw7o,15093
83
+ google/adk/flows/llm_flows/_nl_planning.py,sha256=sGKa-wkVuDqlb6e9OadKAYhIAM2xD0iqtYBm0MJRszo,4078
84
+ google/adk/flows/llm_flows/agent_transfer.py,sha256=zjRjEYTQB2R5CX0UwOoq8nXHioiQYop7sZhh8LeVkC0,3902
85
+ google/adk/flows/llm_flows/audio_transcriber.py,sha256=x0LeOZLDPVPzPCYNYA3JyAEAjCLMzmXCwhq12R67kDc,3541
86
+ google/adk/flows/llm_flows/auto_flow.py,sha256=CnuFelyZhB_ns4U_5_dW0x_KQlzu02My7qWcB4XBCYY,1714
87
+ google/adk/flows/llm_flows/base_llm_flow.py,sha256=2bdqP23ik7hJhW06suAQ4EkWwEM8uT6-y0LN_EkGiow,21956
88
+ google/adk/flows/llm_flows/basic.py,sha256=LmSMiElRTEA9dCOOvPlGxyYrmqPsqRvQ2xizBVl27eE,2480
89
+ google/adk/flows/llm_flows/contents.py,sha256=b3OBGKNJS3Tf61Fu4ge_vATExUQWtWSF1wH-ENl_FDI,12974
90
+ google/adk/flows/llm_flows/functions.py,sha256=s_0HOVKyPU4SKB8Ec_ezVilBx4hJ_KKDgAmjDyZFP9c,16998
91
+ google/adk/flows/llm_flows/identity.py,sha256=X4CRg12NvnopmydU9gbFJI4lW1_otN-w_GOAuPvKrXo,1651
92
+ google/adk/flows/llm_flows/instructions.py,sha256=iJT8Qj0rfA0jKMa-aBnypUQhL2M1k2_i9qhusXS9e8U,5065
93
+ google/adk/flows/llm_flows/single_flow.py,sha256=0Q1687fUUCpOlnYKvWt32iLrCfBV9Y1O21saV56YOJI,1904
94
+ google/adk/memory/__init__.py,sha256=8LHs0wpz5bVi0kChzERh9oMCjKh4e6Nmfe_821wF7QQ,1148
95
+ google/adk/memory/_utils.py,sha256=6hba7T4ZJ00K3tX1kLuiuiN02E844XtfR1lFEGa-AaM,797
96
+ google/adk/memory/base_memory_service.py,sha256=KlpjlgZopqKM19QP9X0eKLBSVG10hHjD4qgEEfwdb9k,1987
97
+ google/adk/memory/base_memory_service.py.orig,sha256=o2m-nUPMs2nt3AkZFyQxQ-f8-azz2Eq0f1DJ4gO7BGg,2069
98
+ google/adk/memory/in_memory_memory_service.py,sha256=S8mxOuosgzAFyl7ZoSjIo-vWY_3mhRMf2a13YO8MObo,3024
99
+ google/adk/memory/memory_entry.py,sha256=NSISrQHX6sww0J7wXP-eqxkGAkF2irqCU_UH-ziWACc,1092
100
+ google/adk/memory/vertex_ai_rag_memory_service.py,sha256=NyZts8asn7wOScGol-qeS5GlYfboyHc0GWZmnUzKnW4,6821
101
+ google/adk/models/__init__.py,sha256=jnI2M8tz4IN_WOUma4PIEdGOBDIotXcQpseH6P1VgZU,929
102
+ google/adk/models/anthropic_llm.py,sha256=i4N1lj4_4etiaiUH3VKUyfNCHuIi7uUYgsSzjvByS4U,8175
103
+ google/adk/models/base_llm.py,sha256=5cJWKPqmglBHQNu5u0oyDcjkly0NWecfEen2vgscHA4,3999
104
+ google/adk/models/base_llm_connection.py,sha256=_zBmSa4RLfnadXG0_hsJLP_x_1UMtoLKagouIp0Y0-g,2252
105
+ google/adk/models/gemini_llm_connection.py,sha256=rWMOOSFRsbxkkz0fBxbVVkYFHaRdZYJCqoeyMXqgFDM,7313
106
+ google/adk/models/google_llm.py,sha256=hOiWg74VrYbbPoyaZt6Ilo3nAhsLdEtM26B8FavGGQM,9026
107
+ google/adk/models/google_llm.py.orig,sha256=Keay_NiTNFRzBkDDAMM2YF8nj98cZj4BFAx4VZTxo6Y,9254
108
+ google/adk/models/lite_llm.py,sha256=uVzs_qcCIcA3hL83t_6hCobKMzQpg38oVWPuj4G0lEg,21618
109
+ google/adk/models/llm_request.py,sha256=nJdE_mkAwa_QNkl7FJdw5Ys748vM5RqaRYiZtke-mDA,3008
110
+ google/adk/models/llm_response.py,sha256=cer3RD1j-0Fbfjs2A3OTf3dCtx7cjnyeMrQpyK2nfno,4545
111
+ google/adk/models/registry.py,sha256=5VQyHMEaMbVp9TdscTqDAOo9uXB85zjrbMrT3zQElLE,2542
112
+ google/adk/planners/__init__.py,sha256=6G_uYtLawi99HcgGGCOxcNleNezD2IaYLKz0P8nFkPQ,788
113
+ google/adk/planners/base_planner.py,sha256=cGlgxgxb_EAI8gkgiCpnLaf_rLs0U64yg94X32kGY2I,1961
114
+ google/adk/planners/built_in_planner.py,sha256=opeMOK6RZ1lQq0SLATyue1zM-UqFS29emtR1U2feO50,2450
115
+ google/adk/planners/plan_re_act_planner.py,sha256=i2DtzdyqNQsl1nV12Ty1ayEvjDMNFfnb8H2-PP9aNXQ,8478
116
+ google/adk/sessions/__init__.py,sha256=-gxRG5EY2NIlfEGHPu_6LQw8e5PfyCRAAjMuWCGbU3w,1264
117
+ google/adk/sessions/_session_util.py,sha256=b7a7BUwRkZl3TEHKDWuKx-NIieZR8dziaXfS70gm4vc,1419
118
+ google/adk/sessions/base_session_service.py,sha256=xLccWQqcrqWEj8Q43aqfoyey1Zmz2x-Oz6CHqIOxU5w,3045
119
+ google/adk/sessions/database_session_service.py,sha256=fDxnN7PJgbcTJFd9Mgzym2xYgsPneMhZQgPsXY9rVHw,19608
120
+ google/adk/sessions/in_memory_session_service.py,sha256=1CCoDl_pN7kLySlyZw7zJstD9o3jVF_QPtGgs_No47c,8699
121
+ google/adk/sessions/session.py,sha256=fwJ3D4rUQ1N5cLMpFrE_BstEz6Ct637FlF52MfkxZCk,1861
122
+ google/adk/sessions/state.py,sha256=con9G5nfJpa95J5LKTAnZ3KMPkXdaTbrdwRdKg6d6B4,2299
123
+ google/adk/sessions/vertex_ai_session_service.py,sha256=OpfMjbLgpq9CuMCq_MqMeoXGP-BnpVX8xxps_3UCygc,10682
124
+ google/adk/tools/__init__.py,sha256=11r3IPaFNE9XWFGji_5w1eX4d_C-d2Nam3UHDki4XIo,1691
125
+ google/adk/tools/_automatic_function_calling_util.py,sha256=Cf6bBNuBggMCKPK26-T-Y0EKGTFqNvhPhMhL0s4cYAM,10882
126
+ google/adk/tools/_built_in_code_execution_tool.py,sha256=BIC6S-KB9-i7_A6vrvmh8z5bwfH-5lRUs2_N0YwkJl0,2259
127
+ google/adk/tools/_memory_entry_utils.py,sha256=ecjuQskVAnqe9dH_VI7cz88UM9h1CvT1yTPKHiJyINA,967
128
+ google/adk/tools/agent_tool.py,sha256=bYgg7M9oJdNQsG4yRfebURLj0ASxBP8Gc5ML3PQessg,5975
129
+ google/adk/tools/base_tool.py,sha256=AnEXzXXTEYn2brfZp3rjLw9yCG6znU0NbeazBvofqHU,4456
130
+ google/adk/tools/base_toolset.py,sha256=yk23nBsvidkN6TUhhUOoVXl74knTa7yk5yToO62uhKg,1832
131
+ google/adk/tools/crewai_tool.py,sha256=CAOcizXvW_cQts5lFpS9IYcX71q_7eHoBxvFasdTBX8,2293
132
+ google/adk/tools/enterprise_search_tool.py,sha256=e2BP01rebVnl_8_8zcVgx_qWAGbWKAlvYjC0i4xR3Iw,2192
133
+ google/adk/tools/example_tool.py,sha256=gaG68obDbI29omDRmtoGSDEe1BFTV4MXk1JkfcoztFM,1947
134
+ google/adk/tools/exit_loop_tool.py,sha256=qjeQsHiOt6qgjlgNSQ0HhxyVt-X-JTwaSGo5--j2SpA,784
135
+ google/adk/tools/function_parameter_parse_util.py,sha256=ndwPm_R0Nx8iw_bvFuXXiM3DbdTvVs6ciBMAZA6LLu0,10659
136
+ google/adk/tools/function_tool.py,sha256=eig6l4dK_AEfTZvxBP-MNpxx3ayGeoguhMqB4otlrr4,4552
137
+ google/adk/tools/get_user_choice_tool.py,sha256=RuShc25aJB1ZcB_t38y8e75O1uFTNimyZbiLEbZMntg,993
138
+ google/adk/tools/google_search_tool.py,sha256=0DeRgDhqxraQ-9waYp4hfgEssxNYddrpsHxDtrHsZEc,2282
139
+ google/adk/tools/langchain_tool.py,sha256=OlzPfPKdt3IdT_PxykDEOwbksq6SVJzShSkN-i63JQY,4523
140
+ google/adk/tools/load_artifacts_tool.py,sha256=UZ9aU0e2h2Z85JhRxG7fRdQpua_klUUF_1MEa9_Dy_A,3733
141
+ google/adk/tools/load_memory_tool.py,sha256=85nnXNDtmjQdl9DlLRNNVLECSHXdFuSSEknDgbOUS9o,2579
142
+ google/adk/tools/load_web_page.py,sha256=PiIX6KzHqBPy0cdskhXtT3RWUOTGS4RTbzFQGHG80pU,1263
143
+ google/adk/tools/long_running_tool.py,sha256=au3THXaV_uRsC3Q-v4rSz6Tt895vSd2xz-85nyWKSJ4,1309
144
+ google/adk/tools/preload_memory_tool.py,sha256=dnWXolahZOwO8oEFrMf6xCCV855r8tbybmkbwZWc0gk,2440
145
+ google/adk/tools/tool_context.py,sha256=WbcmgtQJJ7xyjo8C7Hmy3-wy0RY7GSd5dJ71o5_5cdU,3618
146
+ google/adk/tools/toolbox_toolset.py,sha256=a0ML7hUcGRJx7rjeqDhheRYKc0-FZXsz36ePwjm5EAQ,2375
147
+ google/adk/tools/transfer_to_agent_tool.py,sha256=rUuQpQD9w6FZSQ6bPVlzTDivwpNd_AFACeawvf5cAk4,784
148
+ google/adk/tools/vertex_ai_search_tool.py,sha256=8i3dRzH0dQBYxg7OZ2O1TzjB9KvxzVX0QUjChUz5Er4,3268
149
+ google/adk/tools/apihub_tool/__init__.py,sha256=89tWC4Mm-MYoJ9Al_b8nbqFLeTgPO0-j411SkLuuzaQ,653
150
+ google/adk/tools/apihub_tool/apihub_toolset.py,sha256=ocTvHe6kObEcSYhrdMhxC_HagCTI1DWVQhucmN_zYl0,6993
151
+ google/adk/tools/apihub_tool/clients/__init__.py,sha256=Q9FlRO2IfSE9yEaiAYzWkOMBJPCaNYqh4ihcp0t0BQs,574
152
+ google/adk/tools/apihub_tool/clients/apihub_client.py,sha256=dkNIjZosawkP1yB2OhkW8ZZBpfamLfFJ5WFiEw1Umn8,11264
153
+ google/adk/tools/apihub_tool/clients/secret_client.py,sha256=U1YsWUJvq2mmLRQETX91l0fwteyBTZWsP4USozA144c,4126
154
+ google/adk/tools/application_integration_tool/__init__.py,sha256=-MTn3o2VedLtrY2mw6GW0qBtYd8BS12luK-E-Nwhg9g,799
155
+ google/adk/tools/application_integration_tool/application_integration_toolset.py,sha256=dYMtx266sRA3WTg0k7m27mP9X1c0kTW5GFdlySfUIbo,10245
156
+ google/adk/tools/application_integration_tool/integration_connector_tool.py,sha256=wxXHlZJCBGWdQHc_tvCKf9QOllIj0_pr2X99yo1cz6c,7552
157
+ google/adk/tools/application_integration_tool/clients/connections_client.py,sha256=oYTMo2Sv3gjeEZIMdLvTzc_d2ipydlFsOXUmGUupBAs,30921
158
+ google/adk/tools/application_integration_tool/clients/integration_client.py,sha256=19qCVC7cpk1BjKt-jofixMFzzZ7Fa63dUBQHauDv_5s,10635
159
+ google/adk/tools/google_api_tool/__init__.py,sha256=rGwFkzlv0tjRODog7QlQe4IX1jatrJZ_gNxbVcEMZz0,1207
160
+ google/adk/tools/google_api_tool/google_api_tool.py,sha256=YX4ypDOeZhhEkUY1wyGC_jhzXgJYmBEm0qipbip7U5A,2029
161
+ google/adk/tools/google_api_tool/google_api_toolset.py,sha256=9yFET_S_5EXygPmA2Kr9hHYi2EvOZuMcfBMxe0nJ-oA,4138
162
+ google/adk/tools/google_api_tool/google_api_toolsets.py,sha256=7N6fAps2ybuaZoYZ9o4ht2BEYEVTkMa5jGbgEfZzcmk,2807
163
+ google/adk/tools/google_api_tool/googleapi_to_openapi_converter.py,sha256=wCtPXoGpeQvKueWJZ_ilUfCRh3mMdd46Yqt5XOQNbxc,16319
164
+ google/adk/tools/mcp_tool/__init__.py,sha256=Y0cM1WBd-av4yKp9YHp9LMcUXp5fLr49MC0sTHTkAn4,1237
165
+ google/adk/tools/mcp_tool/conversion_utils.py,sha256=vbXzTbRQrDu_KZg0vChQp4hWc3zUSY1FvJZJgLbYrDw,5225
166
+ google/adk/tools/mcp_tool/mcp_session_manager.py,sha256=Roh2-tBrmNu2BrD-gtTZVOng_CufvjO80gxvvVdFnnc,10761
167
+ google/adk/tools/mcp_tool/mcp_session_manager.py.orig,sha256=dUPcA1XHx3-OXkuWIL5LfY3J8ww4dWQ2zdU6HBbF9S8,10686
168
+ google/adk/tools/mcp_tool/mcp_tool.py,sha256=CeVNM5IJtZNBMCeEsFt5VyC8QDrb1v2Q2_xUY6XsHhY,4147
169
+ google/adk/tools/mcp_tool/mcp_toolset.py,sha256=ZezN4k3EWfb8r8pi8MDRsJxAjabnDpo2qvMYcxo4mBI,7420
170
+ google/adk/tools/openapi_tool/__init__.py,sha256=UMsewNCQjd-r1GBX1OMuUJTzJ0AlQuegIc98g04-0oU,724
171
+ google/adk/tools/openapi_tool/auth/__init__.py,sha256=NVRXscqN4V0CSCvIp8J_ee8Xyw4m-OGoZn7SmrtOsQk,637
172
+ google/adk/tools/openapi_tool/auth/auth_helpers.py,sha256=73GGGxvLZWH_YW7BEObAY-rVz3r401dm98kl5oq-nwM,15901
173
+ google/adk/tools/openapi_tool/auth/credential_exchangers/__init__.py,sha256=yKpIfNIaQD2dmPsly9Usq4lvfu1ZReVAtHlvZuSglF8,1002
174
+ google/adk/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.py,sha256=E1wuilbik3KhzbXZC2XR0fs3NZhpOglXYwpzr6Bj6lY,3398
175
+ google/adk/tools/openapi_tool/auth/credential_exchangers/base_credential_exchanger.py,sha256=XxW5vQk_AaD_vSOwwWpLIMzHvPUfvuouSzh74ZxBqDk,1790
176
+ google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py,sha256=1TOsoH2dEh1RBJgAWSGfAqKWYmNHJRobcfWuKGX_D9I,3869
177
+ google/adk/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.py,sha256=saG7AZNqH_a4rQc3m1Fx2t4extiH1QZCifxgkxvxRAI,3335
178
+ google/adk/tools/openapi_tool/common/__init__.py,sha256=XqwyKnQGngeU1EzoBMkL5c9BF_rD-s3nw_d2Va1MLhQ,625
179
+ google/adk/tools/openapi_tool/common/common.py,sha256=lpgp5eWtqTw2belJtL2pAmtwXxbkVK_LHlQooNRc1A8,8924
180
+ google/adk/tools/openapi_tool/openapi_spec_parser/__init__.py,sha256=S89I_GQukqn5edJ13oqyDufMkZUMpWokX3ju4QziFBQ,1155
181
+ google/adk/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.py,sha256=OomWa0rYWPPTs16pzT-3AvIcXwJeYBoQQgBy0R3opdI,7881
182
+ google/adk/tools/openapi_tool/openapi_spec_parser/openapi_toolset.py,sha256=Xq2gBF5kHn1EXoV_0RpJiH4C8UXLhAeqfw0D_A7yVZI,5681
183
+ google/adk/tools/openapi_tool/openapi_spec_parser/operation_parser.py,sha256=QV39I9j3YIDxjPDzSaF2urWwp-pfnxWsYFWH7jSBW8U,8961
184
+ google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py,sha256=6hJAiJQDTkRwNZxCK8g0QkrUs8mudeAK8_b-alygPBg,18955
185
+ google/adk/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.py,sha256=oZYJGokSx6YMs7h7t8qBzdUDW-pIdQDS3DxaADn0Fjc,9134
186
+ google/adk/tools/retrieval/__init__.py,sha256=0euJjx0ReH8JmUI5-JU8kWRswqLxobRCDjx5zvX4rHY,1188
187
+ google/adk/tools/retrieval/base_retrieval_tool.py,sha256=4aar8Kg-6rQG7Ht1n18D5fvJnuffodFdSjeCp-GzA7w,1174
188
+ google/adk/tools/retrieval/files_retrieval.py,sha256=bucma_LL7aw15GQnYwgpDP1Lo9UqN-RFlG3w1w0sWfw,1158
189
+ google/adk/tools/retrieval/llama_index_retrieval.py,sha256=r9HUQXqygxizX0OXz7pJAWxzRRwmofAtFa3UvRR2di0,1304
190
+ google/adk/tools/retrieval/vertex_ai_rag_retrieval.py,sha256=aDsQPeScrYoHdLg0Yq7_haT1CJbHDxCPGRyhCy1ET-o,3356
191
+ google_adk-1.0.0.dist-info/entry_points.txt,sha256=zL9CU-6V2yQ2oc5lrcyj55ROHrpiIePsvQJ4H6SL-zI,43
192
+ google_adk-1.0.0.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
193
+ google_adk-1.0.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
194
+ google_adk-1.0.0.dist-info/METADATA,sha256=vYlIaW0u2CPzZq9BrrYcRK_giMeA4Z9j8eKmyq5VP_k,9758
195
+ google_adk-1.0.0.dist-info/RECORD,,
@@ -1,50 +0,0 @@
1
- # Copyright 2025 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- import json
16
- from typing import AsyncGenerator
17
-
18
- from pydantic import Field
19
- import requests
20
- from typing_extensions import override
21
-
22
- from ..events.event import Event
23
- from .base_agent import BaseAgent
24
- from .invocation_context import InvocationContext
25
-
26
-
27
- class RemoteAgent(BaseAgent):
28
- """Experimental, do not use."""
29
-
30
- url: str
31
-
32
- sub_agents: list[BaseAgent] = Field(
33
- default_factory=list, init=False, frozen=True
34
- )
35
- """Sub-agent is disabled in RemoteAgent."""
36
-
37
- @override
38
- async def _run_async_impl(
39
- self, ctx: InvocationContext
40
- ) -> AsyncGenerator[Event, None]:
41
- data = {
42
- 'invocation_id': ctx.invocation_id,
43
- 'session': ctx.session.model_dump(exclude_none=True),
44
- }
45
- events = requests.post(self.url, data=json.dumps(data), timeout=120)
46
- events.raise_for_status()
47
- for event in events.json():
48
- e = Event.model_validate(event)
49
- e.author = self.name
50
- yield e
@@ -1,110 +0,0 @@
1
- # Copyright 2025 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from __future__ import annotations
16
-
17
- import inspect
18
- import os
19
- from typing import Any
20
- from typing import Final
21
- from typing import List
22
- from typing import Optional
23
- from typing import Type
24
-
25
- from ...auth import OpenIdConnectWithConfig
26
- from ..openapi_tool import OpenAPIToolset
27
- from ..openapi_tool import RestApiTool
28
- from .google_api_tool import GoogleApiTool
29
- from .googleapi_to_openapi_converter import GoogleApiToOpenApiConverter
30
-
31
-
32
- class GoogleApiToolSet:
33
- """Google API Tool Set."""
34
-
35
- def __init__(self, tools: List[RestApiTool]):
36
- self.tools: Final[List[GoogleApiTool]] = [
37
- GoogleApiTool(tool) for tool in tools
38
- ]
39
-
40
- def get_tools(self) -> List[GoogleApiTool]:
41
- """Get all tools in the toolset."""
42
- return self.tools
43
-
44
- def get_tool(self, tool_name: str) -> Optional[GoogleApiTool]:
45
- """Get a tool by name."""
46
- matching_tool = filter(lambda t: t.name == tool_name, self.tools)
47
- return next(matching_tool, None)
48
-
49
- @staticmethod
50
- def _load_tool_set_with_oidc_auth(
51
- spec_file: Optional[str] = None,
52
- spec_dict: Optional[dict[str, Any]] = None,
53
- scopes: Optional[list[str]] = None,
54
- ) -> OpenAPIToolset:
55
- spec_str = None
56
- if spec_file:
57
- # Get the frame of the caller
58
- caller_frame = inspect.stack()[1]
59
- # Get the filename of the caller
60
- caller_filename = caller_frame.filename
61
- # Get the directory of the caller
62
- caller_dir = os.path.dirname(os.path.abspath(caller_filename))
63
- # Join the directory path with the filename
64
- yaml_path = os.path.join(caller_dir, spec_file)
65
- with open(yaml_path, 'r', encoding='utf-8') as file:
66
- spec_str = file.read()
67
- tool_set = OpenAPIToolset(
68
- spec_dict=spec_dict,
69
- spec_str=spec_str,
70
- spec_str_type='yaml',
71
- auth_scheme=OpenIdConnectWithConfig(
72
- authorization_endpoint=(
73
- 'https://accounts.google.com/o/oauth2/v2/auth'
74
- ),
75
- token_endpoint='https://oauth2.googleapis.com/token',
76
- userinfo_endpoint=(
77
- 'https://openidconnect.googleapis.com/v1/userinfo'
78
- ),
79
- revocation_endpoint='https://oauth2.googleapis.com/revoke',
80
- token_endpoint_auth_methods_supported=[
81
- 'client_secret_post',
82
- 'client_secret_basic',
83
- ],
84
- grant_types_supported=['authorization_code'],
85
- scopes=scopes,
86
- ),
87
- )
88
- return tool_set
89
-
90
- def configure_auth(self, client_id: str, client_secret: str):
91
- for tool in self.tools:
92
- tool.configure_auth(client_id, client_secret)
93
-
94
- @classmethod
95
- def load_tool_set(
96
- cls: Type[GoogleApiToolSet],
97
- api_name: str,
98
- api_version: str,
99
- ) -> GoogleApiToolSet:
100
- spec_dict = GoogleApiToOpenApiConverter(api_name, api_version).convert()
101
- scope = list(
102
- spec_dict['components']['securitySchemes']['oauth2']['flows'][
103
- 'authorizationCode'
104
- ]['scopes'].keys()
105
- )[0]
106
- return cls(
107
- cls._load_tool_set_with_oidc_auth(
108
- spec_dict=spec_dict, scopes=[scope]
109
- ).get_tools()
110
- )
@@ -1,112 +0,0 @@
1
- # Copyright 2025 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- import logging
17
-
18
- from .google_api_tool_set import GoogleApiToolSet
19
-
20
- logger = logging.getLogger(__name__)
21
-
22
- _bigquery_tool_set = None
23
- _calendar_tool_set = None
24
- _gmail_tool_set = None
25
- _youtube_tool_set = None
26
- _slides_tool_set = None
27
- _sheets_tool_set = None
28
- _docs_tool_set = None
29
-
30
-
31
- def __getattr__(name):
32
- """This method dynamically loads and returns GoogleApiToolSet instances for
33
-
34
- various Google APIs. It uses a lazy loading approach, initializing each
35
- tool set only when it is first requested. This avoids unnecessary loading
36
- of tool sets that are not used in a given session.
37
-
38
- Args:
39
- name (str): The name of the tool set to retrieve (e.g.,
40
- "bigquery_tool_set").
41
-
42
- Returns:
43
- GoogleApiToolSet: The requested tool set instance.
44
-
45
- Raises:
46
- AttributeError: If the requested tool set name is not recognized.
47
- """
48
- global _bigquery_tool_set, _calendar_tool_set, _gmail_tool_set, _youtube_tool_set, _slides_tool_set, _sheets_tool_set, _docs_tool_set
49
-
50
- match name:
51
- case "bigquery_tool_set":
52
- if _bigquery_tool_set is None:
53
- _bigquery_tool_set = GoogleApiToolSet.load_tool_set(
54
- api_name="bigquery",
55
- api_version="v2",
56
- )
57
-
58
- return _bigquery_tool_set
59
-
60
- case "calendar_tool_set":
61
- if _calendar_tool_set is None:
62
- _calendar_tool_set = GoogleApiToolSet.load_tool_set(
63
- api_name="calendar",
64
- api_version="v3",
65
- )
66
-
67
- return _calendar_tool_set
68
-
69
- case "gmail_tool_set":
70
- if _gmail_tool_set is None:
71
- _gmail_tool_set = GoogleApiToolSet.load_tool_set(
72
- api_name="gmail",
73
- api_version="v1",
74
- )
75
-
76
- return _gmail_tool_set
77
-
78
- case "youtube_tool_set":
79
- if _youtube_tool_set is None:
80
- _youtube_tool_set = GoogleApiToolSet.load_tool_set(
81
- api_name="youtube",
82
- api_version="v3",
83
- )
84
-
85
- return _youtube_tool_set
86
-
87
- case "slides_tool_set":
88
- if _slides_tool_set is None:
89
- _slides_tool_set = GoogleApiToolSet.load_tool_set(
90
- api_name="slides",
91
- api_version="v1",
92
- )
93
-
94
- return _slides_tool_set
95
-
96
- case "sheets_tool_set":
97
- if _sheets_tool_set is None:
98
- _sheets_tool_set = GoogleApiToolSet.load_tool_set(
99
- api_name="sheets",
100
- api_version="v4",
101
- )
102
-
103
- return _sheets_tool_set
104
-
105
- case "docs_tool_set":
106
- if _docs_tool_set is None:
107
- _docs_tool_set = GoogleApiToolSet.load_tool_set(
108
- api_name="docs",
109
- api_version="v1",
110
- )
111
-
112
- return _docs_tool_set
@@ -1,46 +0,0 @@
1
- # Copyright 2025 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from typing import Any
16
-
17
- from . import _automatic_function_calling_util
18
- from .langchain_tool import LangchainTool
19
-
20
-
21
- class ToolboxTool:
22
- """A class that provides access to toolbox tools.
23
-
24
- Example:
25
- ```python
26
- toolbox = ToolboxTool("http://127.0.0.1:5000")
27
- tool = toolbox.get_tool("tool_name")
28
- toolset = toolbox.get_toolset("toolset_name")
29
- ```
30
- """
31
-
32
- toolbox_client: Any
33
- """The toolbox client."""
34
-
35
- def __init__(self, url: str):
36
- from toolbox_langchain import ToolboxClient
37
-
38
- self.toolbox_client = ToolboxClient(url)
39
-
40
- def get_tool(self, tool_name: str) -> LangchainTool:
41
- tool = self.toolbox_client.load_tool(tool_name)
42
- return LangchainTool(tool)
43
-
44
- def get_toolset(self, toolset_name: str) -> list[LangchainTool]:
45
- tools = self.toolbox_client.load_toolset(toolset_name)
46
- return [LangchainTool(tool) for tool in tools]