google-adk 0.3.0__tar.gz → 0.5.0__tar.gz
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-0.3.0 → google_adk-0.5.0}/PKG-INFO +3 -7
- {google_adk-0.3.0 → google_adk-0.5.0}/README.md +1 -5
- {google_adk-0.3.0 → google_adk-0.5.0}/pyproject.toml +14 -9
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/active_streaming_tool.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/base_agent.py +27 -29
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/callback_context.py +4 -4
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/invocation_context.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/langgraph_agent.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/live_request_queue.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/llm_agent.py +54 -14
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/run_config.py +4 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/transcription_entry.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/artifacts/base_artifact_service.py +5 -10
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/artifacts/gcs_artifact_service.py +8 -8
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/artifacts/in_memory_artifact_service.py +5 -5
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/auth/auth_credential.py +4 -5
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/browser/index.html +1 -1
- google_adk-0.3.0/src/google/adk/cli/browser/main-HWIBUY2R.js → google_adk-0.5.0/src/google/adk/cli/browser/main-ULN5R5I5.js +40 -39
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/cli.py +54 -47
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/cli_eval.py +13 -11
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/cli_tools_click.py +58 -7
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/fast_api.py +11 -11
- google_adk-0.5.0/src/google/adk/cli/fast_api.py.orig +728 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/evaluation/agent_evaluator.py +3 -3
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/evaluation/evaluation_constants.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/evaluation/evaluation_generator.py +5 -5
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/evaluation/response_evaluator.py +1 -1
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/events/event.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/events/event_actions.py +10 -4
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/examples/example.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/_code_execution.py +10 -10
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/base_llm_flow.py +40 -15
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/basic.py +3 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/contents.py +9 -5
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/functions.py +38 -16
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/instructions.py +17 -6
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/memory/base_memory_service.py +4 -2
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/memory/in_memory_memory_service.py +2 -2
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/memory/vertex_ai_rag_memory_service.py +2 -2
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/anthropic_llm.py +20 -2
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/base_llm.py +45 -4
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/gemini_llm_connection.py +14 -1
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/google_llm.py +0 -42
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/lite_llm.py +17 -17
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/llm_request.py +1 -1
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/llm_response.py +1 -1
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/runners.py +5 -5
- google_adk-0.5.0/src/google/adk/sessions/_session_util.py +43 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/sessions/base_session_service.py +3 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/sessions/database_session_service.py +63 -46
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/sessions/in_memory_session_service.py +3 -3
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/sessions/session.py +1 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/sessions/vertex_ai_session_service.py +7 -5
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/agent_tool.py +7 -4
- {google_adk-0.3.0/src/google/adk/flows → google_adk-0.5.0/src/google/adk/tools/apihub_tool/clients}/__init__.py +0 -1
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/application_integration_tool/__init__.py +2 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/application_integration_tool/application_integration_toolset.py +48 -26
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/application_integration_tool/clients/connections_client.py +33 -77
- google_adk-0.5.0/src/google/adk/tools/application_integration_tool/integration_connector_tool.py +159 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/function_tool.py +42 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/load_artifacts_tool.py +4 -4
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/load_memory_tool.py +4 -2
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/mcp_tool/conversion_utils.py +1 -1
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/mcp_tool/mcp_session_manager.py +14 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/common/common.py +2 -5
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/openapi_spec_parser/operation_parser.py +13 -3
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/preload_memory_tool.py +1 -1
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/tool_context.py +4 -4
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/version.py +1 -1
- {google_adk-0.3.0 → google_adk-0.5.0}/LICENSE +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/loop_agent.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/parallel_agent.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/readonly_context.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/remote_agent.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/agents/sequential_agent.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/artifacts/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/auth/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/auth/auth_handler.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/auth/auth_preprocessor.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/auth/auth_schemes.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/auth/auth_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/__main__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/agent_graph.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/browser/adk_favicon.svg +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/browser/assets/audio-processor.js +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/browser/assets/config/runtime-config.json +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/browser/polyfills-FFHMD2TL.js +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/browser/styles-4VDSPQ37.css +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/cli_create.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/cli_deploy.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/utils/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/utils/envs.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/utils/evals.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/cli/utils/logs.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/code_executors/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/code_executors/base_code_executor.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/code_executors/code_execution_utils.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/code_executors/code_executor_context.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/code_executors/container_code_executor.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/code_executors/unsafe_local_code_executor.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/code_executors/vertex_ai_code_executor.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/evaluation/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/evaluation/trajectory_evaluator.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/events/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/examples/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/examples/base_example_provider.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/examples/example_util.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/examples/vertex_ai_example_store.py +0 -0
- {google_adk-0.3.0/src/google/adk/tools/apihub_tool/clients → google_adk-0.5.0/src/google/adk/flows}/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/_base_llm_processor.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/_nl_planning.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/agent_transfer.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/audio_transcriber.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/auto_flow.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/identity.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/flows/llm_flows/single_flow.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/memory/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/base_llm_connection.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/models/registry.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/planners/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/planners/base_planner.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/planners/built_in_planner.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/planners/plan_re_act_planner.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/sessions/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/sessions/state.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/telemetry.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/_automatic_function_calling_util.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/apihub_tool/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/apihub_tool/apihub_toolset.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/apihub_tool/clients/apihub_client.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/apihub_tool/clients/secret_client.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/application_integration_tool/clients/integration_client.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/base_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/built_in_code_execution_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/crewai_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/example_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/exit_loop_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/function_parameter_parse_util.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/get_user_choice_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/google_api_tool/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/google_api_tool/google_api_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/google_api_tool/google_api_tool_set.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/google_api_tool/google_api_tool_sets.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/google_api_tool/googleapi_to_openapi_converter.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/google_search_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/langchain_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/load_web_page.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/long_running_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/mcp_tool/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/mcp_tool/mcp_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/mcp_tool/mcp_toolset.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/auth/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/auth/auth_helpers.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/auth/credential_exchangers/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/auth/credential_exchangers/base_credential_exchanger.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/common/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/openapi_spec_parser/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/openapi_spec_parser/openapi_toolset.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/retrieval/__init__.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/retrieval/base_retrieval_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/retrieval/files_retrieval.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/retrieval/llama_index_retrieval.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/retrieval/vertex_ai_rag_retrieval.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/toolbox_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/transfer_to_agent_tool.py +0 -0
- {google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/tools/vertex_ai_search_tool.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: google-adk
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.5.0
|
4
4
|
Summary: Agent Development Kit
|
5
5
|
Author-email: Google LLC <googleapis-packages@google.com>
|
6
6
|
Requires-Python: >=3.9
|
@@ -27,7 +27,7 @@ Requires-Dist: google-cloud-aiplatform>=1.87.0
|
|
27
27
|
Requires-Dist: google-cloud-secret-manager>=2.22.0
|
28
28
|
Requires-Dist: google-cloud-speech>=2.30.0
|
29
29
|
Requires-Dist: google-cloud-storage>=2.18.0, <3.0.0
|
30
|
-
Requires-Dist: google-genai>=1.
|
30
|
+
Requires-Dist: google-genai>=1.12.1
|
31
31
|
Requires-Dist: graphviz>=0.20.2
|
32
32
|
Requires-Dist: mcp>=1.5.0;python_version>='3.10'
|
33
33
|
Requires-Dist: opentelemetry-api>=1.31.0
|
@@ -99,11 +99,7 @@ Provides-Extra: test
|
|
99
99
|
</h3>
|
100
100
|
</html>
|
101
101
|
|
102
|
-
Agent Development Kit (ADK) is designed for developers
|
103
|
-
control and flexibility when building advanced AI agents that are tightly
|
104
|
-
integrated with services in Google Cloud. It allows you to define agent
|
105
|
-
behavior, orchestration, and tool use directly in code, enabling robust
|
106
|
-
debugging, versioning, and deployment anywhere – from your laptop to the cloud.
|
102
|
+
Agent Development Kit (ADK) is a flexible and modular framework for developing and deploying AI agents. While optimized for Gemini and the Google ecosystem, ADK is model-agnostic, deployment-agnostic, and is built for compatibility with other frameworks. ADK was designed to make agent development feel more like software development, to make it easier for developers to create, deploy, and orchestrate agentic architectures that range from simple tasks to complex workflows.
|
107
103
|
|
108
104
|
|
109
105
|
---
|
@@ -18,11 +18,7 @@
|
|
18
18
|
</h3>
|
19
19
|
</html>
|
20
20
|
|
21
|
-
Agent Development Kit (ADK) is designed for developers
|
22
|
-
control and flexibility when building advanced AI agents that are tightly
|
23
|
-
integrated with services in Google Cloud. It allows you to define agent
|
24
|
-
behavior, orchestration, and tool use directly in code, enabling robust
|
25
|
-
debugging, versioning, and deployment anywhere – from your laptop to the cloud.
|
21
|
+
Agent Development Kit (ADK) is a flexible and modular framework for developing and deploying AI agents. While optimized for Gemini and the Google ecosystem, ADK is model-agnostic, deployment-agnostic, and is built for compatibility with other frameworks. ADK was designed to make agent development feel more like software development, to make it easier for developers to create, deploy, and orchestrate agentic architectures that range from simple tasks to complex workflows.
|
26
22
|
|
27
23
|
|
28
24
|
---
|
@@ -33,7 +33,7 @@ dependencies = [
|
|
33
33
|
"google-cloud-secret-manager>=2.22.0", # Fetching secrets in RestAPI Tool
|
34
34
|
"google-cloud-speech>=2.30.0", # For Audo Transcription
|
35
35
|
"google-cloud-storage>=2.18.0, <3.0.0", # For GCS Artifact service
|
36
|
-
"google-genai>=1.
|
36
|
+
"google-genai>=1.12.1", # Google GenAI SDK
|
37
37
|
"graphviz>=0.20.2", # Graphviz for graph rendering
|
38
38
|
"mcp>=1.5.0;python_version>='3.10'", # For MCP Toolset
|
39
39
|
"opentelemetry-api>=1.31.0", # OpenTelemetry
|
@@ -119,6 +119,15 @@ line-length = 80
|
|
119
119
|
unstable = true
|
120
120
|
pyink-indentation = 2
|
121
121
|
pyink-use-majority-quotes = true
|
122
|
+
pyink-annotation-pragmas = [
|
123
|
+
"noqa",
|
124
|
+
"pylint:",
|
125
|
+
"type: ignore",
|
126
|
+
"pytype:",
|
127
|
+
"mypy:",
|
128
|
+
"pyright:",
|
129
|
+
"pyre-",
|
130
|
+
]
|
122
131
|
|
123
132
|
|
124
133
|
[build-system]
|
@@ -135,15 +144,11 @@ exclude = ['src/**/*.sh']
|
|
135
144
|
name = "google.adk"
|
136
145
|
|
137
146
|
[tool.isort]
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
honor_case_in_force_sorted_sections = true
|
142
|
-
order_by_type = false
|
143
|
-
sort_relative_in_force_sorted_sections = true
|
144
|
-
multi_line_output = 3
|
145
|
-
line_length = 200
|
147
|
+
profile = "google"
|
148
|
+
single_line_exclusions = []
|
149
|
+
|
146
150
|
|
147
151
|
[tool.pytest.ini_options]
|
148
152
|
testpaths = ["tests"]
|
149
153
|
asyncio_default_fixture_loop_scope = "function"
|
154
|
+
asyncio_mode = "auto"
|
@@ -14,7 +14,8 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
-
|
17
|
+
import inspect
|
18
|
+
from typing import Any, Awaitable, Union
|
18
19
|
from typing import AsyncGenerator
|
19
20
|
from typing import Callable
|
20
21
|
from typing import final
|
@@ -37,27 +38,15 @@ if TYPE_CHECKING:
|
|
37
38
|
|
38
39
|
tracer = trace.get_tracer('gcp.vertex.agent')
|
39
40
|
|
40
|
-
BeforeAgentCallback = Callable[
|
41
|
-
|
41
|
+
BeforeAgentCallback = Callable[
|
42
|
+
[CallbackContext],
|
43
|
+
Union[Awaitable[Optional[types.Content]], Optional[types.Content]],
|
44
|
+
]
|
42
45
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
The content to return to the user. When set, the agent run will skipped and
|
48
|
-
the provided content will be returned to user.
|
49
|
-
"""
|
50
|
-
|
51
|
-
AfterAgentCallback = Callable[[CallbackContext], Optional[types.Content]]
|
52
|
-
"""Callback signature that is invoked after the agent run.
|
53
|
-
|
54
|
-
Args:
|
55
|
-
callback_context: MUST be named 'callback_context' (enforced).
|
56
|
-
|
57
|
-
Returns:
|
58
|
-
The content to return to the user. When set, the agent run will skipped and
|
59
|
-
the provided content will be appended to event history as agent response.
|
60
|
-
"""
|
46
|
+
AfterAgentCallback = Callable[
|
47
|
+
[CallbackContext],
|
48
|
+
Union[Awaitable[Optional[types.Content]], Optional[types.Content]],
|
49
|
+
]
|
61
50
|
|
62
51
|
|
63
52
|
class BaseAgent(BaseModel):
|
@@ -67,6 +56,7 @@ class BaseAgent(BaseModel):
|
|
67
56
|
arbitrary_types_allowed=True,
|
68
57
|
extra='forbid',
|
69
58
|
)
|
59
|
+
"""The pydantic model config."""
|
70
60
|
|
71
61
|
name: str
|
72
62
|
"""The agent's name.
|
@@ -101,8 +91,9 @@ class BaseAgent(BaseModel):
|
|
101
91
|
callback_context: MUST be named 'callback_context' (enforced).
|
102
92
|
|
103
93
|
Returns:
|
104
|
-
The content to return to the user.
|
105
|
-
|
94
|
+
Optional[types.Content]: The content to return to the user.
|
95
|
+
When the content is present, the agent run will be skipped and the
|
96
|
+
provided content will be returned to user.
|
106
97
|
"""
|
107
98
|
after_agent_callback: Optional[AfterAgentCallback] = None
|
108
99
|
"""Callback signature that is invoked after the agent run.
|
@@ -111,8 +102,9 @@ class BaseAgent(BaseModel):
|
|
111
102
|
callback_context: MUST be named 'callback_context' (enforced).
|
112
103
|
|
113
104
|
Returns:
|
114
|
-
The content to return to the user.
|
115
|
-
|
105
|
+
Optional[types.Content]: The content to return to the user.
|
106
|
+
When the content is present, the provided content will be used as agent
|
107
|
+
response and appended to event history as agent response.
|
116
108
|
"""
|
117
109
|
|
118
110
|
@final
|
@@ -133,7 +125,7 @@ class BaseAgent(BaseModel):
|
|
133
125
|
with tracer.start_as_current_span(f'agent_run [{self.name}]'):
|
134
126
|
ctx = self._create_invocation_context(parent_context)
|
135
127
|
|
136
|
-
if event := self.__handle_before_agent_callback(ctx):
|
128
|
+
if event := await self.__handle_before_agent_callback(ctx):
|
137
129
|
yield event
|
138
130
|
if ctx.end_invocation:
|
139
131
|
return
|
@@ -144,7 +136,7 @@ class BaseAgent(BaseModel):
|
|
144
136
|
if ctx.end_invocation:
|
145
137
|
return
|
146
138
|
|
147
|
-
if event := self.__handle_after_agent_callback(ctx):
|
139
|
+
if event := await self.__handle_after_agent_callback(ctx):
|
148
140
|
yield event
|
149
141
|
|
150
142
|
@final
|
@@ -244,7 +236,7 @@ class BaseAgent(BaseModel):
|
|
244
236
|
invocation_context.branch = f'{parent_context.branch}.{self.name}'
|
245
237
|
return invocation_context
|
246
238
|
|
247
|
-
def __handle_before_agent_callback(
|
239
|
+
async def __handle_before_agent_callback(
|
248
240
|
self, ctx: InvocationContext
|
249
241
|
) -> Optional[Event]:
|
250
242
|
"""Runs the before_agent_callback if it exists.
|
@@ -262,6 +254,9 @@ class BaseAgent(BaseModel):
|
|
262
254
|
callback_context=callback_context
|
263
255
|
)
|
264
256
|
|
257
|
+
if inspect.isawaitable(before_agent_callback_content):
|
258
|
+
before_agent_callback_content = await before_agent_callback_content
|
259
|
+
|
265
260
|
if before_agent_callback_content:
|
266
261
|
ret_event = Event(
|
267
262
|
invocation_id=ctx.invocation_id,
|
@@ -283,7 +278,7 @@ class BaseAgent(BaseModel):
|
|
283
278
|
|
284
279
|
return ret_event
|
285
280
|
|
286
|
-
def __handle_after_agent_callback(
|
281
|
+
async def __handle_after_agent_callback(
|
287
282
|
self, invocation_context: InvocationContext
|
288
283
|
) -> Optional[Event]:
|
289
284
|
"""Runs the after_agent_callback if it exists.
|
@@ -301,6 +296,9 @@ class BaseAgent(BaseModel):
|
|
301
296
|
callback_context=callback_context
|
302
297
|
)
|
303
298
|
|
299
|
+
if inspect.isawaitable(after_agent_callback_content):
|
300
|
+
after_agent_callback_content = await after_agent_callback_content
|
301
|
+
|
304
302
|
if after_agent_callback_content or callback_context.state.has_delta():
|
305
303
|
ret_event = Event(
|
306
304
|
invocation_id=invocation_context.invocation_id,
|
@@ -65,7 +65,7 @@ class CallbackContext(ReadonlyContext):
|
|
65
65
|
"""The user content that started this invocation. READONLY field."""
|
66
66
|
return self._invocation_context.user_content
|
67
67
|
|
68
|
-
def load_artifact(
|
68
|
+
async def load_artifact(
|
69
69
|
self, filename: str, version: Optional[int] = None
|
70
70
|
) -> Optional[types.Part]:
|
71
71
|
"""Loads an artifact attached to the current session.
|
@@ -80,7 +80,7 @@ class CallbackContext(ReadonlyContext):
|
|
80
80
|
"""
|
81
81
|
if self._invocation_context.artifact_service is None:
|
82
82
|
raise ValueError("Artifact service is not initialized.")
|
83
|
-
return self._invocation_context.artifact_service.load_artifact(
|
83
|
+
return await self._invocation_context.artifact_service.load_artifact(
|
84
84
|
app_name=self._invocation_context.app_name,
|
85
85
|
user_id=self._invocation_context.user_id,
|
86
86
|
session_id=self._invocation_context.session.id,
|
@@ -88,7 +88,7 @@ class CallbackContext(ReadonlyContext):
|
|
88
88
|
version=version,
|
89
89
|
)
|
90
90
|
|
91
|
-
def save_artifact(self, filename: str, artifact: types.Part) -> int:
|
91
|
+
async def save_artifact(self, filename: str, artifact: types.Part) -> int:
|
92
92
|
"""Saves an artifact and records it as delta for the current session.
|
93
93
|
|
94
94
|
Args:
|
@@ -100,7 +100,7 @@ class CallbackContext(ReadonlyContext):
|
|
100
100
|
"""
|
101
101
|
if self._invocation_context.artifact_service is None:
|
102
102
|
raise ValueError("Artifact service is not initialized.")
|
103
|
-
version = self._invocation_context.artifact_service.save_artifact(
|
103
|
+
version = await self._invocation_context.artifact_service.save_artifact(
|
104
104
|
app_name=self._invocation_context.app_name,
|
105
105
|
user_id=self._invocation_context.user_id,
|
106
106
|
session_id=self._invocation_context.session.id,
|
@@ -24,6 +24,7 @@ class LiveRequest(BaseModel):
|
|
24
24
|
"""Request send to live agents."""
|
25
25
|
|
26
26
|
model_config = ConfigDict(ser_json_bytes='base64', val_json_bytes='base64')
|
27
|
+
"""The pydantic model config."""
|
27
28
|
|
28
29
|
content: Optional[types.Content] = None
|
29
30
|
"""If set, send the content to the model in turn-by-turn mode."""
|
@@ -15,12 +15,7 @@
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
17
|
import logging
|
18
|
-
from typing import Any
|
19
|
-
from typing import AsyncGenerator
|
20
|
-
from typing import Callable
|
21
|
-
from typing import Literal
|
22
|
-
from typing import Optional
|
23
|
-
from typing import Union
|
18
|
+
from typing import Any, AsyncGenerator, Awaitable, Callable, Literal, Optional, Union
|
24
19
|
|
25
20
|
from google.genai import types
|
26
21
|
from pydantic import BaseModel
|
@@ -52,21 +47,33 @@ from .readonly_context import ReadonlyContext
|
|
52
47
|
|
53
48
|
logger = logging.getLogger(__name__)
|
54
49
|
|
50
|
+
_SingleBeforeModelCallback: TypeAlias = Callable[
|
51
|
+
[CallbackContext, LlmRequest],
|
52
|
+
Union[Awaitable[Optional[LlmResponse]], Optional[LlmResponse]],
|
53
|
+
]
|
55
54
|
|
56
|
-
BeforeModelCallback: TypeAlias =
|
57
|
-
|
55
|
+
BeforeModelCallback: TypeAlias = Union[
|
56
|
+
_SingleBeforeModelCallback,
|
57
|
+
list[_SingleBeforeModelCallback],
|
58
58
|
]
|
59
|
-
|
59
|
+
|
60
|
+
_SingleAfterModelCallback: TypeAlias = Callable[
|
60
61
|
[CallbackContext, LlmResponse],
|
61
|
-
Optional[LlmResponse],
|
62
|
+
Union[Awaitable[Optional[LlmResponse]], Optional[LlmResponse]],
|
62
63
|
]
|
64
|
+
|
65
|
+
AfterModelCallback: TypeAlias = Union[
|
66
|
+
_SingleAfterModelCallback,
|
67
|
+
list[_SingleAfterModelCallback],
|
68
|
+
]
|
69
|
+
|
63
70
|
BeforeToolCallback: TypeAlias = Callable[
|
64
71
|
[BaseTool, dict[str, Any], ToolContext],
|
65
|
-
Optional[dict],
|
72
|
+
Union[Awaitable[Optional[dict]], Optional[dict]],
|
66
73
|
]
|
67
74
|
AfterToolCallback: TypeAlias = Callable[
|
68
75
|
[BaseTool, dict[str, Any], ToolContext, dict],
|
69
|
-
Optional[dict],
|
76
|
+
Union[Awaitable[Optional[dict]], Optional[dict]],
|
70
77
|
]
|
71
78
|
|
72
79
|
InstructionProvider: TypeAlias = Callable[[ReadonlyContext], str]
|
@@ -178,7 +185,11 @@ class LlmAgent(BaseAgent):
|
|
178
185
|
|
179
186
|
# Callbacks - Start
|
180
187
|
before_model_callback: Optional[BeforeModelCallback] = None
|
181
|
-
"""
|
188
|
+
"""Callback or list of callbacks to be called before calling the LLM.
|
189
|
+
|
190
|
+
When a list of callbacks is provided, the callbacks will be called in the
|
191
|
+
order they are listed until a callback does not return None.
|
192
|
+
|
182
193
|
Args:
|
183
194
|
callback_context: CallbackContext,
|
184
195
|
llm_request: LlmRequest, The raw model request. Callback can mutate the
|
@@ -189,7 +200,10 @@ class LlmAgent(BaseAgent):
|
|
189
200
|
skipped and the provided content will be returned to user.
|
190
201
|
"""
|
191
202
|
after_model_callback: Optional[AfterModelCallback] = None
|
192
|
-
"""
|
203
|
+
"""Callback or list of callbacks to be called after calling the LLM.
|
204
|
+
|
205
|
+
When a list of callbacks is provided, the callbacks will be called in the
|
206
|
+
order they are listed until a callback does not return None.
|
193
207
|
|
194
208
|
Args:
|
195
209
|
callback_context: CallbackContext,
|
@@ -289,6 +303,32 @@ class LlmAgent(BaseAgent):
|
|
289
303
|
"""
|
290
304
|
return [_convert_tool_union_to_tool(tool) for tool in self.tools]
|
291
305
|
|
306
|
+
@property
|
307
|
+
def canonical_before_model_callbacks(
|
308
|
+
self,
|
309
|
+
) -> list[_SingleBeforeModelCallback]:
|
310
|
+
"""The resolved self.before_model_callback field as a list of _SingleBeforeModelCallback.
|
311
|
+
|
312
|
+
This method is only for use by Agent Development Kit.
|
313
|
+
"""
|
314
|
+
if not self.before_model_callback:
|
315
|
+
return []
|
316
|
+
if isinstance(self.before_model_callback, list):
|
317
|
+
return self.before_model_callback
|
318
|
+
return [self.before_model_callback]
|
319
|
+
|
320
|
+
@property
|
321
|
+
def canonical_after_model_callbacks(self) -> list[_SingleAfterModelCallback]:
|
322
|
+
"""The resolved self.after_model_callback field as a list of _SingleAfterModelCallback.
|
323
|
+
|
324
|
+
This method is only for use by Agent Development Kit.
|
325
|
+
"""
|
326
|
+
if not self.after_model_callback:
|
327
|
+
return []
|
328
|
+
if isinstance(self.after_model_callback, list):
|
329
|
+
return self.after_model_callback
|
330
|
+
return [self.after_model_callback]
|
331
|
+
|
292
332
|
@property
|
293
333
|
def _llm_flow(self) -> BaseLlmFlow:
|
294
334
|
if (
|
@@ -37,6 +37,7 @@ class RunConfig(BaseModel):
|
|
37
37
|
model_config = ConfigDict(
|
38
38
|
extra='forbid',
|
39
39
|
)
|
40
|
+
"""The pydantic model config."""
|
40
41
|
|
41
42
|
speech_config: Optional[types.SpeechConfig] = None
|
42
43
|
"""Speech configuration for the live agent."""
|
@@ -64,6 +65,9 @@ class RunConfig(BaseModel):
|
|
64
65
|
output_audio_transcription: Optional[types.AudioTranscriptionConfig] = None
|
65
66
|
"""Output transcription for live agents with audio response."""
|
66
67
|
|
68
|
+
input_audio_transcription: Optional[types.AudioTranscriptionConfig] = None
|
69
|
+
"""Input transcription for live agents with audio input from user."""
|
70
|
+
|
67
71
|
max_llm_calls: int = 500
|
68
72
|
"""
|
69
73
|
A limit on the total number of llm calls for a given run.
|
@@ -12,7 +12,6 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
"""Abstract base class for artifact services."""
|
16
15
|
|
17
16
|
from abc import ABC
|
18
17
|
from abc import abstractmethod
|
@@ -25,7 +24,7 @@ class BaseArtifactService(ABC):
|
|
25
24
|
"""Abstract base class for artifact services."""
|
26
25
|
|
27
26
|
@abstractmethod
|
28
|
-
def save_artifact(
|
27
|
+
async def save_artifact(
|
29
28
|
self,
|
30
29
|
*,
|
31
30
|
app_name: str,
|
@@ -53,7 +52,7 @@ class BaseArtifactService(ABC):
|
|
53
52
|
"""
|
54
53
|
|
55
54
|
@abstractmethod
|
56
|
-
def load_artifact(
|
55
|
+
async def load_artifact(
|
57
56
|
self,
|
58
57
|
*,
|
59
58
|
app_name: str,
|
@@ -78,10 +77,9 @@ class BaseArtifactService(ABC):
|
|
78
77
|
Returns:
|
79
78
|
The artifact or None if not found.
|
80
79
|
"""
|
81
|
-
pass
|
82
80
|
|
83
81
|
@abstractmethod
|
84
|
-
def list_artifact_keys(
|
82
|
+
async def list_artifact_keys(
|
85
83
|
self, *, app_name: str, user_id: str, session_id: str
|
86
84
|
) -> list[str]:
|
87
85
|
"""Lists all the artifact filenames within a session.
|
@@ -94,10 +92,9 @@ class BaseArtifactService(ABC):
|
|
94
92
|
Returns:
|
95
93
|
A list of all artifact filenames within a session.
|
96
94
|
"""
|
97
|
-
pass
|
98
95
|
|
99
96
|
@abstractmethod
|
100
|
-
def delete_artifact(
|
97
|
+
async def delete_artifact(
|
101
98
|
self, *, app_name: str, user_id: str, session_id: str, filename: str
|
102
99
|
) -> None:
|
103
100
|
"""Deletes an artifact.
|
@@ -108,10 +105,9 @@ class BaseArtifactService(ABC):
|
|
108
105
|
session_id: The ID of the session.
|
109
106
|
filename: The name of the artifact file.
|
110
107
|
"""
|
111
|
-
pass
|
112
108
|
|
113
109
|
@abstractmethod
|
114
|
-
def list_versions(
|
110
|
+
async def list_versions(
|
115
111
|
self, *, app_name: str, user_id: str, session_id: str, filename: str
|
116
112
|
) -> list[int]:
|
117
113
|
"""Lists all versions of an artifact.
|
@@ -125,4 +121,3 @@ class BaseArtifactService(ABC):
|
|
125
121
|
Returns:
|
126
122
|
A list of all available versions of the artifact.
|
127
123
|
"""
|
128
|
-
pass
|
@@ -77,7 +77,7 @@ class GcsArtifactService(BaseArtifactService):
|
|
77
77
|
return f"{app_name}/{user_id}/{session_id}/{filename}/{version}"
|
78
78
|
|
79
79
|
@override
|
80
|
-
def save_artifact(
|
80
|
+
async def save_artifact(
|
81
81
|
self,
|
82
82
|
*,
|
83
83
|
app_name: str,
|
@@ -86,7 +86,7 @@ class GcsArtifactService(BaseArtifactService):
|
|
86
86
|
filename: str,
|
87
87
|
artifact: types.Part,
|
88
88
|
) -> int:
|
89
|
-
versions = self.list_versions(
|
89
|
+
versions = await self.list_versions(
|
90
90
|
app_name=app_name,
|
91
91
|
user_id=user_id,
|
92
92
|
session_id=session_id,
|
@@ -107,7 +107,7 @@ class GcsArtifactService(BaseArtifactService):
|
|
107
107
|
return version
|
108
108
|
|
109
109
|
@override
|
110
|
-
def load_artifact(
|
110
|
+
async def load_artifact(
|
111
111
|
self,
|
112
112
|
*,
|
113
113
|
app_name: str,
|
@@ -117,7 +117,7 @@ class GcsArtifactService(BaseArtifactService):
|
|
117
117
|
version: Optional[int] = None,
|
118
118
|
) -> Optional[types.Part]:
|
119
119
|
if version is None:
|
120
|
-
versions = self.list_versions(
|
120
|
+
versions = await self.list_versions(
|
121
121
|
app_name=app_name,
|
122
122
|
user_id=user_id,
|
123
123
|
session_id=session_id,
|
@@ -141,7 +141,7 @@ class GcsArtifactService(BaseArtifactService):
|
|
141
141
|
return artifact
|
142
142
|
|
143
143
|
@override
|
144
|
-
def list_artifact_keys(
|
144
|
+
async def list_artifact_keys(
|
145
145
|
self, *, app_name: str, user_id: str, session_id: str
|
146
146
|
) -> list[str]:
|
147
147
|
filenames = set()
|
@@ -165,10 +165,10 @@ class GcsArtifactService(BaseArtifactService):
|
|
165
165
|
return sorted(list(filenames))
|
166
166
|
|
167
167
|
@override
|
168
|
-
def delete_artifact(
|
168
|
+
async def delete_artifact(
|
169
169
|
self, *, app_name: str, user_id: str, session_id: str, filename: str
|
170
170
|
) -> None:
|
171
|
-
versions = self.list_versions(
|
171
|
+
versions = await self.list_versions(
|
172
172
|
app_name=app_name,
|
173
173
|
user_id=user_id,
|
174
174
|
session_id=session_id,
|
@@ -183,7 +183,7 @@ class GcsArtifactService(BaseArtifactService):
|
|
183
183
|
return
|
184
184
|
|
185
185
|
@override
|
186
|
-
def list_versions(
|
186
|
+
async def list_versions(
|
187
187
|
self, *, app_name: str, user_id: str, session_id: str, filename: str
|
188
188
|
) -> list[int]:
|
189
189
|
prefix = self._get_blob_name(app_name, user_id, session_id, filename, "")
|
{google_adk-0.3.0 → google_adk-0.5.0}/src/google/adk/artifacts/in_memory_artifact_service.py
RENAMED
@@ -63,7 +63,7 @@ class InMemoryArtifactService(BaseArtifactService, BaseModel):
|
|
63
63
|
return f"{app_name}/{user_id}/{session_id}/{filename}"
|
64
64
|
|
65
65
|
@override
|
66
|
-
def save_artifact(
|
66
|
+
async def save_artifact(
|
67
67
|
self,
|
68
68
|
*,
|
69
69
|
app_name: str,
|
@@ -80,7 +80,7 @@ class InMemoryArtifactService(BaseArtifactService, BaseModel):
|
|
80
80
|
return version
|
81
81
|
|
82
82
|
@override
|
83
|
-
def load_artifact(
|
83
|
+
async def load_artifact(
|
84
84
|
self,
|
85
85
|
*,
|
86
86
|
app_name: str,
|
@@ -98,7 +98,7 @@ class InMemoryArtifactService(BaseArtifactService, BaseModel):
|
|
98
98
|
return versions[version]
|
99
99
|
|
100
100
|
@override
|
101
|
-
def list_artifact_keys(
|
101
|
+
async def list_artifact_keys(
|
102
102
|
self, *, app_name: str, user_id: str, session_id: str
|
103
103
|
) -> list[str]:
|
104
104
|
session_prefix = f"{app_name}/{user_id}/{session_id}/"
|
@@ -114,7 +114,7 @@ class InMemoryArtifactService(BaseArtifactService, BaseModel):
|
|
114
114
|
return sorted(filenames)
|
115
115
|
|
116
116
|
@override
|
117
|
-
def delete_artifact(
|
117
|
+
async def delete_artifact(
|
118
118
|
self, *, app_name: str, user_id: str, session_id: str, filename: str
|
119
119
|
) -> None:
|
120
120
|
path = self._artifact_path(app_name, user_id, session_id, filename)
|
@@ -123,7 +123,7 @@ class InMemoryArtifactService(BaseArtifactService, BaseModel):
|
|
123
123
|
self.artifacts.pop(path, None)
|
124
124
|
|
125
125
|
@override
|
126
|
-
def list_versions(
|
126
|
+
async def list_versions(
|
127
127
|
self, *, app_name: str, user_id: str, session_id: str, filename: str
|
128
128
|
) -> list[int]:
|
129
129
|
path = self._artifact_path(app_name, user_id, session_id, filename)
|
@@ -13,17 +13,16 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
15
|
from enum import Enum
|
16
|
-
from typing import Any
|
17
|
-
from typing import Dict
|
18
|
-
from typing import List
|
19
|
-
from typing import Optional
|
16
|
+
from typing import Any, Dict, List, Optional
|
20
17
|
|
21
18
|
from pydantic import BaseModel
|
19
|
+
from pydantic import ConfigDict
|
22
20
|
from pydantic import Field
|
23
21
|
|
24
22
|
|
25
23
|
class BaseModelWithConfig(BaseModel):
|
26
|
-
model_config =
|
24
|
+
model_config = ConfigDict(extra="allow")
|
25
|
+
"""The pydantic model config."""
|
27
26
|
|
28
27
|
|
29
28
|
class HttpCredentials(BaseModelWithConfig):
|
@@ -29,5 +29,5 @@
|
|
29
29
|
<style>html{color-scheme:dark}html{--mat-sys-background:light-dark(#fcf9f8, #131314);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f3f0f0, #313030);--mat-sys-inverse-primary:light-dark(#c1c7cd, #595f65);--mat-sys-inverse-surface:light-dark(#313030, #e5e2e2);--mat-sys-on-background:light-dark(#1c1b1c, #e5e2e2);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#410002, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #2b3136);--mat-sys-on-primary-container:light-dark(#161c21, #dde3e9);--mat-sys-on-primary-fixed:light-dark(#161c21, #161c21);--mat-sys-on-primary-fixed-variant:light-dark(#41474d, #41474d);--mat-sys-on-secondary:light-dark(#ffffff, #003061);--mat-sys-on-secondary-container:light-dark(#001b3c, #d5e3ff);--mat-sys-on-secondary-fixed:light-dark(#001b3c, #001b3c);--mat-sys-on-secondary-fixed-variant:light-dark(#0f4784, #0f4784);--mat-sys-on-surface:light-dark(#1c1b1c, #e5e2e2);--mat-sys-on-surface-variant:light-dark(#44474a, #e1e2e6);--mat-sys-on-tertiary:light-dark(#ffffff, #2b3136);--mat-sys-on-tertiary-container:light-dark(#161c21, #dde3e9);--mat-sys-on-tertiary-fixed:light-dark(#161c21, #161c21);--mat-sys-on-tertiary-fixed-variant:light-dark(#41474d, #41474d);--mat-sys-outline:light-dark(#74777b, #8e9194);--mat-sys-outline-variant:light-dark(#c4c7ca, #44474a);--mat-sys-primary:light-dark(#595f65, #c1c7cd);--mat-sys-primary-container:light-dark(#dde3e9, #41474d);--mat-sys-primary-fixed:light-dark(#dde3e9, #dde3e9);--mat-sys-primary-fixed-dim:light-dark(#c1c7cd, #c1c7cd);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#305f9d, #a7c8ff);--mat-sys-secondary-container:light-dark(#d5e3ff, #0f4784);--mat-sys-secondary-fixed:light-dark(#d5e3ff, #d5e3ff);--mat-sys-secondary-fixed-dim:light-dark(#a7c8ff, #a7c8ff);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#fcf9f8, #131314);--mat-sys-surface-bright:light-dark(#fcf9f8, #393939);--mat-sys-surface-container:light-dark(#f0eded, #201f20);--mat-sys-surface-container-high:light-dark(#eae7e7, #2a2a2a);--mat-sys-surface-container-highest:light-dark(#e5e2e2, #393939);--mat-sys-surface-container-low:light-dark(#f6f3f3, #1c1b1c);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0e0e0e);--mat-sys-surface-dim:light-dark(#dcd9d9, #131314);--mat-sys-surface-tint:light-dark(#595f65, #c1c7cd);--mat-sys-surface-variant:light-dark(#e1e2e6, #44474a);--mat-sys-tertiary:light-dark(#595f65, #c1c7cd);--mat-sys-tertiary-container:light-dark(#dde3e9, #41474d);--mat-sys-tertiary-fixed:light-dark(#dde3e9, #dde3e9);--mat-sys-tertiary-fixed-dim:light-dark(#c1c7cd, #c1c7cd);--mat-sys-neutral-variant20:#2d3134;--mat-sys-neutral10:#1c1b1c}html{--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12)}html{--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12)}html{--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12)}html{--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12)}html{--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html{--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12)}html{--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px}html{--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12}html{font-family:Google Sans,Helvetica Neue,sans-serif!important}body{height:100vh;margin:0}:root{--mat-sys-primary:black;--mdc-checkbox-selected-icon-color:white;--mat-sys-background:#131314;--mat-tab-header-active-label-text-color:#8AB4F8;--mat-tab-header-active-hover-label-text-color:#8AB4F8;--mat-tab-header-active-focus-label-text-color:#8AB4F8;--mat-tab-header-label-text-weight:500;--mdc-text-button-label-text-color:#89b4f8}:root{--mdc-dialog-container-color:#2b2b2f}:root{--mdc-dialog-subhead-color:white}:root{--mdc-circular-progress-active-indicator-color:#a8c7fa}:root{--mdc-circular-progress-size:80}</style><link rel="stylesheet" href="styles-4VDSPQ37.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-4VDSPQ37.css"></noscript></head>
|
30
30
|
<body>
|
31
31
|
<app-root></app-root>
|
32
|
-
<script src="polyfills-FFHMD2TL.js" type="module"></script><script src="main-
|
32
|
+
<script src="polyfills-FFHMD2TL.js" type="module"></script><script src="main-ULN5R5I5.js" type="module"></script></body>
|
33
33
|
</html>
|