agent-starter-pack 0.3.3__py3-none-any.whl → 0.21.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_starter_pack/agents/README.md +7 -0
- agents/langgraph_base_react/template/.templateconfig.yaml → agent_starter_pack/agents/adk_a2a_base/.template/templateconfig.yaml +5 -10
- agent_starter_pack/agents/adk_a2a_base/README.md +37 -0
- src/deployment_targets/cloud_run/Dockerfile → agent_starter_pack/agents/adk_a2a_base/app/__init__.py +2 -14
- agent_starter_pack/agents/adk_a2a_base/app/agent.py +70 -0
- agent_starter_pack/agents/adk_a2a_base/notebooks/adk_a2a_app_testing.ipynb +583 -0
- agents/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb → agent_starter_pack/agents/adk_a2a_base/notebooks/evaluating_adk_agent.ipynb +163 -199
- {agents/adk_base → agent_starter_pack/agents/adk_a2a_base}/tests/integration/test_agent.py +2 -2
- agents/adk_base/template/.templateconfig.yaml → agent_starter_pack/agents/adk_base/.template/templateconfig.yaml +4 -1
- {agents → agent_starter_pack/agents}/adk_base/README.md +1 -1
- agent_starter_pack/agents/adk_base/app/__init__.py +17 -0
- {agents → agent_starter_pack/agents}/adk_base/app/agent.py +5 -2
- {agents → agent_starter_pack/agents}/adk_base/notebooks/adk_app_testing.ipynb +128 -82
- agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb → agent_starter_pack/agents/adk_base/notebooks/evaluating_adk_agent.ipynb +181 -207
- agent_starter_pack/agents/adk_base/tests/integration/test_agent.py +58 -0
- agents/crewai_coding_crew/template/.templateconfig.yaml → agent_starter_pack/agents/adk_live/.template/templateconfig.yaml +5 -9
- agent_starter_pack/agents/adk_live/README.md +32 -0
- agent_starter_pack/agents/adk_live/app/__init__.py +17 -0
- agent_starter_pack/agents/adk_live/app/agent.py +51 -0
- agent_starter_pack/agents/adk_live/tests/unit/test_dummy.py +38 -0
- agents/agentic_rag/template/.templateconfig.yaml → agent_starter_pack/agents/agentic_rag/.template/templateconfig.yaml +7 -3
- {agents → agent_starter_pack/agents}/agentic_rag/README.md +1 -1
- agent_starter_pack/agents/agentic_rag/app/__init__.py +17 -0
- {agents → agent_starter_pack/agents}/agentic_rag/app/agent.py +8 -4
- {agents → agent_starter_pack/agents}/agentic_rag/notebooks/adk_app_testing.ipynb +128 -82
- agent_starter_pack/agents/agentic_rag/notebooks/evaluating_adk_agent.ipynb +1535 -0
- {agents → agent_starter_pack/agents}/agentic_rag/tests/integration/test_agent.py +3 -3
- agent_starter_pack/agents/langgraph_base/.template/templateconfig.yaml +31 -0
- agent_starter_pack/agents/langgraph_base/README.md +30 -0
- agent_starter_pack/agents/langgraph_base/app/__init__.py +17 -0
- agent_starter_pack/agents/langgraph_base/app/agent.py +34 -0
- {agents/crewai_coding_crew → agent_starter_pack/agents/langgraph_base}/notebooks/evaluating_langgraph_agent.ipynb +30 -17
- {agents/langgraph_base_react → agent_starter_pack/agents/langgraph_base}/tests/integration/test_agent.py +2 -2
- {src → agent_starter_pack}/base_template/.gitignore +5 -3
- agent_starter_pack/base_template/GEMINI.md +5 -0
- agent_starter_pack/base_template/Makefile +339 -0
- agent_starter_pack/base_template/README.md +267 -0
- agent_starter_pack/base_template/deployment/README.md +11 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/apis.tf +2 -2
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/apis.tf +6 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/iam.tf +12 -11
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/providers.tf +5 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/storage.tf +1 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/variables.tf +10 -10
- agent_starter_pack/base_template/deployment/terraform/dev/{% if cookiecutter.is_adk %}telemetry.tf{% else %}unused_telemetry.tf{% endif %} +193 -0
- agent_starter_pack/base_template/deployment/terraform/github.tf +337 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/iam.tf +20 -41
- {src → agent_starter_pack}/base_template/deployment/terraform/locals.tf +10 -3
- {src/resources/setup_cicd → agent_starter_pack/base_template/deployment/terraform}/providers.tf +8 -1
- {src → agent_starter_pack}/base_template/deployment/terraform/service_accounts.tf +7 -8
- agent_starter_pack/base_template/deployment/terraform/sql/completions.sql +138 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/storage.tf +7 -16
- {src → agent_starter_pack}/base_template/deployment/terraform/variables.tf +61 -28
- {src → agent_starter_pack}/base_template/deployment/terraform/vars/env.tfvars +6 -1
- agent_starter_pack/base_template/deployment/terraform/{% if cookiecutter.cicd_runner == 'github_actions' %}wif.tf{% else %}unused_wif.tf{% endif %} +43 -0
- src/base_template/deployment/terraform/build_triggers.tf → agent_starter_pack/base_template/deployment/terraform/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}build_triggers.tf{% else %}unused_build_triggers.tf{% endif %} +55 -38
- agent_starter_pack/base_template/deployment/terraform/{% if cookiecutter.is_adk %}telemetry.tf{% else %}unused_telemetry.tf{% endif %} +206 -0
- {src → agent_starter_pack}/base_template/pyproject.toml +24 -37
- agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/deploy-to-prod.yaml +132 -0
- agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/pr_checks.yaml +65 -0
- agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'github_actions' %}.github{% else %}unused_github{% endif %}/workflows/staging.yaml +259 -0
- src/base_template/deployment/cd/deploy-to-prod.yaml → agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/deploy-to-prod.yaml +38 -30
- src/base_template/deployment/ci/pr_checks.yaml → agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/pr_checks.yaml +5 -5
- agent_starter_pack/base_template/{% if cookiecutter.cicd_runner == 'google_cloud_build' %}.cloudbuild{% else %}unused_.cloudbuild{% endif %}/staging.yaml +322 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/telemetry.py +96 -0
- {src/base_template/app/utils → agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils}/typing.py +7 -9
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}converters{% else %}unused_converters{% endif %}/__init__.py +25 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}converters{% else %}unused_converters{% endif %}/part_converter.py +138 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}executor{% else %}unused_executor{% endif %}/__init__.py +13 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}executor{% else %}unused_executor{% endif %}/a2a_agent_executor.py +265 -0
- agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_a2a and cookiecutter.agent_name == 'langgraph_base' %}executor{% else %}unused_executor{% endif %}/task_result_aggregator.py +152 -0
- agent_starter_pack/cli/commands/create.py +1256 -0
- agent_starter_pack/cli/commands/enhance.py +611 -0
- agent_starter_pack/cli/commands/list.py +203 -0
- agent_starter_pack/cli/commands/register_gemini_enterprise.py +1070 -0
- agent_starter_pack/cli/commands/setup_cicd.py +862 -0
- {src → agent_starter_pack}/cli/main.py +10 -2
- {src → agent_starter_pack}/cli/utils/cicd.py +139 -48
- agent_starter_pack/cli/utils/gcp.py +263 -0
- agent_starter_pack/cli/utils/logging.py +103 -0
- agent_starter_pack/cli/utils/remote_template.py +677 -0
- agent_starter_pack/cli/utils/template.py +1466 -0
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/components/process_data.py +1 -1
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/submit_pipeline.py +20 -6
- {src → agent_starter_pack}/data_ingestion/pyproject.toml +1 -0
- {src → agent_starter_pack}/data_ingestion/uv.lock +602 -494
- agent_starter_pack/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py +484 -0
- agent_starter_pack/deployment_targets/agent_engine/tests/load_test/README.md +84 -0
- agent_starter_pack/deployment_targets/agent_engine/tests/load_test/load_test.py +424 -0
- agent_starter_pack/deployment_targets/agent_engine/tests/{% if cookiecutter.is_a2a %}helpers.py{% else %}unused_helpers.py{% endif %} +138 -0
- agent_starter_pack/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/agent_engine_app.py +263 -0
- agent_starter_pack/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/app_utils/deploy.py +414 -0
- agent_starter_pack/deployment_targets/agent_engine/{{cookiecutter.agent_directory}}/app_utils/{% if cookiecutter.is_adk_live %}expose_app.py{% else %}unused_expose_app.py{% endif %} +519 -0
- agent_starter_pack/deployment_targets/cloud_run/Dockerfile +51 -0
- agent_starter_pack/deployment_targets/cloud_run/deployment/terraform/dev/service.tf +243 -0
- agent_starter_pack/deployment_targets/cloud_run/deployment/terraform/service.tf +417 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/integration/test_server_e2e.py +705 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/load_test/.results/.placeholder +321 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/load_test/README.md +165 -0
- agent_starter_pack/deployment_targets/cloud_run/tests/load_test/load_test.py +329 -0
- agent_starter_pack/deployment_targets/cloud_run/{{cookiecutter.agent_directory}}/fast_api_app.py +556 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/package-lock.json +79 -1044
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/package.json +1 -9
- agent_starter_pack/frontends/adk_live_react/frontend/src/App.tsx +65 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/logger/Logger.tsx +8 -3
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/logger/logger.scss +26 -0
- agent_starter_pack/frontends/adk_live_react/frontend/src/components/side-panel/SidePanel.tsx +516 -0
- agent_starter_pack/frontends/adk_live_react/frontend/src/components/side-panel/side-panel.scss +563 -0
- agent_starter_pack/frontends/adk_live_react/frontend/src/components/transcription-preview/TranscriptionPreview.tsx +106 -0
- agent_starter_pack/frontends/adk_live_react/frontend/src/components/transcription-preview/transcription-preview.scss +150 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/hooks/use-live-api.ts +8 -2
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/multimodal-live-types.ts +40 -2
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/audio-recorder.ts +1 -1
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/audio-streamer.ts +1 -1
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/multimodal-live-client.ts +210 -24
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/utils.ts +27 -5
- agent_starter_pack/resources/docs/adk-cheatsheet.md +1628 -0
- agent_starter_pack/resources/locks/uv-adk_a2a_base-agent_engine.lock +4966 -0
- agent_starter_pack/resources/locks/uv-adk_a2a_base-cloud_run.lock +5011 -0
- agent_starter_pack/resources/locks/uv-adk_base-agent_engine.lock +4946 -0
- agent_starter_pack/resources/locks/uv-adk_base-cloud_run.lock +4991 -0
- agent_starter_pack/resources/locks/uv-adk_live-agent_engine.lock +4963 -0
- agent_starter_pack/resources/locks/uv-adk_live-cloud_run.lock +5006 -0
- agent_starter_pack/resources/locks/uv-agentic_rag-agent_engine.lock +5487 -0
- agent_starter_pack/resources/locks/uv-agentic_rag-cloud_run.lock +5532 -0
- agent_starter_pack/resources/locks/uv-langgraph_base-agent_engine.lock +5788 -0
- agent_starter_pack/resources/locks/uv-langgraph_base-cloud_run.lock +5811 -0
- {src → agent_starter_pack}/utils/generate_locks.py +15 -12
- {src → agent_starter_pack}/utils/lock_utils.py +4 -7
- {src → agent_starter_pack}/utils/watch_and_rebuild.py +2 -2
- agent_starter_pack-0.21.0.dist-info/METADATA +182 -0
- agent_starter_pack-0.21.0.dist-info/RECORD +171 -0
- agent_starter_pack-0.21.0.dist-info/entry_points.txt +2 -0
- llm.txt +362 -0
- agent_starter_pack-0.3.3.dist-info/METADATA +0 -164
- agent_starter_pack-0.3.3.dist-info/RECORD +0 -176
- agent_starter_pack-0.3.3.dist-info/entry_points.txt +0 -2
- agents/crewai_coding_crew/README.md +0 -34
- agents/crewai_coding_crew/app/agent.py +0 -86
- agents/crewai_coding_crew/app/crew/config/agents.yaml +0 -39
- agents/crewai_coding_crew/app/crew/config/tasks.yaml +0 -37
- agents/crewai_coding_crew/app/crew/crew.py +0 -71
- agents/crewai_coding_crew/tests/integration/test_agent.py +0 -47
- agents/langgraph_base_react/README.md +0 -9
- agents/langgraph_base_react/app/agent.py +0 -73
- agents/live_api/README.md +0 -37
- agents/live_api/app/agent.py +0 -78
- agents/live_api/app/server.py +0 -196
- agents/live_api/app/templates.py +0 -51
- agents/live_api/app/vector_store.py +0 -55
- agents/live_api/template/.templateconfig.yaml +0 -29
- agents/live_api/tests/integration/test_server_e2e.py +0 -254
- agents/live_api/tests/load_test/load_test.py +0 -40
- agents/live_api/tests/unit/test_server.py +0 -143
- src/base_template/Makefile +0 -72
- src/base_template/README.md +0 -208
- src/base_template/app/__init__.py +0 -3
- src/base_template/app/utils/tracing.py +0 -155
- src/base_template/deployment/README.md +0 -126
- src/base_template/deployment/cd/staging.yaml +0 -216
- src/base_template/deployment/terraform/dev/log_sinks.tf +0 -63
- src/base_template/deployment/terraform/log_sinks.tf +0 -70
- src/base_template/deployment/terraform/providers.tf +0 -37
- src/cli/commands/create.py +0 -664
- src/cli/commands/setup_cicd.py +0 -829
- src/cli/utils/gcp.py +0 -117
- src/cli/utils/logging.py +0 -51
- src/cli/utils/template.py +0 -737
- src/deployment_targets/agent_engine/app/agent_engine_app.py +0 -336
- src/deployment_targets/agent_engine/notebooks/intro_agent_engine.ipynb +0 -1025
- src/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py +0 -183
- src/deployment_targets/agent_engine/tests/load_test/README.md +0 -42
- src/deployment_targets/agent_engine/tests/load_test/load_test.py +0 -107
- src/deployment_targets/cloud_run/app/server.py +0 -154
- src/deployment_targets/cloud_run/tests/integration/test_server_e2e.py +0 -249
- src/deployment_targets/cloud_run/tests/load_test/.results/.placeholder +0 -0
- src/deployment_targets/cloud_run/tests/load_test/README.md +0 -83
- src/deployment_targets/cloud_run/tests/load_test/load_test.py +0 -118
- src/deployment_targets/cloud_run/uv.lock +0 -6952
- src/frontends/live_api_react/frontend/src/App.tsx +0 -205
- src/frontends/live_api_react/frontend/src/components/control-tray/ControlTray.tsx +0 -217
- src/frontends/live_api_react/frontend/src/components/control-tray/control-tray.scss +0 -201
- src/frontends/live_api_react/frontend/src/components/side-panel/SidePanel.tsx +0 -161
- src/frontends/live_api_react/frontend/src/components/side-panel/side-panel.scss +0 -285
- src/frontends/streamlit/frontend/side_bar.py +0 -214
- src/frontends/streamlit/frontend/streamlit_app.py +0 -265
- src/frontends/streamlit/frontend/style/app_markdown.py +0 -37
- src/frontends/streamlit/frontend/utils/chat_utils.py +0 -67
- src/frontends/streamlit/frontend/utils/local_chat_history.py +0 -125
- src/frontends/streamlit/frontend/utils/message_editing.py +0 -59
- src/frontends/streamlit/frontend/utils/multimodal_utils.py +0 -217
- src/frontends/streamlit/frontend/utils/stream_handler.py +0 -301
- src/frontends/streamlit/frontend/utils/title_summary.py +0 -94
- src/frontends/streamlit_adk/frontend/side_bar.py +0 -214
- src/frontends/streamlit_adk/frontend/streamlit_app.py +0 -314
- src/frontends/streamlit_adk/frontend/style/app_markdown.py +0 -37
- src/frontends/streamlit_adk/frontend/utils/chat_utils.py +0 -84
- src/frontends/streamlit_adk/frontend/utils/local_chat_history.py +0 -110
- src/frontends/streamlit_adk/frontend/utils/message_editing.py +0 -61
- src/frontends/streamlit_adk/frontend/utils/multimodal_utils.py +0 -223
- src/frontends/streamlit_adk/frontend/utils/stream_handler.py +0 -311
- src/frontends/streamlit_adk/frontend/utils/title_summary.py +0 -129
- src/resources/containers/data_processing/Dockerfile +0 -27
- src/resources/containers/e2e-tests/Dockerfile +0 -19
- src/resources/idx/.idx/dev.nix +0 -57
- src/resources/idx/idx-template.json +0 -21
- src/resources/idx/idx-template.nix +0 -26
- src/resources/locks/uv-adk_base-agent_engine.lock +0 -5338
- src/resources/locks/uv-adk_base-cloud_run.lock +0 -5930
- src/resources/locks/uv-agentic_rag-agent_engine.lock +0 -5528
- src/resources/locks/uv-agentic_rag-cloud_run.lock +0 -6120
- src/resources/locks/uv-crewai_coding_crew-agent_engine.lock +0 -6231
- src/resources/locks/uv-crewai_coding_crew-cloud_run.lock +0 -6839
- src/resources/locks/uv-langgraph_base_react-agent_engine.lock +0 -5233
- src/resources/locks/uv-langgraph_base_react-cloud_run.lock +0 -5862
- src/resources/locks/uv-live_api-cloud_run.lock +0 -5832
- src/resources/setup_cicd/cicd_variables.tf +0 -41
- src/resources/setup_cicd/github.tf +0 -87
- {agents → agent_starter_pack/agents}/agentic_rag/app/retrievers.py +0 -0
- {agents → agent_starter_pack/agents}/agentic_rag/app/templates.py +0 -0
- {src → agent_starter_pack}/base_template/deployment/terraform/dev/vars/env.tfvars +0 -0
- {src → agent_starter_pack}/base_template/tests/unit/test_dummy.py +0 -0
- {src/deployment_targets/agent_engine/app/utils → agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/app_utils}/gcs.py +0 -0
- {src → agent_starter_pack}/cli/utils/__init__.py +0 -0
- {src → agent_starter_pack}/cli/utils/datastores.py +0 -0
- {src → agent_starter_pack}/cli/utils/version.py +0 -0
- {src → agent_starter_pack}/data_ingestion/README.md +0 -0
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/components/ingest_data.py +0 -0
- {src → agent_starter_pack}/data_ingestion/data_ingestion_pipeline/pipeline.py +0 -0
- {src → agent_starter_pack}/deployment_targets/agent_engine/deployment_metadata.json +0 -0
- {src → agent_starter_pack}/deployment_targets/agent_engine/tests/load_test/.results/.placeholder +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/public/favicon.ico +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/public/index.html +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/public/robots.txt +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/App.scss +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/App.test.tsx +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/audio-pulse/AudioPulse.tsx +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/audio-pulse/audio-pulse.scss +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/components/logger/mock-logs.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/contexts/LiveAPIContext.tsx +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/hooks/use-media-stream-mux.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/hooks/use-screen-capture.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/hooks/use-webcam.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/index.css +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/index.tsx +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/react-app-env.d.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/reportWebVitals.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/setupTests.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/audioworklet-registry.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/store-logger.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/worklets/audio-processing.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/src/utils/worklets/vol-meter.ts +0 -0
- {src/frontends/live_api_react → agent_starter_pack/frontends/adk_live_react}/frontend/tsconfig.json +0 -0
- {agent_starter_pack-0.3.3.dist-info → agent_starter_pack-0.21.0.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.3.3.dist-info → agent_starter_pack-0.21.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
import json
|
|
16
|
-
import logging
|
|
17
|
-
import os
|
|
18
|
-
import subprocess
|
|
19
|
-
import sys
|
|
20
|
-
import threading
|
|
21
|
-
import time
|
|
22
|
-
import uuid
|
|
23
|
-
from collections.abc import Iterator
|
|
24
|
-
from typing import Any
|
|
25
|
-
|
|
26
|
-
import pytest
|
|
27
|
-
import requests
|
|
28
|
-
from requests.exceptions import RequestException
|
|
29
|
-
|
|
30
|
-
# Configure logging
|
|
31
|
-
logging.basicConfig(level=logging.INFO)
|
|
32
|
-
logger = logging.getLogger(__name__)
|
|
33
|
-
|
|
34
|
-
BASE_URL = "http://127.0.0.1:8000/"
|
|
35
|
-
{%- if "adk" in cookiecutter.tags %}
|
|
36
|
-
STREAM_URL = BASE_URL + "run_sse"
|
|
37
|
-
{%- else %}
|
|
38
|
-
STREAM_URL = BASE_URL + "stream_messages"
|
|
39
|
-
{%- endif %}
|
|
40
|
-
FEEDBACK_URL = BASE_URL + "feedback"
|
|
41
|
-
|
|
42
|
-
HEADERS = {"Content-Type": "application/json"}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def log_output(pipe: Any, log_func: Any) -> None:
|
|
46
|
-
"""Log the output from the given pipe."""
|
|
47
|
-
for line in iter(pipe.readline, ""):
|
|
48
|
-
log_func(line.strip())
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def start_server() -> subprocess.Popen[str]:
|
|
52
|
-
"""Start the FastAPI server using subprocess and log its output."""
|
|
53
|
-
command = [
|
|
54
|
-
sys.executable,
|
|
55
|
-
"-m",
|
|
56
|
-
"uvicorn",
|
|
57
|
-
"app.server:app",
|
|
58
|
-
"--host",
|
|
59
|
-
"0.0.0.0",
|
|
60
|
-
"--port",
|
|
61
|
-
"8000",
|
|
62
|
-
]
|
|
63
|
-
env = os.environ.copy()
|
|
64
|
-
env["INTEGRATION_TEST"] = "TRUE"
|
|
65
|
-
process = subprocess.Popen(
|
|
66
|
-
command,
|
|
67
|
-
stdout=subprocess.PIPE,
|
|
68
|
-
stderr=subprocess.PIPE,
|
|
69
|
-
text=True,
|
|
70
|
-
bufsize=1,
|
|
71
|
-
env=env,
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
# Start threads to log stdout and stderr in real-time
|
|
75
|
-
threading.Thread(
|
|
76
|
-
target=log_output, args=(process.stdout, logger.info), daemon=True
|
|
77
|
-
).start()
|
|
78
|
-
threading.Thread(
|
|
79
|
-
target=log_output, args=(process.stderr, logger.error), daemon=True
|
|
80
|
-
).start()
|
|
81
|
-
|
|
82
|
-
return process
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
def wait_for_server(timeout: int = 60, interval: int = 1) -> bool:
|
|
86
|
-
"""Wait for the server to be ready."""
|
|
87
|
-
start_time = time.time()
|
|
88
|
-
while time.time() - start_time < timeout:
|
|
89
|
-
try:
|
|
90
|
-
response = requests.get("http://127.0.0.1:8000/docs", timeout=10)
|
|
91
|
-
if response.status_code == 200:
|
|
92
|
-
logger.info("Server is ready")
|
|
93
|
-
return True
|
|
94
|
-
except RequestException:
|
|
95
|
-
pass
|
|
96
|
-
time.sleep(interval)
|
|
97
|
-
logger.error(f"Server did not become ready within {timeout} seconds")
|
|
98
|
-
return False
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
@pytest.fixture(scope="session")
|
|
102
|
-
def server_fixture(request: Any) -> Iterator[subprocess.Popen[str]]:
|
|
103
|
-
"""Pytest fixture to start and stop the server for testing."""
|
|
104
|
-
logger.info("Starting server process")
|
|
105
|
-
server_process = start_server()
|
|
106
|
-
if not wait_for_server():
|
|
107
|
-
pytest.fail("Server failed to start")
|
|
108
|
-
logger.info("Server process started")
|
|
109
|
-
|
|
110
|
-
def stop_server() -> None:
|
|
111
|
-
logger.info("Stopping server process")
|
|
112
|
-
server_process.terminate()
|
|
113
|
-
server_process.wait()
|
|
114
|
-
logger.info("Server process stopped")
|
|
115
|
-
|
|
116
|
-
request.addfinalizer(stop_server)
|
|
117
|
-
yield server_process
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
def test_chat_stream(server_fixture: subprocess.Popen[str]) -> None:
|
|
121
|
-
"""Test the chat stream functionality."""
|
|
122
|
-
logger.info("Starting chat stream test")
|
|
123
|
-
{% if "adk" in cookiecutter.tags %}
|
|
124
|
-
# Create session first
|
|
125
|
-
user_id = "user_123"
|
|
126
|
-
session_id = "session_abc"
|
|
127
|
-
session_data = {"state": {"preferred_language": "English", "visit_count": 5}}
|
|
128
|
-
session_response = requests.post(
|
|
129
|
-
f"{BASE_URL}/apps/app/users/{user_id}/sessions/{session_id}",
|
|
130
|
-
headers=HEADERS,
|
|
131
|
-
json=session_data,
|
|
132
|
-
timeout=10,
|
|
133
|
-
)
|
|
134
|
-
assert session_response.status_code == 200
|
|
135
|
-
|
|
136
|
-
# Then send chat message
|
|
137
|
-
data = {
|
|
138
|
-
"app_name": "app",
|
|
139
|
-
"user_id": user_id,
|
|
140
|
-
"session_id": session_id,
|
|
141
|
-
"new_message": {
|
|
142
|
-
"role": "user",
|
|
143
|
-
"parts": [{"text": "What's the weather in San Francisco?"}],
|
|
144
|
-
},
|
|
145
|
-
"streaming": True,
|
|
146
|
-
}
|
|
147
|
-
{% else %}
|
|
148
|
-
data = {
|
|
149
|
-
"input": {
|
|
150
|
-
"messages": [
|
|
151
|
-
{"type": "human", "content": "Hello, AI!"},
|
|
152
|
-
{"type": "ai", "content": "Hello!"},
|
|
153
|
-
{"type": "human", "content": "Who are you?"},
|
|
154
|
-
]
|
|
155
|
-
},
|
|
156
|
-
"config": {"metadata": {"user_id": "test-user", "session_id": "test-session"}},
|
|
157
|
-
}
|
|
158
|
-
{% endif %}
|
|
159
|
-
response = requests.post(
|
|
160
|
-
STREAM_URL, headers=HEADERS, json=data, stream=True, timeout=10
|
|
161
|
-
)
|
|
162
|
-
assert response.status_code == 200
|
|
163
|
-
|
|
164
|
-
{%- if "adk" in cookiecutter.tags %}
|
|
165
|
-
# Parse SSE events from response
|
|
166
|
-
events = []
|
|
167
|
-
for line in response.iter_lines():
|
|
168
|
-
if line:
|
|
169
|
-
# SSE format is "data: {json}"
|
|
170
|
-
line_str = line.decode("utf-8")
|
|
171
|
-
if line_str.startswith("data: "):
|
|
172
|
-
event_json = line_str[6:] # Remove "data: " prefix
|
|
173
|
-
event = json.loads(event_json)
|
|
174
|
-
events.append(event)
|
|
175
|
-
|
|
176
|
-
assert events, "No events received from stream"
|
|
177
|
-
# Check for valid content in the response
|
|
178
|
-
has_text_content = False
|
|
179
|
-
for event in events:
|
|
180
|
-
content = event.get("content")
|
|
181
|
-
if (
|
|
182
|
-
content is not None
|
|
183
|
-
and content.get("parts")
|
|
184
|
-
and any(part.get("text") for part in content["parts"])
|
|
185
|
-
):
|
|
186
|
-
has_text_content = True
|
|
187
|
-
break
|
|
188
|
-
{%- else %}
|
|
189
|
-
events = [json.loads(line) for line in response.iter_lines() if line]
|
|
190
|
-
assert events, "No events received from stream"
|
|
191
|
-
|
|
192
|
-
# Verify each event is a tuple of message and metadata
|
|
193
|
-
for event in events:
|
|
194
|
-
assert isinstance(event, list), "Event should be a list"
|
|
195
|
-
assert len(event) == 2, "Event should contain message and metadata"
|
|
196
|
-
message, _ = event
|
|
197
|
-
|
|
198
|
-
# Verify message structure
|
|
199
|
-
assert isinstance(message, dict), "Message should be a dictionary"
|
|
200
|
-
assert message["type"] == "constructor"
|
|
201
|
-
assert "kwargs" in message, "Constructor message should have kwargs"
|
|
202
|
-
|
|
203
|
-
# Verify at least one message has content
|
|
204
|
-
has_content = False
|
|
205
|
-
for event in events:
|
|
206
|
-
message = event[0]
|
|
207
|
-
if message.get("type") == "constructor" and "content" in message["kwargs"]:
|
|
208
|
-
has_content = True
|
|
209
|
-
break
|
|
210
|
-
assert has_content, "At least one message should have content"
|
|
211
|
-
{%- endif %}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
def test_chat_stream_error_handling(server_fixture: subprocess.Popen[str]) -> None:
|
|
215
|
-
"""Test the chat stream error handling."""
|
|
216
|
-
logger.info("Starting chat stream error handling test")
|
|
217
|
-
data = {
|
|
218
|
-
"input": {"messages": [{"type": "invalid_type", "content": "Cause an error"}]}
|
|
219
|
-
}
|
|
220
|
-
response = requests.post(
|
|
221
|
-
STREAM_URL, headers=HEADERS, json=data, stream=True, timeout=10
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
assert response.status_code == 422, (
|
|
225
|
-
f"Expected status code 422, got {response.status_code}"
|
|
226
|
-
)
|
|
227
|
-
logger.info("Error handling test completed successfully")
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
def test_collect_feedback(server_fixture: subprocess.Popen[str]) -> None:
|
|
231
|
-
"""
|
|
232
|
-
Test the feedback collection endpoint (/feedback) to ensure it properly
|
|
233
|
-
logs the received feedback.
|
|
234
|
-
"""
|
|
235
|
-
# Create sample feedback data
|
|
236
|
-
feedback_data = {
|
|
237
|
-
"score": 4,
|
|
238
|
-
{%- if "adk" in cookiecutter.tags %}
|
|
239
|
-
"invocation_id": str(uuid.uuid4()),
|
|
240
|
-
{%- else %}
|
|
241
|
-
"run_id": str(uuid.uuid4()),
|
|
242
|
-
{%- endif %}
|
|
243
|
-
"text": "Great response!",
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
response = requests.post(
|
|
247
|
-
FEEDBACK_URL, json=feedback_data, headers=HEADERS, timeout=10
|
|
248
|
-
)
|
|
249
|
-
assert response.status_code == 200
|
|
File without changes
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Robust Load Testing for Generative AI Applications
|
|
2
|
-
|
|
3
|
-
This directory provides a comprehensive load testing framework for your Generative AI application, leveraging the power of [Locust](http://locust.io), a leading open-source load testing tool.
|
|
4
|
-
|
|
5
|
-
## Local Load Testing
|
|
6
|
-
|
|
7
|
-
Follow these steps to execute load tests on your local machine:
|
|
8
|
-
|
|
9
|
-
**1. Start the FastAPI Server:**
|
|
10
|
-
|
|
11
|
-
Launch the FastAPI server in a separate terminal:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
uv run uvicorn app.server:app --host 0.0.0.0 --port 8000 --reload
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**2. (In another tab) Create virtual environment with Locust**
|
|
18
|
-
Using another terminal tab, This is suggested to avoid conflicts with the existing application python environment.
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
python3 -m venv locust_env && source locust_env/bin/activate && pip install locust==2.31.1
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**3. Execute the Load Test:**
|
|
25
|
-
Trigger the Locust load test with the following command:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
locust -f tests/load_test/load_test.py \
|
|
29
|
-
-H http://127.0.0.1:8000 \
|
|
30
|
-
--headless \
|
|
31
|
-
-t 30s -u 10 -r 2 \
|
|
32
|
-
--csv=tests/load_test/.results/results \
|
|
33
|
-
--html=tests/load_test/.results/report.html
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
This command initiates a 30-second load test, simulating 2 users spawning per second, reaching a maximum of 60 concurrent users.
|
|
37
|
-
|
|
38
|
-
**Results:**
|
|
39
|
-
|
|
40
|
-
Comprehensive CSV and HTML reports detailing the load test performance will be generated and saved in the `tests/load_test/.results` directory.
|
|
41
|
-
|
|
42
|
-
## Remote Load Testing (Targeting Cloud Run)
|
|
43
|
-
|
|
44
|
-
This framework also supports load testing against remote targets, such as a staging Cloud Run instance. This process is seamlessly integrated into the Continuous Delivery pipeline via Cloud Build, as defined in the [pipeline file](cicd/cd/staging.yaml).
|
|
45
|
-
|
|
46
|
-
**Prerequisites:**
|
|
47
|
-
|
|
48
|
-
- **Dependencies:** Ensure your environment has the same dependencies required for local testing.
|
|
49
|
-
- **Cloud Run Invoker Role:** You'll need the `roles/run.invoker` role to invoke the Cloud Run service.
|
|
50
|
-
|
|
51
|
-
**Steps:**
|
|
52
|
-
|
|
53
|
-
**1. Obtain Cloud Run Service URL:**
|
|
54
|
-
|
|
55
|
-
Navigate to the Cloud Run console, select your service, and copy the URL displayed at the top. Set this URL as an environment variable:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
export RUN_SERVICE_URL=https://your-cloud-run-service-url.run.app
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**2. Obtain ID Token:**
|
|
62
|
-
|
|
63
|
-
Retrieve the ID token required for authentication:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
export _ID_TOKEN=$(gcloud auth print-identity-token -q)
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
**3. Execute the Load Test:**
|
|
70
|
-
Create virtual environment with Locust:
|
|
71
|
-
```bash
|
|
72
|
-
python3 -m venv locust_env && source locust_env/bin/activate && pip install locust==2.31.1
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Execute load tests. The following command executes the same load test parameters as the local test but targets your remote Cloud Run instance.
|
|
76
|
-
```bash
|
|
77
|
-
locust -f tests/load_test/load_test.py \
|
|
78
|
-
-H $RUN_SERVICE_URL \
|
|
79
|
-
--headless \
|
|
80
|
-
-t 30s -u 60 -r 2 \
|
|
81
|
-
--csv=tests/load_test/.results/results \
|
|
82
|
-
--html=tests/load_test/.results/report.html
|
|
83
|
-
```
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
import json
|
|
16
|
-
import os
|
|
17
|
-
import time
|
|
18
|
-
{%- if "adk" in cookiecutter.tags %}
|
|
19
|
-
import uuid
|
|
20
|
-
|
|
21
|
-
import requests
|
|
22
|
-
from locust import HttpUser, between, task
|
|
23
|
-
{%- else %}
|
|
24
|
-
|
|
25
|
-
from locust import HttpUser, between, task
|
|
26
|
-
{%- endif %}
|
|
27
|
-
{% if "adk" in cookiecutter.tags %}
|
|
28
|
-
ENDPOINT = "/run_sse"
|
|
29
|
-
{% else %}
|
|
30
|
-
ENDPOINT = "/stream_messages"
|
|
31
|
-
{% endif %}
|
|
32
|
-
|
|
33
|
-
class ChatStreamUser(HttpUser):
|
|
34
|
-
"""Simulates a user interacting with the chat stream API."""
|
|
35
|
-
|
|
36
|
-
wait_time = between(1, 3) # Wait 1-3 seconds between tasks
|
|
37
|
-
|
|
38
|
-
@task
|
|
39
|
-
def chat_stream(self) -> None:
|
|
40
|
-
"""Simulates a chat stream interaction."""
|
|
41
|
-
headers = {"Content-Type": "application/json"}
|
|
42
|
-
if os.environ.get("_ID_TOKEN"):
|
|
43
|
-
headers["Authorization"] = f"Bearer {os.environ['_ID_TOKEN']}"
|
|
44
|
-
{%- if "adk" in cookiecutter.tags %}
|
|
45
|
-
# Create session first
|
|
46
|
-
user_id = f"user_{uuid.uuid4()}"
|
|
47
|
-
session_id = f"session_{uuid.uuid4()}"
|
|
48
|
-
session_data = {"state": {"preferred_language": "English", "visit_count": 5}}
|
|
49
|
-
requests.post(
|
|
50
|
-
f"{self.client.base_url}/apps/app/users/{user_id}/sessions/{session_id}",
|
|
51
|
-
headers=headers,
|
|
52
|
-
json=session_data,
|
|
53
|
-
timeout=10,
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
# Send chat message
|
|
57
|
-
data = {
|
|
58
|
-
"app_name": "app",
|
|
59
|
-
"user_id": user_id,
|
|
60
|
-
"session_id": session_id,
|
|
61
|
-
"new_message": {
|
|
62
|
-
"role": "user",
|
|
63
|
-
"parts": [{"text": "What's the weather in San Francisco?"}],
|
|
64
|
-
},
|
|
65
|
-
"streaming": True,
|
|
66
|
-
}
|
|
67
|
-
{%- else %}
|
|
68
|
-
data = {
|
|
69
|
-
"input": {
|
|
70
|
-
"messages": [
|
|
71
|
-
{"type": "human", "content": "Hello, AI!"},
|
|
72
|
-
{"type": "ai", "content": "Hello!"},
|
|
73
|
-
{"type": "human", "content": "Who are you?"},
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
"config": {
|
|
77
|
-
"metadata": {"user_id": "test-user", "session_id": "test-session"}
|
|
78
|
-
},
|
|
79
|
-
}
|
|
80
|
-
{%- endif %}
|
|
81
|
-
start_time = time.time()
|
|
82
|
-
|
|
83
|
-
with self.client.post(
|
|
84
|
-
ENDPOINT,
|
|
85
|
-
name=f"{ENDPOINT} message",
|
|
86
|
-
headers=headers,
|
|
87
|
-
json=data,
|
|
88
|
-
catch_response=True,
|
|
89
|
-
stream=True,
|
|
90
|
-
params={"alt": "sse"},
|
|
91
|
-
) as response:
|
|
92
|
-
if response.status_code == 200:
|
|
93
|
-
events = []
|
|
94
|
-
for line in response.iter_lines():
|
|
95
|
-
if line:
|
|
96
|
-
{%- if "adk" in cookiecutter.tags %}
|
|
97
|
-
# SSE format is "data: {json}"
|
|
98
|
-
line_str = line.decode("utf-8")
|
|
99
|
-
if line_str.startswith("data: "):
|
|
100
|
-
event_json = line_str[6:] # Remove "data: " prefix
|
|
101
|
-
event = json.loads(event_json)
|
|
102
|
-
events.append(event)
|
|
103
|
-
{%- else %}
|
|
104
|
-
event = json.loads(line)
|
|
105
|
-
events.append(event)
|
|
106
|
-
{%- endif %}
|
|
107
|
-
end_time = time.time()
|
|
108
|
-
total_time = end_time - start_time
|
|
109
|
-
self.environment.events.request.fire(
|
|
110
|
-
request_type="POST",
|
|
111
|
-
name=f"{ENDPOINT} end",
|
|
112
|
-
response_time=total_time * 1000, # Convert to milliseconds
|
|
113
|
-
response_length=len(json.dumps(events)),
|
|
114
|
-
response=response,
|
|
115
|
-
context={},
|
|
116
|
-
)
|
|
117
|
-
else:
|
|
118
|
-
response.failure(f"Unexpected status code: {response.status_code}")
|