google-adk 0.0.1__py3-none-any.whl → 0.0.3__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.
- google/adk/._version.py +0 -0
- google/adk/__init__.py +20 -0
- google/adk/agents/__init__.py +32 -0
- google/adk/agents/active_streaming_tool.py +38 -0
- google/adk/agents/base_agent.py +345 -0
- google/adk/agents/callback_context.py +112 -0
- google/adk/agents/invocation_context.py +181 -0
- google/adk/agents/langgraph_agent.py +140 -0
- google/adk/agents/live_request_queue.py +64 -0
- google/adk/agents/llm_agent.py +376 -0
- google/adk/agents/loop_agent.py +62 -0
- google/adk/agents/parallel_agent.py +96 -0
- google/adk/agents/readonly_context.py +46 -0
- google/adk/agents/remote_agent.py +50 -0
- google/adk/agents/run_config.py +87 -0
- google/adk/agents/sequential_agent.py +45 -0
- google/adk/agents/transcription_entry.py +34 -0
- google/adk/artifacts/__init__.py +23 -0
- google/adk/artifacts/base_artifact_service.py +128 -0
- google/adk/artifacts/gcs_artifact_service.py +195 -0
- google/adk/artifacts/in_memory_artifact_service.py +133 -0
- google/adk/auth/__init__.py +22 -0
- google/adk/auth/auth_credential.py +220 -0
- google/adk/auth/auth_handler.py +268 -0
- google/adk/auth/auth_preprocessor.py +116 -0
- google/adk/auth/auth_schemes.py +67 -0
- google/adk/auth/auth_tool.py +55 -0
- google/adk/cli/__init__.py +15 -0
- google/adk/cli/__main__.py +18 -0
- google/adk/cli/agent_graph.py +148 -0
- google/adk/cli/browser/adk_favicon.svg +17 -0
- google/adk/cli/browser/assets/audio-processor.js +51 -0
- google/adk/cli/browser/assets/config/runtime-config.json +3 -0
- google/adk/cli/browser/index.html +33 -0
- google/adk/cli/browser/main-SY2WYYGV.js +75 -0
- google/adk/cli/browser/polyfills-FFHMD2TL.js +18 -0
- google/adk/cli/browser/styles-4VDSPQ37.css +17 -0
- google/adk/cli/cli.py +181 -0
- google/adk/cli/cli_deploy.py +181 -0
- google/adk/cli/cli_eval.py +282 -0
- google/adk/cli/cli_tools_click.py +524 -0
- google/adk/cli/fast_api.py +784 -0
- google/adk/cli/utils/__init__.py +49 -0
- google/adk/cli/utils/envs.py +57 -0
- google/adk/cli/utils/evals.py +93 -0
- google/adk/cli/utils/logs.py +72 -0
- google/adk/code_executors/__init__.py +49 -0
- google/adk/code_executors/base_code_executor.py +97 -0
- google/adk/code_executors/code_execution_utils.py +256 -0
- google/adk/code_executors/code_executor_context.py +202 -0
- google/adk/code_executors/container_code_executor.py +196 -0
- google/adk/code_executors/unsafe_local_code_executor.py +71 -0
- google/adk/code_executors/vertex_ai_code_executor.py +234 -0
- google/adk/docs/Makefile +20 -0
- google/adk/docs/build/doctrees/google-adk.doctree +0 -0
- google/adk/docs/build/html/_sources/google-adk.rst.txt +98 -0
- google/adk/docs/build/html/_sources/index.rst.txt +7 -0
- google/adk/docs/build/html/_static/autodoc_pydantic.css +27 -0
- google/adk/docs/build/html/_static/basic.css +925 -0
- google/adk/docs/build/html/_static/debug.css +85 -0
- google/adk/docs/build/html/_static/doctools.js +156 -0
- google/adk/docs/build/html/_static/documentation_options.js +29 -0
- google/adk/docs/build/html/_static/file.png +0 -0
- google/adk/docs/build/html/_static/language_data.js +199 -0
- google/adk/docs/build/html/_static/minus.png +0 -0
- google/adk/docs/build/html/_static/plus.png +0 -0
- google/adk/docs/build/html/_static/pygments.css +274 -0
- google/adk/docs/build/html/_static/scripts/furo-extensions.js +16 -0
- google/adk/docs/build/html/_static/scripts/furo.js +19 -0
- google/adk/docs/build/html/_static/scripts/furo.js.LICENSE.txt +7 -0
- google/adk/docs/build/html/_static/scripts/furo.js.map +1 -0
- google/adk/docs/build/html/_static/searchtools.js +620 -0
- google/adk/docs/build/html/_static/skeleton.css +312 -0
- google/adk/docs/build/html/_static/sphinx_highlight.js +170 -0
- google/adk/docs/build/html/_static/styles/furo-extensions.css +18 -0
- google/adk/docs/build/html/_static/styles/furo-extensions.css.map +1 -0
- google/adk/docs/build/html/_static/styles/furo.css +18 -0
- google/adk/docs/build/html/_static/styles/furo.css.map +1 -0
- google/adk/docs/build/html/genindex.html +861 -0
- google/adk/docs/build/html/google-adk.html +5461 -0
- google/adk/docs/build/html/index.html +567 -0
- google/adk/docs/build/html/objects.inv +0 -0
- google/adk/docs/build/html/py-modindex.html +373 -0
- google/adk/docs/build/html/search.html +333 -0
- google/adk/docs/build/html/searchindex.js +17 -0
- google/adk/docs/source/conf.py +133 -0
- google/adk/docs/source/google-adk.rst +98 -0
- google/adk/docs/source/index.rst +7 -0
- google/adk/evaluation/__init__.py +31 -0
- google/adk/evaluation/agent_evaluator.py +329 -0
- google/adk/evaluation/evaluation_constants.py +24 -0
- google/adk/evaluation/evaluation_generator.py +270 -0
- google/adk/evaluation/response_evaluator.py +135 -0
- google/adk/evaluation/trajectory_evaluator.py +184 -0
- google/adk/events/__init__.py +21 -0
- google/adk/events/event.py +130 -0
- google/adk/events/event_actions.py +55 -0
- google/adk/examples/__init__.py +28 -0
- google/adk/examples/base_example_provider.py +35 -0
- google/adk/examples/example.py +27 -0
- google/adk/examples/example_util.py +123 -0
- google/adk/examples/vertex_ai_example_store.py +104 -0
- google/adk/flows/__init__.py +14 -0
- google/adk/flows/llm_flows/__init__.py +20 -0
- google/adk/flows/llm_flows/_base_llm_processor.py +52 -0
- google/adk/flows/llm_flows/_code_execution.py +458 -0
- google/adk/flows/llm_flows/_nl_planning.py +129 -0
- google/adk/flows/llm_flows/agent_transfer.py +132 -0
- google/adk/flows/llm_flows/audio_transcriber.py +109 -0
- google/adk/flows/llm_flows/auto_flow.py +49 -0
- google/adk/flows/llm_flows/base_llm_flow.py +559 -0
- google/adk/flows/llm_flows/basic.py +72 -0
- google/adk/flows/llm_flows/contents.py +370 -0
- google/adk/flows/llm_flows/functions.py +486 -0
- google/adk/flows/llm_flows/identity.py +47 -0
- google/adk/flows/llm_flows/instructions.py +137 -0
- google/adk/flows/llm_flows/single_flow.py +57 -0
- google/adk/memory/__init__.py +35 -0
- google/adk/memory/base_memory_service.py +74 -0
- google/adk/memory/in_memory_memory_service.py +62 -0
- google/adk/memory/vertex_ai_rag_memory_service.py +177 -0
- google/adk/models/__init__.py +31 -0
- google/adk/models/anthropic_llm.py +243 -0
- google/adk/models/base_llm.py +87 -0
- google/adk/models/base_llm_connection.py +76 -0
- google/adk/models/gemini_llm_connection.py +200 -0
- google/adk/models/google_llm.py +331 -0
- google/adk/models/lite_llm.py +673 -0
- google/adk/models/llm_request.py +98 -0
- google/adk/models/llm_response.py +111 -0
- google/adk/models/registry.py +102 -0
- google/adk/planners/__init__.py +23 -0
- google/adk/planners/base_planner.py +66 -0
- google/adk/planners/built_in_planner.py +75 -0
- google/adk/planners/plan_re_act_planner.py +208 -0
- google/adk/runners.py +456 -0
- google/adk/sessions/__init__.py +41 -0
- google/adk/sessions/base_session_service.py +133 -0
- google/adk/sessions/database_session_service.py +522 -0
- google/adk/sessions/in_memory_session_service.py +206 -0
- google/adk/sessions/session.py +54 -0
- google/adk/sessions/state.py +71 -0
- google/adk/sessions/vertex_ai_session_service.py +356 -0
- google/adk/telemetry.py +189 -0
- google/adk/tests/__init__.py +14 -0
- google/adk/tests/integration/.env.example +10 -0
- google/adk/tests/integration/__init__.py +18 -0
- google/adk/tests/integration/conftest.py +119 -0
- google/adk/tests/integration/fixture/__init__.py +14 -0
- google/adk/tests/integration/fixture/agent_with_config/__init__.py +15 -0
- google/adk/tests/integration/fixture/agent_with_config/agent.py +88 -0
- google/adk/tests/integration/fixture/callback_agent/__init__.py +15 -0
- google/adk/tests/integration/fixture/callback_agent/agent.py +105 -0
- google/adk/tests/integration/fixture/context_update_test/OWNERS +1 -0
- google/adk/tests/integration/fixture/context_update_test/__init__.py +15 -0
- google/adk/tests/integration/fixture/context_update_test/agent.py +43 -0
- google/adk/tests/integration/fixture/context_update_test/successful_test.session.json +582 -0
- google/adk/tests/integration/fixture/context_variable_agent/__init__.py +15 -0
- google/adk/tests/integration/fixture/context_variable_agent/agent.py +115 -0
- google/adk/tests/integration/fixture/customer_support_ma/__init__.py +15 -0
- google/adk/tests/integration/fixture/customer_support_ma/agent.py +172 -0
- google/adk/tests/integration/fixture/ecommerce_customer_service_agent/__init__.py +15 -0
- google/adk/tests/integration/fixture/ecommerce_customer_service_agent/agent.py +338 -0
- google/adk/tests/integration/fixture/ecommerce_customer_service_agent/order_query.test.json +69 -0
- google/adk/tests/integration/fixture/ecommerce_customer_service_agent/test_config.json +6 -0
- google/adk/tests/integration/fixture/flow_complex_spark/__init__.py +15 -0
- google/adk/tests/integration/fixture/flow_complex_spark/agent.py +182 -0
- google/adk/tests/integration/fixture/flow_complex_spark/sample.session.json +190 -0
- google/adk/tests/integration/fixture/hello_world_agent/__init__.py +15 -0
- google/adk/tests/integration/fixture/hello_world_agent/agent.py +95 -0
- google/adk/tests/integration/fixture/hello_world_agent/roll_die.test.json +24 -0
- google/adk/tests/integration/fixture/hello_world_agent/test_config.json +6 -0
- google/adk/tests/integration/fixture/home_automation_agent/__init__.py +15 -0
- google/adk/tests/integration/fixture/home_automation_agent/agent.py +304 -0
- google/adk/tests/integration/fixture/home_automation_agent/simple_test.test.json +5 -0
- google/adk/tests/integration/fixture/home_automation_agent/simple_test2.test.json +5 -0
- google/adk/tests/integration/fixture/home_automation_agent/test_config.json +5 -0
- google/adk/tests/integration/fixture/home_automation_agent/test_files/dependent_tool_calls.test.json +18 -0
- google/adk/tests/integration/fixture/home_automation_agent/test_files/memorizing_past_events/eval_data.test.json +17 -0
- google/adk/tests/integration/fixture/home_automation_agent/test_files/memorizing_past_events/test_config.json +6 -0
- google/adk/tests/integration/fixture/home_automation_agent/test_files/simple_multi_turn_conversation.test.json +18 -0
- google/adk/tests/integration/fixture/home_automation_agent/test_files/simple_test.test.json +17 -0
- google/adk/tests/integration/fixture/home_automation_agent/test_files/simple_test2.test.json +5 -0
- google/adk/tests/integration/fixture/home_automation_agent/test_files/test_config.json +5 -0
- google/adk/tests/integration/fixture/tool_agent/__init__.py +15 -0
- google/adk/tests/integration/fixture/tool_agent/agent.py +218 -0
- google/adk/tests/integration/fixture/tool_agent/files/Agent_test_plan.pdf +0 -0
- google/adk/tests/integration/fixture/trip_planner_agent/__init__.py +15 -0
- google/adk/tests/integration/fixture/trip_planner_agent/agent.py +110 -0
- google/adk/tests/integration/fixture/trip_planner_agent/initial.session.json +13 -0
- google/adk/tests/integration/fixture/trip_planner_agent/test_config.json +5 -0
- google/adk/tests/integration/fixture/trip_planner_agent/test_files/initial.session.json +13 -0
- google/adk/tests/integration/fixture/trip_planner_agent/test_files/test_config.json +5 -0
- google/adk/tests/integration/fixture/trip_planner_agent/test_files/trip_inquiry_sub_agent.test.json +7 -0
- google/adk/tests/integration/fixture/trip_planner_agent/trip_inquiry.test.json +19 -0
- google/adk/tests/integration/models/__init__.py +14 -0
- google/adk/tests/integration/models/test_google_llm.py +65 -0
- google/adk/tests/integration/test_callback.py +70 -0
- google/adk/tests/integration/test_context_variable.py +67 -0
- google/adk/tests/integration/test_evalute_agent_in_fixture.py +76 -0
- google/adk/tests/integration/test_multi_agent.py +28 -0
- google/adk/tests/integration/test_multi_turn.py +42 -0
- google/adk/tests/integration/test_single_agent.py +23 -0
- google/adk/tests/integration/test_sub_agent.py +26 -0
- google/adk/tests/integration/test_system_instruction.py +177 -0
- google/adk/tests/integration/test_tools.py +287 -0
- google/adk/tests/integration/test_with_test_file.py +34 -0
- google/adk/tests/integration/tools/__init__.py +14 -0
- google/adk/tests/integration/utils/__init__.py +16 -0
- google/adk/tests/integration/utils/asserts.py +75 -0
- google/adk/tests/integration/utils/test_runner.py +97 -0
- google/adk/tests/unittests/__init__.py +14 -0
- google/adk/tests/unittests/agents/__init__.py +14 -0
- google/adk/tests/unittests/agents/test_base_agent.py +407 -0
- google/adk/tests/unittests/agents/test_langgraph_agent.py +191 -0
- google/adk/tests/unittests/agents/test_llm_agent_callbacks.py +138 -0
- google/adk/tests/unittests/agents/test_llm_agent_fields.py +231 -0
- google/adk/tests/unittests/agents/test_loop_agent.py +136 -0
- google/adk/tests/unittests/agents/test_parallel_agent.py +92 -0
- google/adk/tests/unittests/agents/test_sequential_agent.py +114 -0
- google/adk/tests/unittests/artifacts/__init__.py +14 -0
- google/adk/tests/unittests/artifacts/test_artifact_service.py +276 -0
- google/adk/tests/unittests/auth/test_auth_handler.py +575 -0
- google/adk/tests/unittests/conftest.py +73 -0
- google/adk/tests/unittests/fast_api/__init__.py +14 -0
- google/adk/tests/unittests/fast_api/test_fast_api.py +269 -0
- google/adk/tests/unittests/flows/__init__.py +14 -0
- google/adk/tests/unittests/flows/llm_flows/__init__.py +14 -0
- google/adk/tests/unittests/flows/llm_flows/_test_examples.py +142 -0
- google/adk/tests/unittests/flows/llm_flows/test_agent_transfer.py +311 -0
- google/adk/tests/unittests/flows/llm_flows/test_functions_long_running.py +244 -0
- google/adk/tests/unittests/flows/llm_flows/test_functions_request_euc.py +346 -0
- google/adk/tests/unittests/flows/llm_flows/test_functions_sequential.py +93 -0
- google/adk/tests/unittests/flows/llm_flows/test_functions_simple.py +258 -0
- google/adk/tests/unittests/flows/llm_flows/test_identity.py +66 -0
- google/adk/tests/unittests/flows/llm_flows/test_instructions.py +164 -0
- google/adk/tests/unittests/flows/llm_flows/test_model_callbacks.py +142 -0
- google/adk/tests/unittests/flows/llm_flows/test_other_configs.py +46 -0
- google/adk/tests/unittests/flows/llm_flows/test_tool_callbacks.py +269 -0
- google/adk/tests/unittests/models/__init__.py +14 -0
- google/adk/tests/unittests/models/test_google_llm.py +224 -0
- google/adk/tests/unittests/models/test_litellm.py +804 -0
- google/adk/tests/unittests/models/test_models.py +60 -0
- google/adk/tests/unittests/sessions/__init__.py +14 -0
- google/adk/tests/unittests/sessions/test_session_service.py +227 -0
- google/adk/tests/unittests/sessions/test_vertex_ai_session_service.py +246 -0
- google/adk/tests/unittests/streaming/__init__.py +14 -0
- google/adk/tests/unittests/streaming/test_streaming.py +50 -0
- google/adk/tests/unittests/tools/__init__.py +14 -0
- google/adk/tests/unittests/tools/apihub_tool/clients/test_apihub_client.py +499 -0
- google/adk/tests/unittests/tools/apihub_tool/test_apihub_toolset.py +204 -0
- google/adk/tests/unittests/tools/application_integration_tool/clients/test_connections_client.py +600 -0
- google/adk/tests/unittests/tools/application_integration_tool/clients/test_integration_client.py +630 -0
- google/adk/tests/unittests/tools/application_integration_tool/test_application_integration_toolset.py +345 -0
- google/adk/tests/unittests/tools/google_api_tool/__init__.py +13 -0
- google/adk/tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py +657 -0
- google/adk/tests/unittests/tools/openapi_tool/auth/credential_exchangers/test_auto_auth_credential_exchanger.py +145 -0
- google/adk/tests/unittests/tools/openapi_tool/auth/credential_exchangers/test_base_auth_credential_exchanger.py +68 -0
- google/adk/tests/unittests/tools/openapi_tool/auth/credential_exchangers/test_oauth2_exchanger.py +153 -0
- google/adk/tests/unittests/tools/openapi_tool/auth/credential_exchangers/test_service_account_exchanger.py +196 -0
- google/adk/tests/unittests/tools/openapi_tool/auth/test_auth_helper.py +573 -0
- google/adk/tests/unittests/tools/openapi_tool/common/test_common.py +436 -0
- google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test.yaml +1367 -0
- google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_openapi_spec_parser.py +628 -0
- google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_openapi_toolset.py +139 -0
- google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_operation_parser.py +406 -0
- google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_rest_api_tool.py +966 -0
- google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_tool_auth_handler.py +201 -0
- google/adk/tests/unittests/tools/retrieval/__init__.py +14 -0
- google/adk/tests/unittests/tools/retrieval/test_vertex_ai_rag_retrieval.py +147 -0
- google/adk/tests/unittests/tools/test_agent_tool.py +167 -0
- google/adk/tests/unittests/tools/test_base_tool.py +141 -0
- google/adk/tests/unittests/tools/test_build_function_declaration.py +277 -0
- google/adk/tests/unittests/utils.py +304 -0
- google/adk/tools/__init__.py +51 -0
- google/adk/tools/_automatic_function_calling_util.py +346 -0
- google/adk/tools/agent_tool.py +176 -0
- google/adk/tools/apihub_tool/__init__.py +19 -0
- google/adk/tools/apihub_tool/apihub_toolset.py +209 -0
- google/adk/tools/apihub_tool/clients/__init__.py +13 -0
- google/adk/tools/apihub_tool/clients/apihub_client.py +332 -0
- google/adk/tools/apihub_tool/clients/secret_client.py +115 -0
- google/adk/tools/application_integration_tool/__init__.py +19 -0
- google/adk/tools/application_integration_tool/application_integration_toolset.py +230 -0
- google/adk/tools/application_integration_tool/clients/connections_client.py +903 -0
- google/adk/tools/application_integration_tool/clients/integration_client.py +253 -0
- google/adk/tools/base_tool.py +144 -0
- google/adk/tools/built_in_code_execution_tool.py +59 -0
- google/adk/tools/crewai_tool.py +72 -0
- google/adk/tools/example_tool.py +62 -0
- google/adk/tools/exit_loop_tool.py +23 -0
- google/adk/tools/function_parameter_parse_util.py +307 -0
- google/adk/tools/function_tool.py +87 -0
- google/adk/tools/get_user_choice_tool.py +28 -0
- google/adk/tools/google_api_tool/__init__.py +14 -0
- google/adk/tools/google_api_tool/google_api_tool.py +59 -0
- google/adk/tools/google_api_tool/google_api_tool_set.py +107 -0
- google/adk/tools/google_api_tool/google_api_tool_sets.py +55 -0
- google/adk/tools/google_api_tool/googleapi_to_openapi_converter.py +521 -0
- google/adk/tools/google_search_tool.py +68 -0
- google/adk/tools/langchain_tool.py +86 -0
- google/adk/tools/load_artifacts_tool.py +113 -0
- google/adk/tools/load_memory_tool.py +58 -0
- google/adk/tools/load_web_page.py +41 -0
- google/adk/tools/long_running_tool.py +39 -0
- google/adk/tools/mcp_tool/__init__.py +42 -0
- google/adk/tools/mcp_tool/conversion_utils.py +161 -0
- google/adk/tools/mcp_tool/mcp_tool.py +113 -0
- google/adk/tools/mcp_tool/mcp_toolset.py +272 -0
- google/adk/tools/openapi_tool/__init__.py +21 -0
- google/adk/tools/openapi_tool/auth/__init__.py +19 -0
- google/adk/tools/openapi_tool/auth/auth_helpers.py +498 -0
- google/adk/tools/openapi_tool/auth/credential_exchangers/__init__.py +25 -0
- google/adk/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.py +105 -0
- google/adk/tools/openapi_tool/auth/credential_exchangers/base_credential_exchanger.py +55 -0
- google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py +117 -0
- google/adk/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.py +97 -0
- google/adk/tools/openapi_tool/common/__init__.py +19 -0
- google/adk/tools/openapi_tool/common/common.py +300 -0
- google/adk/tools/openapi_tool/openapi_spec_parser/__init__.py +32 -0
- google/adk/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.py +231 -0
- google/adk/tools/openapi_tool/openapi_spec_parser/openapi_toolset.py +144 -0
- google/adk/tools/openapi_tool/openapi_spec_parser/operation_parser.py +260 -0
- google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py +496 -0
- google/adk/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.py +268 -0
- google/adk/tools/preload_memory_tool.py +72 -0
- google/adk/tools/retrieval/__init__.py +36 -0
- google/adk/tools/retrieval/base_retrieval_tool.py +37 -0
- google/adk/tools/retrieval/files_retrieval.py +33 -0
- google/adk/tools/retrieval/llama_index_retrieval.py +41 -0
- google/adk/tools/retrieval/vertex_ai_rag_retrieval.py +107 -0
- google/adk/tools/tool_context.py +90 -0
- google/adk/tools/toolbox_tool.py +46 -0
- google/adk/tools/transfer_to_agent_tool.py +21 -0
- google/adk/tools/vertex_ai_search_tool.py +96 -0
- google/adk/version.py +16 -0
- google_adk-0.0.3.dist-info/METADATA +73 -0
- google_adk-0.0.3.dist-info/RECORD +340 -0
- {google_adk-0.0.1.dist-info → google_adk-0.0.3.dist-info}/WHEEL +1 -2
- google_adk-0.0.3.dist-info/entry_points.txt +3 -0
- agent_kit/__init__.py +0 -0
- google_adk-0.0.1.dist-info/LICENSE.txt +0 -170
- google_adk-0.0.1.dist-info/METADATA +0 -15
- google_adk-0.0.1.dist-info/RECORD +0 -6
- google_adk-0.0.1.dist-info/top_level.txt +0 -1
@@ -0,0 +1,69 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"query": "Send an email to user user_a whose email address is alice@example.com",
|
4
|
+
"expected_tool_use": [
|
5
|
+
{
|
6
|
+
"tool_name": "send_email",
|
7
|
+
"tool_input": {
|
8
|
+
"email": "alice@example.com",
|
9
|
+
"user_id": "user_a"
|
10
|
+
}
|
11
|
+
}
|
12
|
+
],
|
13
|
+
"reference": "Email sent to alice@example.com for user id user_a."
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"query": "Can you tell me the status of my order with ID 1?",
|
17
|
+
"expected_tool_use": [
|
18
|
+
{
|
19
|
+
"tool_name": "get_order_status",
|
20
|
+
"tool_input": {
|
21
|
+
"order_id": "1"
|
22
|
+
}
|
23
|
+
}
|
24
|
+
],
|
25
|
+
"reference": "Your order with ID 1 is FINISHED."
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"query": "Cancel all pending order for the user with user id user_a",
|
29
|
+
"expected_tool_use": [
|
30
|
+
{
|
31
|
+
"tool_name": "get_order_ids_for_user",
|
32
|
+
"tool_input": {
|
33
|
+
"user_id": "user_a"
|
34
|
+
}
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"tool_name": "get_order_status",
|
38
|
+
"tool_input": {
|
39
|
+
"order_id": "1"
|
40
|
+
}
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"tool_name": "get_order_status",
|
44
|
+
"tool_input": {
|
45
|
+
"order_id": "4"
|
46
|
+
}
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"tool_name": "cancel_order",
|
50
|
+
"tool_input": {
|
51
|
+
"order_id": "4"
|
52
|
+
}
|
53
|
+
}
|
54
|
+
],
|
55
|
+
"reference": "I have checked your orders and order 4 was in pending status, so I have cancelled it. Order 1 was already finished and couldn't be cancelled.\n"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"query": "What orders have I placed under the username user_b?",
|
59
|
+
"expected_tool_use": [
|
60
|
+
{
|
61
|
+
"tool_name": "get_order_ids_for_user",
|
62
|
+
"tool_input": {
|
63
|
+
"user_id": "user_b"
|
64
|
+
}
|
65
|
+
}
|
66
|
+
],
|
67
|
+
"reference": "User user_b has placed one order with order ID 2.\n"
|
68
|
+
}
|
69
|
+
]
|
@@ -0,0 +1,15 @@
|
|
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 . import agent
|
@@ -0,0 +1,182 @@
|
|
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 google.adk import Agent
|
16
|
+
from google.genai import types
|
17
|
+
|
18
|
+
research_plan_agent = Agent(
|
19
|
+
model="gemini-1.5-flash",
|
20
|
+
name="research_plan_agent",
|
21
|
+
description="I can help generate research plan.",
|
22
|
+
instruction="""\
|
23
|
+
Your task is to create a research plan according to the user's query.
|
24
|
+
|
25
|
+
# Here are the instructions for creating the research plan:
|
26
|
+
|
27
|
+
+ Focus on finding specific things, e.g. products, data, etc.
|
28
|
+
+ Have the personality of a work colleague that is very helpful and explains things very nicely.
|
29
|
+
+ Don't mention your name unless you are asked.
|
30
|
+
+ Think about the most common things that you would need to research.
|
31
|
+
+ Think about possible answers when creating the plan.
|
32
|
+
+ Your task is to create the sections that should be researched. You will output high level headers, preceded by ##
|
33
|
+
+ Underneath each header, write a short sentence on what we want to find there.
|
34
|
+
+ The headers will follow the logical analysis pattern, as well as logical exploration pattern.
|
35
|
+
+ The headers should be a statement, not be in the form of questions.
|
36
|
+
+ The header will not include roman numerals or anything of the sort, e.g. ":", etc
|
37
|
+
+ Do not include things that you cannot possibly know about from using Google Search: e.g. sales forecasting, competitors, profitability analysis, etc.
|
38
|
+
+ Do not have an executive summary
|
39
|
+
+ In each section describe specifically what will be researched.
|
40
|
+
+ Never use "we will", but rather "I will".
|
41
|
+
+ Don't ask for clarifications from the user.
|
42
|
+
+ Do not ask the user for clarifications or if they have any other questions.
|
43
|
+
+ All headers should be bolded.
|
44
|
+
+ If you have steps in the plan that depend on other information, make sure they are 2 diferent sections in the plan.
|
45
|
+
+ At the end mention that you will start researching.
|
46
|
+
|
47
|
+
# Instruction on replying format
|
48
|
+
|
49
|
+
+ Start with your name as "[research_plan_agent]: ".
|
50
|
+
+ Output the content you want to say.
|
51
|
+
|
52
|
+
Output summary:
|
53
|
+
""",
|
54
|
+
flow="single",
|
55
|
+
sub_agents=[],
|
56
|
+
generate_content_config=types.GenerateContentConfig(
|
57
|
+
temperature=0.1,
|
58
|
+
),
|
59
|
+
)
|
60
|
+
|
61
|
+
|
62
|
+
question_generation_agent = Agent(
|
63
|
+
model="gemini-1.5-flash",
|
64
|
+
name="question_generation_agent",
|
65
|
+
description="I can help generate questions related to user's question.",
|
66
|
+
instruction="""\
|
67
|
+
Generate questions related to the research plan generated by research_plan_agent.
|
68
|
+
|
69
|
+
# Instruction on replying format
|
70
|
+
|
71
|
+
Your reply should be a numbered lsit.
|
72
|
+
|
73
|
+
For each question, reply in the following format: "[question_generation_agent]: [generated questions]"
|
74
|
+
|
75
|
+
Here is an example of the generated question list:
|
76
|
+
|
77
|
+
1. [question_generation_agent]: which state is San Jose in?
|
78
|
+
2. [question_generation_agent]: how google website is designed?
|
79
|
+
""",
|
80
|
+
flow="single",
|
81
|
+
sub_agents=[],
|
82
|
+
generate_content_config=types.GenerateContentConfig(
|
83
|
+
temperature=0.1,
|
84
|
+
),
|
85
|
+
)
|
86
|
+
|
87
|
+
information_retrieval_agent = Agent(
|
88
|
+
model="gemini-1.5-flash",
|
89
|
+
name="information_retrieval_agent",
|
90
|
+
description=(
|
91
|
+
"I can help retrieve information related to question_generation_agent's"
|
92
|
+
" question."
|
93
|
+
),
|
94
|
+
instruction="""\
|
95
|
+
Inspect all the questions after "[question_generation_agent]: " and asnwer them.
|
96
|
+
|
97
|
+
# Instruction on replying format
|
98
|
+
|
99
|
+
Always start with "[information_retrieval_agent]: "
|
100
|
+
|
101
|
+
For the answer of one question:
|
102
|
+
|
103
|
+
- Start with a title with one line summary of the reply.
|
104
|
+
- The title line should be bolded and starts with No.x of the corresponding question.
|
105
|
+
- Have a paragraph of detailed explain.
|
106
|
+
|
107
|
+
# Instruction on exiting the loop
|
108
|
+
|
109
|
+
- If you see there are less than 20 questions by "question_generation_agent", do not say "[exit]".
|
110
|
+
- If you see there are already great or equal to 20 questions asked by "question_generation_agent", say "[exit]" at last to exit the loop.
|
111
|
+
""",
|
112
|
+
flow="single",
|
113
|
+
sub_agents=[],
|
114
|
+
generate_content_config=types.GenerateContentConfig(
|
115
|
+
temperature=0.1,
|
116
|
+
),
|
117
|
+
)
|
118
|
+
|
119
|
+
question_sources_generation_agent = Agent(
|
120
|
+
model="gemini-1.5-flash",
|
121
|
+
name="question_sources_generation_agent",
|
122
|
+
description=(
|
123
|
+
"I can help generate questions and retrieve related information."
|
124
|
+
),
|
125
|
+
instruction="Generate questions and retrieve information.",
|
126
|
+
flow="loop",
|
127
|
+
sub_agents=[
|
128
|
+
question_generation_agent,
|
129
|
+
information_retrieval_agent,
|
130
|
+
],
|
131
|
+
generate_content_config=types.GenerateContentConfig(
|
132
|
+
temperature=0.1,
|
133
|
+
),
|
134
|
+
)
|
135
|
+
|
136
|
+
summary_agent = Agent(
|
137
|
+
model="gemini-1.5-flash",
|
138
|
+
name="summary_agent",
|
139
|
+
description="I can help summarize information of previous content.",
|
140
|
+
instruction="""\
|
141
|
+
Summarize information in all historical messages that were replied by "question_generation_agent" and "information_retrieval_agent".
|
142
|
+
|
143
|
+
# Instruction on replying format
|
144
|
+
|
145
|
+
- The output should be like an essay that has a title, an abstract, multiple paragraphs for each topic and a conclusion.
|
146
|
+
- Each paragraph should maps to one or more question in historical content.
|
147
|
+
""",
|
148
|
+
flow="single",
|
149
|
+
generate_content_config=types.GenerateContentConfig(
|
150
|
+
temperature=0.8,
|
151
|
+
),
|
152
|
+
)
|
153
|
+
|
154
|
+
research_assistant = Agent(
|
155
|
+
model="gemini-1.5-flash",
|
156
|
+
name="research_assistant",
|
157
|
+
description="I can help with research question.",
|
158
|
+
instruction="Help customers with their need.",
|
159
|
+
flow="sequential",
|
160
|
+
sub_agents=[
|
161
|
+
research_plan_agent,
|
162
|
+
question_sources_generation_agent,
|
163
|
+
summary_agent,
|
164
|
+
],
|
165
|
+
generate_content_config=types.GenerateContentConfig(
|
166
|
+
temperature=0.1,
|
167
|
+
),
|
168
|
+
)
|
169
|
+
|
170
|
+
spark_agent = Agent(
|
171
|
+
model="gemini-1.5-flash",
|
172
|
+
name="spark_assistant",
|
173
|
+
description="I can help with non-research question.",
|
174
|
+
instruction="Help customers with their need.",
|
175
|
+
flow="auto",
|
176
|
+
sub_agents=[research_assistant],
|
177
|
+
generate_content_config=types.GenerateContentConfig(
|
178
|
+
temperature=0.1,
|
179
|
+
),
|
180
|
+
)
|
181
|
+
|
182
|
+
root_agent = spark_agent
|
@@ -0,0 +1,190 @@
|
|
1
|
+
{
|
2
|
+
"id": "683bcc98-7359-4b65-9cdb-307f85ae62c0",
|
3
|
+
"context": {
|
4
|
+
"_time": "2024-12-15 11:52:21.958542"
|
5
|
+
},
|
6
|
+
"events": [
|
7
|
+
{
|
8
|
+
"invocation_id": "UfYAgiCT",
|
9
|
+
"author": "user",
|
10
|
+
"content": {
|
11
|
+
"parts": [
|
12
|
+
{
|
13
|
+
"text": "Research on the factors that affect floods in Florida. "
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"role": "user"
|
17
|
+
},
|
18
|
+
"options": {},
|
19
|
+
"is_greeting": false,
|
20
|
+
"id": "qKEz3Vss",
|
21
|
+
"timestamp": 1734292270.899412
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"invocation_id": "UfYAgiCT",
|
25
|
+
"author": "spark_assistant",
|
26
|
+
"content": {
|
27
|
+
"parts": [
|
28
|
+
{
|
29
|
+
"function_call": {
|
30
|
+
"args": {
|
31
|
+
"agent_name": "research_assistant"
|
32
|
+
},
|
33
|
+
"name": "transfer_to_other_agent"
|
34
|
+
}
|
35
|
+
}
|
36
|
+
],
|
37
|
+
"role": "model"
|
38
|
+
},
|
39
|
+
"options": {},
|
40
|
+
"is_greeting": false,
|
41
|
+
"id": "MEQQWBGe",
|
42
|
+
"timestamp": 1734292272.522898
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"invocation_id": "UfYAgiCT",
|
46
|
+
"author": "spark_assistant",
|
47
|
+
"content": {
|
48
|
+
"parts": [
|
49
|
+
{
|
50
|
+
"function_response": {
|
51
|
+
"name": "transfer_to_other_agent",
|
52
|
+
"response": {
|
53
|
+
"status": "ok",
|
54
|
+
"target_agent_name": "research_assistant",
|
55
|
+
"message": "Transfered to research_assistant"
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
],
|
60
|
+
"role": "user"
|
61
|
+
},
|
62
|
+
"options": {
|
63
|
+
"skip_summarization": true,
|
64
|
+
"function_call_event_id": "MEQQWBGe"
|
65
|
+
},
|
66
|
+
"is_greeting": false,
|
67
|
+
"id": "QjLptHaG",
|
68
|
+
"timestamp": 1734292272.524573
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"invocation_id": "UfYAgiCT",
|
72
|
+
"author": "research_plan_agent",
|
73
|
+
"content": {
|
74
|
+
"parts": [
|
75
|
+
{
|
76
|
+
"text": "[research_plan_agent]: I can help you with that! Here is a research plan for the factors that affect floods in Florida:\n\n**Factors that affect floods in Florida**\nI will research the factors that affect floods in Florida, such as rainfall, sea level rise, and urbanization.\n\n**Rainfall in Florida**\nI will research the average rainfall in Florida, as well as the frequency and intensity of rainfall events.\n\n**Sea Level Rise in Florida**\nI will research the rate of sea level rise in Florida, as well as the impact of sea level rise on flooding.\n\n**Urbanization in Florida**\nI will research the impact of urbanization on flooding in Florida, such as the effects of impervious surfaces and drainage systems.\n\n**Flood History in Florida**\nI will research the history of floods in Florida, including the frequency, severity, and causes of past floods.\n\n**Flood Mitigation Efforts in Florida**\nI will research the flood mitigation efforts that are currently in place in Florida, as well as the effectiveness of these efforts.\n\nI will start researching now. \n"
|
77
|
+
}
|
78
|
+
],
|
79
|
+
"role": "model"
|
80
|
+
},
|
81
|
+
"options": {},
|
82
|
+
"is_greeting": false,
|
83
|
+
"id": "NcWJjpm9",
|
84
|
+
"timestamp": 1734292274.707415
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"invocation_id": "UfYAgiCT",
|
88
|
+
"author": "question_generation_agent",
|
89
|
+
"content": {
|
90
|
+
"parts": [
|
91
|
+
{
|
92
|
+
"text": "1. [question_generation_agent]: What are the specific types of rainfall events that contribute to flooding in Florida?\n2. [question_generation_agent]: How does the rate of sea level rise in Florida compare to the global average?\n3. [question_generation_agent]: What are the specific ways that urbanization in Florida contributes to increased flooding?\n4. [question_generation_agent]: Are there any specific regions in Florida that are particularly vulnerable to flooding?\n5. [question_generation_agent]: What are the most significant flood events in Florida's history, and what were their causes?\n6. [question_generation_agent]: What are the different types of flood mitigation efforts currently in place in Florida?\n7. [question_generation_agent]: How effective have these flood mitigation efforts been in reducing flood risk in Florida?\n8. [question_generation_agent]: What are the potential future impacts of climate change on flooding in Florida?\n9. [question_generation_agent]: What are the economic and social consequences of flooding in Florida?\n10. [question_generation_agent]: What are the recommendations for improving flood mitigation efforts in Florida? \n"
|
93
|
+
}
|
94
|
+
],
|
95
|
+
"role": "model"
|
96
|
+
},
|
97
|
+
"options": {},
|
98
|
+
"is_greeting": false,
|
99
|
+
"id": "9DZFuhg7",
|
100
|
+
"timestamp": 1734292277.283785
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"invocation_id": "UfYAgiCT",
|
104
|
+
"author": "information_retrieval_agent",
|
105
|
+
"content": {
|
106
|
+
"parts": [
|
107
|
+
{
|
108
|
+
"text": "[information_retrieval_agent]: **No. 1: Types of Rainfall Events Contributing to Flooding in Florida**\n\nFlorida experiences various types of rainfall events that contribute to flooding. These include:\n\n* **Tropical Storms and Hurricanes:** These storms bring heavy rainfall over extended periods, often exceeding the capacity of drainage systems and leading to widespread flooding.\n* **Thunderstorms:** While less intense than hurricanes, thunderstorms can produce heavy downpours in a short time, causing localized flooding, especially in urban areas with limited drainage.\n* **Frontal Systems:** Cold fronts moving across Florida can bring significant rainfall, particularly during the winter months, leading to flooding in low-lying areas.\n* **El Niño-Southern Oscillation (ENSO):** This climate pattern can influence rainfall patterns in Florida, with El Niño years often associated with increased rainfall and flooding.\n\n[information_retrieval_agent]: **No. 2: Sea Level Rise Rate in Florida Compared to Global Average**\n\nFlorida's sea level rise rate is significantly higher than the global average. While the global average sea level rise is about 3.4 millimeters per year, Florida's rate is estimated to be around 9 millimeters per year. This accelerated rate is attributed to factors such as land subsidence and the Gulf Stream's influence.\n\n[information_retrieval_agent]: **No. 3: Urbanization's Impact on Flooding in Florida**\n\nUrbanization in Florida contributes to increased flooding through several mechanisms:\n\n* **Impervious Surfaces:** Concrete and asphalt surfaces in urban areas reduce infiltration, forcing rainwater to run off into drainage systems, which can become overwhelmed during heavy rainfall.\n* **Modified Drainage Patterns:** Urban development often alters natural drainage patterns, leading to concentrated runoff and increased flood risk in certain areas.\n* **Increased Runoff Velocity:** Urban surfaces accelerate runoff, increasing the volume and speed of water flowing into drainage systems, potentially exceeding their capacity.\n\n[information_retrieval_agent]: **No. 4: Regions in Florida Particularly Vulnerable to Flooding**\n\nSeveral regions in Florida are particularly vulnerable to flooding due to their geographic characteristics and exposure to various flood risks:\n\n* **Coastal Areas:** Coastal areas are susceptible to storm surge, sea level rise, and coastal erosion, increasing their vulnerability to flooding.\n* **Low-Lying Areas:** Areas with low elevation are prone to flooding from heavy rainfall and rising sea levels.\n* **Urban Areas:** Urban areas with limited drainage capacity and high concentrations of impervious surfaces are at risk of flooding during heavy rainfall events.\n\n[information_retrieval_agent]: **No. 5: Significant Flood Events in Florida's History**\n\nFlorida has experienced numerous significant flood events throughout its history, with some notable examples:\n\n* **Hurricane Andrew (1992):** This Category 5 hurricane caused widespread flooding in South Florida, primarily due to storm surge and heavy rainfall.\n* **Hurricane Irma (2017):** This Category 4 hurricane brought significant rainfall and storm surge, leading to extensive flooding across the state.\n* **Hurricane Michael (2018):** This Category 5 hurricane caused significant flooding in the Panhandle region, primarily due to heavy rainfall and storm surge.\n\n[information_retrieval_agent]: **No. 6: Flood Mitigation Efforts in Florida**\n\nFlorida has implemented various flood mitigation efforts to reduce flood risk and protect communities:\n\n* **Levees and Seawalls:** These structures are designed to protect coastal areas from storm surge and rising sea levels.\n* **Drainage Systems:** Drainage systems are designed to collect and remove excess rainwater, reducing the risk of flooding in urban areas.\n* **Floodplain Management:** Regulations are in place to restrict development in floodplains, minimizing the risk of damage and loss of life.\n* **Early Warning Systems:** Advanced weather forecasting and warning systems provide timely alerts to residents, allowing them to prepare for potential flooding.\n\n[information_retrieval_agent]: **No. 7: Effectiveness of Flood Mitigation Efforts in Florida**\n\nThe effectiveness of flood mitigation efforts in Florida varies depending on the specific measures implemented and the severity of the flood event. While some efforts have been successful in reducing flood risk, others have proven less effective, particularly in the face of extreme weather events.\n\n[information_retrieval_agent]: **No. 8: Potential Future Impacts of Climate Change on Flooding in Florida**\n\nClimate change is expected to exacerbate flooding in Florida through several mechanisms:\n\n* **Increased Rainfall Intensity:** Climate change is projected to increase the frequency and intensity of rainfall events, leading to more frequent and severe flooding.\n* **Sea Level Rise:** Continued sea level rise will increase the risk of coastal flooding, particularly during storm surge events.\n* **Ocean Warming:** Warmer ocean temperatures can lead to more intense hurricanes, further increasing the risk of flooding.\n\n[information_retrieval_agent]: **No. 9: Economic and Social Consequences of Flooding in Florida**\n\nFlooding in Florida has significant economic and social consequences:\n\n* **Property Damage:** Flooding can cause extensive damage to homes, businesses, and infrastructure, resulting in substantial financial losses.\n* **Disruption of Transportation:** Flooding can disrupt transportation systems, including roads, bridges, and airports, leading to economic losses and social disruption.\n* **Health Risks:** Flooding can create health risks, such as waterborne diseases and injuries from debris.\n* **Displacement of Residents:** Flooding can force residents to evacuate their homes, leading to displacement and social disruption.\n\n[information_retrieval_agent]: **No. 10: Recommendations for Improving Flood Mitigation Efforts in Florida**\n\nTo improve flood mitigation efforts in Florida, several recommendations can be considered:\n\n* **Invest in Infrastructure:** Increased investment in drainage systems, levees, and seawalls is crucial to enhance flood protection.\n* **Promote Sustainable Development:** Encourage development practices that minimize impervious surfaces and preserve natural drainage patterns.\n* **Strengthen Early Warning Systems:** Enhance weather forecasting and warning systems to provide timely and accurate alerts to residents.\n* **Implement Comprehensive Floodplain Management:** Enforce strict regulations to restrict development in floodplains and minimize flood risk.\n* **Promote Public Awareness:** Educate residents about flood risks and encourage them to take steps to prepare for potential flooding.\n\n[exit] \n"
|
109
|
+
}
|
110
|
+
],
|
111
|
+
"role": "model"
|
112
|
+
},
|
113
|
+
"options": {},
|
114
|
+
"is_greeting": false,
|
115
|
+
"id": "o11CKE8Q",
|
116
|
+
"timestamp": 1734292284.446259
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"invocation_id": "UfYAgiCT",
|
120
|
+
"author": "summary_agent",
|
121
|
+
"content": {
|
122
|
+
"parts": [
|
123
|
+
{
|
124
|
+
"text": "## Flooding in Florida: A Comprehensive Analysis of Causes, Impacts, and Mitigation Strategies\n\n**Abstract:** This essay explores the complex issue of flooding in Florida, a state highly vulnerable to various flood threats. It examines the key factors contributing to flooding, including rainfall patterns, sea level rise, and urbanization, and analyzes their historical impact. Furthermore, it evaluates the effectiveness of existing flood mitigation efforts and explores recommendations for future improvements. \n\n**Rainfall Patterns and Flood Risk:**\n\nFlorida's climate is characterized by frequent and intense rainfall events, significantly contributing to flood risk. Tropical storms and hurricanes, particularly during the hurricane season, bring heavy rainfall over prolonged periods, overwhelming drainage systems and causing widespread flooding. Thunderstorms, though less intense, can generate heavy downpours in short bursts, leading to localized flooding, especially in urban areas. Furthermore, frontal systems, particularly during winter months, can bring substantial rainfall, exacerbating flooding in low-lying areas. El Niño-Southern Oscillation (ENSO) events can also influence rainfall patterns, with El Niño years often associated with increased rainfall and subsequent flooding.\n\n**Sea Level Rise and Coastal Flooding:**\n\nFlorida's sea level rise rate surpasses the global average, posing a significant threat to coastal areas. The rate of sea level rise in Florida is estimated to be around 9 millimeters per year, compared to the global average of 3.4 millimeters per year. This accelerated rise is attributed to factors such as land subsidence and the Gulf Stream's influence. As sea levels continue to rise, coastal areas face an increased risk of flooding, particularly during storm surge events, leading to erosion, saltwater intrusion, and potential displacement of coastal communities. \n\n**Urbanization and Flood Risk:**\n\nUrbanization in Florida, while contributing to economic growth, also exacerbates flood risk. The increasing development of impervious surfaces, such as concrete and asphalt, reduces rainwater infiltration, forcing excess water to flow into drainage systems. This can overwhelm the capacity of drainage systems, leading to flooding in urban areas. Furthermore, urban development often alters natural drainage patterns, diverting water flow and increasing flooding risks in specific locations. Finally, urban surfaces accelerate runoff velocity, increasing the volume and speed of water entering drainage systems, further enhancing the risk of flooding.\n\n**Historical Flood Events and Their Impact:**\n\nFlorida has experienced numerous significant flood events throughout its history, highlighting the state's vulnerability. Hurricane Andrew in 1992, a Category 5 hurricane, caused widespread flooding in South Florida, primarily due to storm surge and heavy rainfall. Hurricane Irma in 2017, a Category 4 hurricane, brought significant rainfall and storm surge, leading to extensive flooding across the state. Hurricane Michael in 2018, a Category 5 hurricane, caused substantial flooding in the Panhandle region, primarily due to heavy rainfall and storm surge. These events demonstrate the devastating impact of flooding on infrastructure, property, and human lives. \n\n**Flood Mitigation Efforts and Their Effectiveness:**\n\nFlorida has implemented various flood mitigation efforts to reduce flood risk and protect communities. These efforts include construction of levees and seawalls to protect coastal areas from storm surge and rising sea levels, construction of drainage systems to collect and remove excess rainwater, implementation of floodplain management regulations to restrict development in floodplains, and development of early warning systems to provide timely alerts to residents. While these efforts have contributed to reducing flood risk in some areas, their effectiveness varies depending on the severity of the flood event. Extreme weather events, such as hurricanes, can overwhelm existing infrastructure and mitigation measures, highlighting the need for continuous improvement and adaptation.\n\n**Future Impacts of Climate Change on Flooding:**\n\nClimate change is expected to exacerbate flooding in Florida, posing significant challenges for the state's future. Increased rainfall intensity, driven by climate change, is projected to lead to more frequent and severe flooding events. Continued sea level rise will further increase the risk of coastal flooding, especially during storm surge events. Ocean warming, a consequence of climate change, can contribute to more intense hurricanes, further amplifying flood risk. These compounding factors necessitate proactive measures to adapt to changing climate conditions and mitigate future flood risks. \n\n**Economic and Social Consequences of Flooding:**\n\nFlooding in Florida carries significant economic and social consequences. Property damage from flooding can be extensive, resulting in substantial financial losses for individuals, businesses, and the state. Flooding disrupts transportation systems, including roads, bridges, and airports, causing economic losses and social disruption. Flooding can also create health risks, such as waterborne diseases and injuries from debris. Furthermore, displacement of residents due to flooding can lead to social disruption and strain on existing resources. The economic and social costs of flooding underscore the importance of effective flood mitigation and adaptation strategies.\n\n**Recommendations for Improving Flood Mitigation Efforts:**\n\nTo improve flood mitigation efforts in Florida and address the challenges posed by climate change, several recommendations are crucial. Increased investment in infrastructure, including drainage systems, levees, and seawalls, is essential to enhance flood protection. Promoting sustainable development practices, such as minimizing impervious surfaces and preserving natural drainage patterns, can reduce runoff and mitigate flood risk. Strengthening early warning systems to provide timely and accurate alerts to residents is crucial for preparedness and response. Implementing comprehensive floodplain management regulations to restrict development in floodplains and minimize flood risk is essential. Finally, promoting public awareness about flood risks and encouraging residents to take steps to prepare for potential flooding is vital for community resilience.\n\n**Conclusion:**\n\nFlooding in Florida is a complex issue with multifaceted causes, impacts, and mitigation strategies. Rainfall patterns, sea level rise, and urbanization all contribute to flood risk, while historical events highlight the state's vulnerability. Existing flood mitigation efforts, while valuable, need continuous improvement and adaptation to address the challenges posed by climate change. Investing in infrastructure, promoting sustainable development, strengthening early warning systems, implementing comprehensive floodplain management, and fostering public awareness are key recommendations for enhancing flood resilience and safeguarding Florida's communities from the devastating impacts of flooding. \n"
|
125
|
+
}
|
126
|
+
],
|
127
|
+
"role": "model"
|
128
|
+
},
|
129
|
+
"options": {},
|
130
|
+
"is_greeting": false,
|
131
|
+
"id": "om1YdTV1",
|
132
|
+
"timestamp": 1734292291.449593
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"invocation_id": "UfYAgiCT",
|
136
|
+
"author": "spark_assistant",
|
137
|
+
"content": {
|
138
|
+
"parts": [
|
139
|
+
{
|
140
|
+
"function_call": {
|
141
|
+
"args": {
|
142
|
+
"agent_name": "spark_assistant"
|
143
|
+
},
|
144
|
+
"name": "transfer_to_other_agent"
|
145
|
+
}
|
146
|
+
}
|
147
|
+
],
|
148
|
+
"role": "model"
|
149
|
+
},
|
150
|
+
"options": {
|
151
|
+
"skip_summarization": true
|
152
|
+
},
|
153
|
+
"is_greeting": false,
|
154
|
+
"id": "oRxzw1Wp",
|
155
|
+
"timestamp": 1734292291.451956
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"invocation_id": "UfYAgiCT",
|
159
|
+
"author": "spark_assistant",
|
160
|
+
"content": {
|
161
|
+
"parts": [
|
162
|
+
{
|
163
|
+
"function_response": {
|
164
|
+
"name": "transfer_to_other_agent",
|
165
|
+
"response": {
|
166
|
+
"status": "ok",
|
167
|
+
"target_agent_name": "spark_assistant",
|
168
|
+
"message": "Transfered to spark_assistant"
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
],
|
173
|
+
"role": "user"
|
174
|
+
},
|
175
|
+
"options": {
|
176
|
+
"skip_summarization": true,
|
177
|
+
"function_call_event_id": "oRxzw1Wp"
|
178
|
+
},
|
179
|
+
"is_greeting": false,
|
180
|
+
"id": "s2OiE3PP",
|
181
|
+
"timestamp": 1734292291.453157
|
182
|
+
}
|
183
|
+
],
|
184
|
+
"past_events": [],
|
185
|
+
"current_agent_name": "spark_assistant",
|
186
|
+
"pending_events": {},
|
187
|
+
"artifacts": {},
|
188
|
+
"last_update_time": 1734292291.453157,
|
189
|
+
"event_logs": []
|
190
|
+
}
|
@@ -0,0 +1,15 @@
|
|
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 . import agent
|
@@ -0,0 +1,95 @@
|
|
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
|
+
# Hello world agent from agent 1.0 - https://colab.sandbox.google.com/drive/1Zq-nqmgK0nCERCv8jKIaoeTTgbNn6oSo?resourcekey=0-GYaz9pFT4wY8CI8Cvjy5GA#scrollTo=u3X3XwDOaCv9
|
16
|
+
import random
|
17
|
+
|
18
|
+
from google.adk import Agent
|
19
|
+
from google.genai import types
|
20
|
+
|
21
|
+
|
22
|
+
def roll_die(sides: int) -> int:
|
23
|
+
"""Roll a die and return the rolled result.
|
24
|
+
|
25
|
+
Args:
|
26
|
+
sides: The integer number of sides the die has.
|
27
|
+
|
28
|
+
Returns:
|
29
|
+
An integer of the result of rolling the die.
|
30
|
+
"""
|
31
|
+
return random.randint(1, sides)
|
32
|
+
|
33
|
+
|
34
|
+
def check_prime(nums: list[int]) -> list[str]:
|
35
|
+
"""Check if a given list of numbers are prime.
|
36
|
+
|
37
|
+
Args:
|
38
|
+
nums: The list of numbers to check.
|
39
|
+
|
40
|
+
Returns:
|
41
|
+
A str indicating which number is prime.
|
42
|
+
"""
|
43
|
+
primes = set()
|
44
|
+
for number in nums:
|
45
|
+
number = int(number)
|
46
|
+
if number <= 1:
|
47
|
+
continue
|
48
|
+
is_prime = True
|
49
|
+
for i in range(2, int(number**0.5) + 1):
|
50
|
+
if number % i == 0:
|
51
|
+
is_prime = False
|
52
|
+
break
|
53
|
+
if is_prime:
|
54
|
+
primes.add(number)
|
55
|
+
return (
|
56
|
+
'No prime numbers found.'
|
57
|
+
if not primes
|
58
|
+
else f"{', '.join(str(num) for num in primes)} are prime numbers."
|
59
|
+
)
|
60
|
+
|
61
|
+
|
62
|
+
root_agent = Agent(
|
63
|
+
model='gemini-2.0-flash-001',
|
64
|
+
name='data_processing_agent',
|
65
|
+
instruction="""
|
66
|
+
You roll dice and answer questions about the outcome of the dice rolls.
|
67
|
+
You can roll dice of different sizes.
|
68
|
+
You can use multiple tools in parallel by calling functions in parallel(in one request and in one round).
|
69
|
+
The only things you do are roll dice for the user and discuss the outcomes.
|
70
|
+
It is ok to discuss previous dice roles, and comment on the dice rolls.
|
71
|
+
When you are asked to roll a die, you must call the roll_die tool with the number of sides. Be sure to pass in an integer. Do not pass in a string.
|
72
|
+
You should never roll a die on your own.
|
73
|
+
When checking prime numbers, call the check_prime tool with a list of integers. Be sure to pass in a list of integers. You should never pass in a string.
|
74
|
+
You should not check prime numbers before calling the tool.
|
75
|
+
When you are asked to roll a die and check prime numbers, you should always make the following two function calls:
|
76
|
+
1. You should first call the roll_die tool to get a roll. Wait for the function response before calling the check_prime tool.
|
77
|
+
2. After you get the function response from roll_die tool, you should call the check_prime tool with the roll_die result.
|
78
|
+
2.1 If user asks you to check primes based on previous rolls, make sure you include the previous rolls in the list.
|
79
|
+
3. When you respond, you must include the roll_die result from step 1.
|
80
|
+
You should always perform the previous 3 steps when asking for a roll and checking prime numbers.
|
81
|
+
You should not rely on the previous history on prime results.
|
82
|
+
""",
|
83
|
+
tools=[
|
84
|
+
roll_die,
|
85
|
+
check_prime,
|
86
|
+
],
|
87
|
+
generate_content_config=types.GenerateContentConfig(
|
88
|
+
safety_settings=[
|
89
|
+
types.SafetySetting( # avoid false alarm about rolling dice.
|
90
|
+
category=types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
|
91
|
+
threshold=types.HarmBlockThreshold.OFF,
|
92
|
+
),
|
93
|
+
]
|
94
|
+
),
|
95
|
+
)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"query": "Hi who are you?",
|
4
|
+
"expected_tool_use": [],
|
5
|
+
"reference": "I am a data processing agent. I can roll dice and check if the results are prime numbers. What would you like me to do? \n"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"query": "What can you do?",
|
9
|
+
"expected_tool_use": [],
|
10
|
+
"reference": "I can roll dice for you of different sizes, and I can check if the results are prime numbers. I can also remember previous rolls if you'd like to check those for primes as well. What would you like me to do? \n"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"query": "Can you roll a die with 6 sides",
|
14
|
+
"expected_tool_use": [
|
15
|
+
{
|
16
|
+
"tool_name": "roll_die",
|
17
|
+
"tool_input": {
|
18
|
+
"sides": 6
|
19
|
+
}
|
20
|
+
}
|
21
|
+
],
|
22
|
+
"reference": null
|
23
|
+
}
|
24
|
+
]
|
@@ -0,0 +1,15 @@
|
|
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 . import agent
|