google-adk 0.0.2__py3-none-any.whl → 0.0.4__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 (153) hide show
  1. google/adk/agents/run_config.py +4 -0
  2. google/adk/auth/auth_preprocessor.py +19 -16
  3. google/adk/cli/agent_graph.py +31 -5
  4. google/adk/cli/browser/index.html +1 -1
  5. google/adk/cli/browser/{main-XUU6OGCC.js → main-CU22TRPI.js} +30 -30
  6. google/adk/cli/cli.py +8 -8
  7. google/adk/cli/cli_deploy.py +2 -4
  8. google/adk/cli/cli_tools_click.py +57 -12
  9. google/adk/cli/fast_api.py +19 -9
  10. google/adk/flows/llm_flows/contents.py +21 -1
  11. google/adk/flows/llm_flows/functions.py +3 -1
  12. google/adk/models/google_llm.py +0 -1
  13. google/adk/runners.py +13 -2
  14. google/adk/version.py +1 -1
  15. {google_adk-0.0.2.dist-info → google_adk-0.0.4.dist-info}/METADATA +4 -2
  16. google_adk-0.0.4.dist-info/RECORD +175 -0
  17. {google_adk-0.0.2.dist-info → google_adk-0.0.4.dist-info}/WHEEL +1 -1
  18. google/adk/cli/media_streamer/__init__.py +0 -19
  19. google/adk/cli/media_streamer/index.html +0 -228
  20. google/adk/tests/__init__.py +0 -14
  21. google/adk/tests/integration/.env.example +0 -10
  22. google/adk/tests/integration/__init__.py +0 -18
  23. google/adk/tests/integration/conftest.py +0 -119
  24. google/adk/tests/integration/fixture/__init__.py +0 -14
  25. google/adk/tests/integration/fixture/agent_with_config/__init__.py +0 -15
  26. google/adk/tests/integration/fixture/agent_with_config/agent.py +0 -88
  27. google/adk/tests/integration/fixture/callback_agent/__init__.py +0 -15
  28. google/adk/tests/integration/fixture/callback_agent/agent.py +0 -105
  29. google/adk/tests/integration/fixture/context_update_test/OWNERS +0 -1
  30. google/adk/tests/integration/fixture/context_update_test/__init__.py +0 -15
  31. google/adk/tests/integration/fixture/context_update_test/agent.py +0 -43
  32. google/adk/tests/integration/fixture/context_update_test/successful_test.session.json +0 -582
  33. google/adk/tests/integration/fixture/context_variable_agent/__init__.py +0 -15
  34. google/adk/tests/integration/fixture/context_variable_agent/agent.py +0 -115
  35. google/adk/tests/integration/fixture/customer_support_ma/__init__.py +0 -15
  36. google/adk/tests/integration/fixture/customer_support_ma/agent.py +0 -172
  37. google/adk/tests/integration/fixture/ecommerce_customer_service_agent/__init__.py +0 -15
  38. google/adk/tests/integration/fixture/ecommerce_customer_service_agent/agent.py +0 -338
  39. google/adk/tests/integration/fixture/ecommerce_customer_service_agent/order_query.test.json +0 -69
  40. google/adk/tests/integration/fixture/ecommerce_customer_service_agent/test_config.json +0 -6
  41. google/adk/tests/integration/fixture/flow_complex_spark/__init__.py +0 -15
  42. google/adk/tests/integration/fixture/flow_complex_spark/agent.py +0 -182
  43. google/adk/tests/integration/fixture/flow_complex_spark/sample.debug.log +0 -243
  44. google/adk/tests/integration/fixture/flow_complex_spark/sample.session.json +0 -190
  45. google/adk/tests/integration/fixture/hello_world_agent/__init__.py +0 -15
  46. google/adk/tests/integration/fixture/hello_world_agent/agent.py +0 -95
  47. google/adk/tests/integration/fixture/hello_world_agent/roll_die.test.json +0 -24
  48. google/adk/tests/integration/fixture/hello_world_agent/test_config.json +0 -6
  49. google/adk/tests/integration/fixture/home_automation_agent/__init__.py +0 -15
  50. google/adk/tests/integration/fixture/home_automation_agent/agent.py +0 -304
  51. google/adk/tests/integration/fixture/home_automation_agent/simple_test.test.json +0 -5
  52. google/adk/tests/integration/fixture/home_automation_agent/simple_test2.test.json +0 -5
  53. google/adk/tests/integration/fixture/home_automation_agent/test_config.json +0 -5
  54. google/adk/tests/integration/fixture/home_automation_agent/test_files/dependent_tool_calls.test.json +0 -18
  55. google/adk/tests/integration/fixture/home_automation_agent/test_files/memorizing_past_events/eval_data.test.json +0 -17
  56. google/adk/tests/integration/fixture/home_automation_agent/test_files/memorizing_past_events/test_config.json +0 -6
  57. google/adk/tests/integration/fixture/home_automation_agent/test_files/simple_multi_turn_conversation.test.json +0 -18
  58. google/adk/tests/integration/fixture/home_automation_agent/test_files/simple_test.test.json +0 -17
  59. google/adk/tests/integration/fixture/home_automation_agent/test_files/simple_test2.test.json +0 -5
  60. google/adk/tests/integration/fixture/home_automation_agent/test_files/test_config.json +0 -5
  61. google/adk/tests/integration/fixture/tool_agent/__init__.py +0 -15
  62. google/adk/tests/integration/fixture/tool_agent/agent.py +0 -218
  63. google/adk/tests/integration/fixture/tool_agent/files/Agent_test_plan.pdf +0 -0
  64. google/adk/tests/integration/fixture/trip_planner_agent/__init__.py +0 -15
  65. google/adk/tests/integration/fixture/trip_planner_agent/agent.py +0 -110
  66. google/adk/tests/integration/fixture/trip_planner_agent/initial.session.json +0 -13
  67. google/adk/tests/integration/fixture/trip_planner_agent/test_config.json +0 -5
  68. google/adk/tests/integration/fixture/trip_planner_agent/test_files/initial.session.json +0 -13
  69. google/adk/tests/integration/fixture/trip_planner_agent/test_files/test_config.json +0 -5
  70. google/adk/tests/integration/fixture/trip_planner_agent/test_files/trip_inquiry_sub_agent.test.json +0 -7
  71. google/adk/tests/integration/fixture/trip_planner_agent/trip_inquiry.test.json +0 -19
  72. google/adk/tests/integration/models/__init__.py +0 -14
  73. google/adk/tests/integration/models/test_google_llm.py +0 -65
  74. google/adk/tests/integration/test_callback.py +0 -70
  75. google/adk/tests/integration/test_context_variable.py +0 -67
  76. google/adk/tests/integration/test_evalute_agent_in_fixture.py +0 -76
  77. google/adk/tests/integration/test_multi_agent.py +0 -28
  78. google/adk/tests/integration/test_multi_turn.py +0 -42
  79. google/adk/tests/integration/test_single_agent.py +0 -23
  80. google/adk/tests/integration/test_sub_agent.py +0 -26
  81. google/adk/tests/integration/test_system_instruction.py +0 -177
  82. google/adk/tests/integration/test_tools.py +0 -287
  83. google/adk/tests/integration/test_with_test_file.py +0 -34
  84. google/adk/tests/integration/tools/__init__.py +0 -14
  85. google/adk/tests/integration/utils/__init__.py +0 -16
  86. google/adk/tests/integration/utils/asserts.py +0 -75
  87. google/adk/tests/integration/utils/test_runner.py +0 -97
  88. google/adk/tests/unittests/__init__.py +0 -14
  89. google/adk/tests/unittests/agents/__init__.py +0 -14
  90. google/adk/tests/unittests/agents/test_base_agent.py +0 -407
  91. google/adk/tests/unittests/agents/test_langgraph_agent.py +0 -191
  92. google/adk/tests/unittests/agents/test_llm_agent_callbacks.py +0 -138
  93. google/adk/tests/unittests/agents/test_llm_agent_fields.py +0 -231
  94. google/adk/tests/unittests/agents/test_loop_agent.py +0 -136
  95. google/adk/tests/unittests/agents/test_parallel_agent.py +0 -92
  96. google/adk/tests/unittests/agents/test_sequential_agent.py +0 -114
  97. google/adk/tests/unittests/artifacts/__init__.py +0 -14
  98. google/adk/tests/unittests/artifacts/test_artifact_service.py +0 -276
  99. google/adk/tests/unittests/auth/test_auth_handler.py +0 -575
  100. google/adk/tests/unittests/conftest.py +0 -73
  101. google/adk/tests/unittests/fast_api/__init__.py +0 -14
  102. google/adk/tests/unittests/fast_api/test_fast_api.py +0 -269
  103. google/adk/tests/unittests/flows/__init__.py +0 -14
  104. google/adk/tests/unittests/flows/llm_flows/__init__.py +0 -14
  105. google/adk/tests/unittests/flows/llm_flows/_test_examples.py +0 -142
  106. google/adk/tests/unittests/flows/llm_flows/test_agent_transfer.py +0 -311
  107. google/adk/tests/unittests/flows/llm_flows/test_functions_long_running.py +0 -244
  108. google/adk/tests/unittests/flows/llm_flows/test_functions_request_euc.py +0 -346
  109. google/adk/tests/unittests/flows/llm_flows/test_functions_sequential.py +0 -93
  110. google/adk/tests/unittests/flows/llm_flows/test_functions_simple.py +0 -258
  111. google/adk/tests/unittests/flows/llm_flows/test_identity.py +0 -66
  112. google/adk/tests/unittests/flows/llm_flows/test_instructions.py +0 -164
  113. google/adk/tests/unittests/flows/llm_flows/test_model_callbacks.py +0 -142
  114. google/adk/tests/unittests/flows/llm_flows/test_other_configs.py +0 -46
  115. google/adk/tests/unittests/flows/llm_flows/test_tool_callbacks.py +0 -269
  116. google/adk/tests/unittests/models/__init__.py +0 -14
  117. google/adk/tests/unittests/models/test_google_llm.py +0 -224
  118. google/adk/tests/unittests/models/test_litellm.py +0 -804
  119. google/adk/tests/unittests/models/test_models.py +0 -60
  120. google/adk/tests/unittests/sessions/__init__.py +0 -14
  121. google/adk/tests/unittests/sessions/test_session_service.py +0 -227
  122. google/adk/tests/unittests/sessions/test_vertex_ai_session_service.py +0 -246
  123. google/adk/tests/unittests/streaming/__init__.py +0 -14
  124. google/adk/tests/unittests/streaming/test_streaming.py +0 -50
  125. google/adk/tests/unittests/tools/__init__.py +0 -14
  126. google/adk/tests/unittests/tools/apihub_tool/clients/test_apihub_client.py +0 -499
  127. google/adk/tests/unittests/tools/apihub_tool/test_apihub_toolset.py +0 -204
  128. google/adk/tests/unittests/tools/application_integration_tool/clients/test_connections_client.py +0 -600
  129. google/adk/tests/unittests/tools/application_integration_tool/clients/test_integration_client.py +0 -630
  130. google/adk/tests/unittests/tools/application_integration_tool/test_application_integration_toolset.py +0 -345
  131. google/adk/tests/unittests/tools/google_api_tool/__init__.py +0 -13
  132. google/adk/tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py +0 -657
  133. google/adk/tests/unittests/tools/openapi_tool/auth/credential_exchangers/test_auto_auth_credential_exchanger.py +0 -145
  134. google/adk/tests/unittests/tools/openapi_tool/auth/credential_exchangers/test_base_auth_credential_exchanger.py +0 -68
  135. google/adk/tests/unittests/tools/openapi_tool/auth/credential_exchangers/test_oauth2_exchanger.py +0 -153
  136. google/adk/tests/unittests/tools/openapi_tool/auth/credential_exchangers/test_service_account_exchanger.py +0 -196
  137. google/adk/tests/unittests/tools/openapi_tool/auth/test_auth_helper.py +0 -573
  138. google/adk/tests/unittests/tools/openapi_tool/common/test_common.py +0 -436
  139. google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test.yaml +0 -1367
  140. google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_openapi_spec_parser.py +0 -628
  141. google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_openapi_toolset.py +0 -139
  142. google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_operation_parser.py +0 -406
  143. google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_rest_api_tool.py +0 -966
  144. google/adk/tests/unittests/tools/openapi_tool/openapi_spec_parser/test_tool_auth_handler.py +0 -201
  145. google/adk/tests/unittests/tools/retrieval/__init__.py +0 -14
  146. google/adk/tests/unittests/tools/retrieval/test_vertex_ai_rag_retrieval.py +0 -147
  147. google/adk/tests/unittests/tools/test_agent_tool.py +0 -167
  148. google/adk/tests/unittests/tools/test_base_tool.py +0 -141
  149. google/adk/tests/unittests/tools/test_build_function_declaration.py +0 -277
  150. google/adk/tests/unittests/utils.py +0 -304
  151. google_adk-0.0.2.dist-info/RECORD +0 -308
  152. {google_adk-0.0.2.dist-info → google_adk-0.0.4.dist-info}/entry_points.txt +0 -0
  153. {google_adk-0.0.2.dist-info → google_adk-0.0.4.dist-info/licenses}/LICENSE +0 -0
@@ -1,190 +0,0 @@
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
- }
@@ -1,15 +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 . import agent
@@ -1,95 +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
- # 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
- )
@@ -1,24 +0,0 @@
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
- ]
@@ -1,6 +0,0 @@
1
- {
2
- "criteria": {
3
- "tool_trajectory_avg_score": 1.0,
4
- "response_match_score": 0.5
5
- }
6
- }
@@ -1,15 +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 . import agent
@@ -1,304 +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 os
16
- import sys
17
-
18
- from google.adk import Agent
19
-
20
- DEVICE_DB = {
21
- "device_1": {"status": "ON", "location": "Living Room"},
22
- "device_2": {"status": "OFF", "location": "Bedroom"},
23
- "device_3": {"status": "OFF", "location": "Kitchen"},
24
- }
25
-
26
- TEMPERATURE_DB = {
27
- "Living Room": 22,
28
- "Bedroom": 20,
29
- "Kitchen": 24,
30
- }
31
-
32
- SCHEDULE_DB = {
33
- "device_1": {"time": "18:00", "status": "ON"},
34
- "device_2": {"time": "22:00", "status": "OFF"},
35
- }
36
-
37
- USER_PREFERENCES_DB = {
38
- "user_x": {"preferred_temp": 21, "location": "Bedroom"},
39
- "user_x": {"preferred_temp": 21, "location": "Living Room"},
40
- "user_y": {"preferred_temp": 23, "location": "Living Room"},
41
- }
42
-
43
-
44
- def reset_data():
45
- global DEVICE_DB
46
- global TEMPERATURE_DB
47
- global SCHEDULE_DB
48
- global USER_PREFERENCES_DB
49
- DEVICE_DB = {
50
- "device_1": {"status": "ON", "location": "Living Room"},
51
- "device_2": {"status": "OFF", "location": "Bedroom"},
52
- "device_3": {"status": "OFF", "location": "Kitchen"},
53
- }
54
-
55
- TEMPERATURE_DB = {
56
- "Living Room": 22,
57
- "Bedroom": 20,
58
- "Kitchen": 24,
59
- }
60
-
61
- SCHEDULE_DB = {
62
- "device_1": {"time": "18:00", "status": "ON"},
63
- "device_2": {"time": "22:00", "status": "OFF"},
64
- }
65
-
66
- USER_PREFERENCES_DB = {
67
- "user_x": {"preferred_temp": 21, "location": "Bedroom"},
68
- "user_x": {"preferred_temp": 21, "location": "Living Room"},
69
- "user_y": {"preferred_temp": 23, "location": "Living Room"},
70
- }
71
-
72
-
73
- def get_device_info(device_id: str) -> dict:
74
- """Get the current status and location of a AC device.
75
-
76
- Args:
77
- device_id (str): The unique identifier of the device.
78
-
79
- Returns:
80
- dict: A dictionary containing the following fields, or 'Device not found'
81
- if the device_id does not exist:
82
- - status: The current status of the device (e.g., 'ON', 'OFF')
83
- - location: The location where the device is installed (e.g., 'Living
84
- Room', 'Bedroom', ''Kitchen')
85
- """
86
- return DEVICE_DB.get(device_id, "Device not found")
87
-
88
-
89
- # def set_device_info(device_id: str, updates: dict) -> str:
90
- # """Update the information of a AC device, specifically its status and/or location.
91
-
92
- # Args:
93
- # device_id (str): Required. The unique identifier of the device.
94
- # updates (dict): Required. A dictionary containing the fields to be
95
- # updated. Supported keys: - "status" (str): The new status to set for the
96
- # device. Accepted values: 'ON', 'OFF'. **Only these values are allowed.**
97
- # - "location" (str): The new location to set for the device. Accepted
98
- # values: 'Living Room', 'Bedroom', 'Kitchen'. **Only these values are
99
- # allowed.**
100
-
101
-
102
- # Returns:
103
- # str: A message indicating whether the device information was successfully
104
- # updated.
105
- # """
106
- # if device_id in DEVICE_DB:
107
- # if "status" in updates:
108
- # DEVICE_DB[device_id]["status"] = updates["status"]
109
- # if "location" in updates:
110
- # DEVICE_DB[device_id]["location"] = updates["location"]
111
- # return f"Device {device_id} information updated: {updates}."
112
- # return "Device not found"
113
- def set_device_info(
114
- device_id: str, status: str = "", location: str = ""
115
- ) -> str:
116
- """Update the information of a AC device, specifically its status and/or location.
117
-
118
- Args:
119
- device_id (str): Required. The unique identifier of the device.
120
- status (str): The new status to set for the
121
- device. Accepted values: 'ON', 'OFF'. **Only these values are allowed.**
122
- location (str): The new location to set for the device. Accepted
123
- values: 'Living Room', 'Bedroom', 'Kitchen'. **Only these values are
124
- allowed.**
125
-
126
- Returns:
127
- str: A message indicating whether the device information was successfully
128
- updated.
129
- """
130
- if device_id in DEVICE_DB:
131
- if status:
132
- DEVICE_DB[device_id]["status"] = status
133
- return f"Device {device_id} information updated: status -> {status}."
134
- if location:
135
- DEVICE_DB[device_id]["location"] = location
136
- return f"Device {device_id} information updated: location -> {location}."
137
- return "Device not found"
138
-
139
-
140
- def get_temperature(location: str) -> int:
141
- """Get the current temperature in celsius of a location (e.g., 'Living Room', 'Bedroom', 'Kitchen').
142
-
143
- Args:
144
- location (str): The location for which to retrieve the temperature (e.g.,
145
- 'Living Room', 'Bedroom', 'Kitchen').
146
-
147
- Returns:
148
- int: The current temperature in celsius in the specified location, or
149
- 'Location not found' if the location does not exist.
150
- """
151
- return TEMPERATURE_DB.get(location, "Location not found")
152
-
153
-
154
- def set_temperature(location: str, temperature: int) -> str:
155
- """Set the desired temperature in celsius for a location.
156
-
157
- Acceptable range of temperature: 18-30 celsius. If it's out of the range, do
158
- not call this tool.
159
-
160
- Args:
161
- location (str): The location where the temperature should be set.
162
- temperature (int): The desired temperature as integer to set in celsius.
163
- Acceptable range: 18-30 celsius.
164
-
165
- Returns:
166
- str: A message indicating whether the temperature was successfully set.
167
- """
168
- if location in TEMPERATURE_DB:
169
- TEMPERATURE_DB[location] = temperature
170
- return f"Temperature in {location} set to {temperature}°C."
171
- return "Location not found"
172
-
173
-
174
- def get_user_preferences(user_id: str) -> dict:
175
- """Get the temperature preferences and preferred location of a user_id.
176
-
177
- user_id must be provided.
178
-
179
- Args:
180
- user_id (str): The unique identifier of the user.
181
-
182
- Returns:
183
- dict: A dictionary containing the following fields, or 'User not found' if
184
- the user_id does not exist:
185
- - preferred_temp: The user's preferred temperature.
186
- - location: The location where the user prefers to be.
187
- """
188
- return USER_PREFERENCES_DB.get(user_id, "User not found")
189
-
190
-
191
- def set_device_schedule(device_id: str, time: str, status: str) -> str:
192
- """Schedule a device to change its status at a specific time.
193
-
194
- Args:
195
- device_id (str): The unique identifier of the device.
196
- time (str): The time at which the device should change its status (format:
197
- 'HH:MM').
198
- status (str): The status to set for the device at the specified time
199
- (e.g., 'ON', 'OFF').
200
-
201
- Returns:
202
- str: A message indicating whether the schedule was successfully set.
203
- """
204
- if device_id in DEVICE_DB:
205
- SCHEDULE_DB[device_id] = {"time": time, "status": status}
206
- return f"Device {device_id} scheduled to turn {status} at {time}."
207
- return "Device not found"
208
-
209
-
210
- def get_device_schedule(device_id: str) -> dict:
211
- """Retrieve the schedule of a device.
212
-
213
- Args:
214
- device_id (str): The unique identifier of the device.
215
-
216
- Returns:
217
- dict: A dictionary containing the following fields, or 'Schedule not
218
- found' if the device_id does not exist:
219
- - time: The scheduled time for the device to change its status (format:
220
- 'HH:MM').
221
- - status: The status that will be set at the scheduled time (e.g., 'ON',
222
- 'OFF').
223
- """
224
- return SCHEDULE_DB.get(device_id, "Schedule not found")
225
-
226
-
227
- def celsius_to_fahrenheit(celsius: int) -> float:
228
- """Convert Celsius to Fahrenheit.
229
-
230
- You must call this to do the conversion of temperature, so you can get the
231
- precise number in required format.
232
-
233
- Args:
234
- celsius (int): Temperature in Celsius.
235
-
236
- Returns:
237
- float: Temperature in Fahrenheit.
238
- """
239
- return (celsius * 9 / 5) + 32
240
-
241
-
242
- def fahrenheit_to_celsius(fahrenheit: float) -> int:
243
- """Convert Fahrenheit to Celsius.
244
-
245
- You must call this to do the conversion of temperature, so you can get the
246
- precise number in required format.
247
-
248
- Args:
249
- fahrenheit (float): Temperature in Fahrenheit.
250
-
251
- Returns:
252
- int: Temperature in Celsius.
253
- """
254
- return int((fahrenheit - 32) * 5 / 9)
255
-
256
-
257
- def list_devices(status: str = "", location: str = "") -> list:
258
- """Retrieve a list of AC devices, filtered by status and/or location when provided.
259
-
260
- For cost efficiency, always apply as many filters (status and location) as
261
- available in the input arguments.
262
-
263
- Args:
264
- status (str, optional): The status to filter devices by (e.g., 'ON',
265
- 'OFF'). Defaults to None.
266
- location (str, optional): The location to filter devices by (e.g., 'Living
267
- Room', 'Bedroom', ''Kitchen'). Defaults to None.
268
-
269
- Returns:
270
- list: A list of dictionaries, each containing the device ID, status, and
271
- location, or an empty list if no devices match the criteria.
272
- """
273
- devices = []
274
- for device_id, info in DEVICE_DB.items():
275
- if ((not status) or info["status"] == status) and (
276
- (not location) or info["location"] == location
277
- ):
278
- devices.append({
279
- "device_id": device_id,
280
- "status": info["status"],
281
- "location": info["location"],
282
- })
283
- return devices if devices else "No devices found matching the criteria."
284
-
285
-
286
- root_agent = Agent(
287
- model="gemini-2.0-flash-001",
288
- name="Home_automation_agent",
289
- instruction="""
290
- You are Home Automation Agent. You are responsible for controlling the devices in the home.
291
- """,
292
- tools=[
293
- get_device_info,
294
- set_device_info,
295
- get_temperature,
296
- set_temperature,
297
- get_user_preferences,
298
- set_device_schedule,
299
- get_device_schedule,
300
- celsius_to_fahrenheit,
301
- fahrenheit_to_celsius,
302
- list_devices,
303
- ],
304
- )