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,311 +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
|
-
# mypy: disable-error-code="unreachable"
|
|
16
|
-
import importlib
|
|
17
|
-
import json
|
|
18
|
-
from collections.abc import Generator
|
|
19
|
-
from typing import Any
|
|
20
|
-
from urllib.parse import urljoin
|
|
21
|
-
|
|
22
|
-
import google.auth
|
|
23
|
-
import google.auth.transport.requests
|
|
24
|
-
import google.oauth2.id_token
|
|
25
|
-
import requests
|
|
26
|
-
import streamlit as st
|
|
27
|
-
import vertexai
|
|
28
|
-
from google.adk.events.event import Event
|
|
29
|
-
from google.auth.exceptions import DefaultCredentialsError
|
|
30
|
-
from vertexai import agent_engines
|
|
31
|
-
|
|
32
|
-
from frontend.utils.multimodal_utils import format_content
|
|
33
|
-
|
|
34
|
-
st.cache_resource.clear()
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
@st.cache_resource
|
|
38
|
-
def get_remote_agent(remote_agent_engine_id: str) -> Any:
|
|
39
|
-
"""Get cached remote agent instance."""
|
|
40
|
-
# Extract location and engine ID from the full resource ID.
|
|
41
|
-
parts = remote_agent_engine_id.split("/")
|
|
42
|
-
project_id = parts[1]
|
|
43
|
-
location = parts[3]
|
|
44
|
-
vertexai.init(project=project_id, location=location)
|
|
45
|
-
return agent_engines.AgentEngine(remote_agent_engine_id)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@st.cache_resource
|
|
49
|
-
def get_remote_url_config(url: str, authenticate_request: bool) -> dict[str, Any]:
|
|
50
|
-
"""Get cached remote URL agent configuration."""
|
|
51
|
-
stream_url = urljoin(url, "stream_messages")
|
|
52
|
-
creds, _ = google.auth.default()
|
|
53
|
-
id_token = None
|
|
54
|
-
if authenticate_request:
|
|
55
|
-
auth_req = google.auth.transport.requests.Request()
|
|
56
|
-
try:
|
|
57
|
-
id_token = google.oauth2.id_token.fetch_id_token(auth_req, stream_url)
|
|
58
|
-
except DefaultCredentialsError:
|
|
59
|
-
creds.refresh(auth_req)
|
|
60
|
-
id_token = creds.id_token
|
|
61
|
-
return {
|
|
62
|
-
"url": stream_url,
|
|
63
|
-
"authenticate_request": authenticate_request,
|
|
64
|
-
"creds": creds,
|
|
65
|
-
"id_token": id_token,
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
@st.cache_resource()
|
|
70
|
-
def get_local_agent(agent_callable_path: str) -> Any:
|
|
71
|
-
"""Get cached local agent instance."""
|
|
72
|
-
module_path, class_name = agent_callable_path.rsplit(".", 1)
|
|
73
|
-
module = importlib.import_module(module_path)
|
|
74
|
-
agent = getattr(module, class_name)()
|
|
75
|
-
agent.set_up()
|
|
76
|
-
return agent
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
class Client:
|
|
80
|
-
"""A client for streaming events from a server."""
|
|
81
|
-
|
|
82
|
-
def __init__(
|
|
83
|
-
self,
|
|
84
|
-
agent_callable_path: str | None = None,
|
|
85
|
-
remote_agent_engine_id: str | None = None,
|
|
86
|
-
url: str | None = None,
|
|
87
|
-
authenticate_request: bool = False,
|
|
88
|
-
) -> None:
|
|
89
|
-
"""Initialize the Client with appropriate configuration.
|
|
90
|
-
|
|
91
|
-
Args:
|
|
92
|
-
agent_callable_path: Path to local agent class
|
|
93
|
-
remote_agent_engine_id: ID of remote Agent engine
|
|
94
|
-
url: URL for remote service
|
|
95
|
-
authenticate_request: Whether to authenticate requests to remote URL
|
|
96
|
-
"""
|
|
97
|
-
if url:
|
|
98
|
-
remote_config = get_remote_url_config(url, authenticate_request)
|
|
99
|
-
self.url = remote_config["url"]
|
|
100
|
-
self.authenticate_request = remote_config["authenticate_request"]
|
|
101
|
-
self.creds = remote_config["creds"]
|
|
102
|
-
self.id_token = remote_config["id_token"]
|
|
103
|
-
self.agent = None
|
|
104
|
-
elif remote_agent_engine_id:
|
|
105
|
-
self.agent = get_remote_agent(remote_agent_engine_id)
|
|
106
|
-
self.url = None
|
|
107
|
-
else:
|
|
108
|
-
self.url = None
|
|
109
|
-
if agent_callable_path is None:
|
|
110
|
-
raise ValueError("agent_callable_path cannot be None")
|
|
111
|
-
self.agent = get_local_agent(agent_callable_path)
|
|
112
|
-
|
|
113
|
-
def log_feedback(self, feedback_dict: dict[str, Any], invocation_id: str) -> None:
|
|
114
|
-
"""Log user feedback for a specific run."""
|
|
115
|
-
score = feedback_dict["score"]
|
|
116
|
-
if score == "😞":
|
|
117
|
-
score = 0.0
|
|
118
|
-
elif score == "🙁":
|
|
119
|
-
score = 0.25
|
|
120
|
-
elif score == "😐":
|
|
121
|
-
score = 0.5
|
|
122
|
-
elif score == "🙂":
|
|
123
|
-
score = 0.75
|
|
124
|
-
elif score == "😀":
|
|
125
|
-
score = 1.0
|
|
126
|
-
feedback_dict["score"] = score
|
|
127
|
-
feedback_dict["invocation_id"] = invocation_id
|
|
128
|
-
feedback_dict["log_type"] = "feedback"
|
|
129
|
-
# Ensure text field is not None
|
|
130
|
-
if feedback_dict.get("text") is None:
|
|
131
|
-
feedback_dict["text"] = ""
|
|
132
|
-
feedback_dict.pop("type")
|
|
133
|
-
url = urljoin(self.url, "feedback")
|
|
134
|
-
headers = {
|
|
135
|
-
"Content-Type": "application/json",
|
|
136
|
-
}
|
|
137
|
-
if self.url:
|
|
138
|
-
url = urljoin(self.url, "feedback")
|
|
139
|
-
headers = {
|
|
140
|
-
"Content-Type": "application/json",
|
|
141
|
-
}
|
|
142
|
-
if self.authenticate_request:
|
|
143
|
-
headers["Authorization"] = f"Bearer {self.id_token}"
|
|
144
|
-
requests.post(
|
|
145
|
-
url, data=json.dumps(feedback_dict), headers=headers, timeout=10
|
|
146
|
-
)
|
|
147
|
-
elif self.agent is not None:
|
|
148
|
-
self.agent.register_feedback(feedback=feedback_dict)
|
|
149
|
-
else:
|
|
150
|
-
raise ValueError("No agent or URL configured for feedback logging")
|
|
151
|
-
|
|
152
|
-
def stream_messages(
|
|
153
|
-
self, data: dict[str, Any]
|
|
154
|
-
) -> Generator[dict[str, Any], None, None]:
|
|
155
|
-
"""Stream events from the server, yielding parsed event data."""
|
|
156
|
-
if self.url:
|
|
157
|
-
headers = {
|
|
158
|
-
"Content-Type": "application/json",
|
|
159
|
-
"Accept": "text/event-stream",
|
|
160
|
-
}
|
|
161
|
-
if self.authenticate_request:
|
|
162
|
-
headers["Authorization"] = f"Bearer {self.id_token}"
|
|
163
|
-
with requests.post(
|
|
164
|
-
self.url, json=data, headers=headers, stream=True, timeout=60
|
|
165
|
-
) as response:
|
|
166
|
-
for line in response.iter_lines():
|
|
167
|
-
if line:
|
|
168
|
-
try:
|
|
169
|
-
event = json.loads(line.decode("utf-8"))
|
|
170
|
-
yield event
|
|
171
|
-
except json.JSONDecodeError:
|
|
172
|
-
print(f"Failed to parse event: {line.decode('utf-8')}")
|
|
173
|
-
elif self.agent is not None:
|
|
174
|
-
yield from self.agent.stream_query(**data)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
class StreamHandler:
|
|
178
|
-
"""Handles streaming updates to a Streamlit interface."""
|
|
179
|
-
|
|
180
|
-
def __init__(self, st: Any, initial_text: str = "") -> None:
|
|
181
|
-
"""Initialize the StreamHandler with Streamlit context and initial text."""
|
|
182
|
-
self.st = st
|
|
183
|
-
self.tool_expander = st.expander("Tool Calls:", expanded=False)
|
|
184
|
-
self.container = st.empty()
|
|
185
|
-
self.text = initial_text
|
|
186
|
-
self.tools_logs = initial_text
|
|
187
|
-
|
|
188
|
-
def new_token(self, token: str) -> None:
|
|
189
|
-
"""Add a new token to the main text display."""
|
|
190
|
-
self.text += token
|
|
191
|
-
self.container.markdown(format_content(self.text), unsafe_allow_html=True)
|
|
192
|
-
|
|
193
|
-
def new_status(self, status_update: str) -> None:
|
|
194
|
-
"""Add a new status update to the tool calls expander."""
|
|
195
|
-
self.tools_logs += status_update
|
|
196
|
-
self.tool_expander.markdown(status_update)
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
class EventProcessor:
|
|
200
|
-
"""Processes events from the stream and updates the UI accordingly."""
|
|
201
|
-
|
|
202
|
-
def __init__(self, st: Any, client: Client, stream_handler: StreamHandler) -> None:
|
|
203
|
-
"""Initialize the EventProcessor with Streamlit context, client, and stream handler."""
|
|
204
|
-
self.st = st
|
|
205
|
-
self.client = client
|
|
206
|
-
self.stream_handler = stream_handler
|
|
207
|
-
self.final_content = ""
|
|
208
|
-
self.tool_calls: list[dict[str, Any]] = []
|
|
209
|
-
self.additional_kwargs: dict[str, Any] = {}
|
|
210
|
-
|
|
211
|
-
def process_events(self) -> None:
|
|
212
|
-
"""Process events from the stream, handling each event type appropriately."""
|
|
213
|
-
messages = self.st.session_state.user_chats[
|
|
214
|
-
self.st.session_state["session_id"]
|
|
215
|
-
]["messages"]
|
|
216
|
-
|
|
217
|
-
session = self.st.session_state["session_id"]
|
|
218
|
-
stream = self.client.stream_messages(
|
|
219
|
-
data={
|
|
220
|
-
"message": messages[-1]["content"],
|
|
221
|
-
"events": messages[:-1],
|
|
222
|
-
"user_id": self.st.session_state["user_id"],
|
|
223
|
-
"session_id": self.st.session_state["session_id"],
|
|
224
|
-
}
|
|
225
|
-
)
|
|
226
|
-
|
|
227
|
-
for message in stream:
|
|
228
|
-
event = Event.model_validate(message)
|
|
229
|
-
|
|
230
|
-
# Skip processing if event has no content or parts
|
|
231
|
-
if not event.content or not event.content.parts:
|
|
232
|
-
continue
|
|
233
|
-
|
|
234
|
-
# Process each part in the event content
|
|
235
|
-
for part in event.content.parts:
|
|
236
|
-
# Case 1: Process function/tool calls
|
|
237
|
-
if part.function_call:
|
|
238
|
-
# Extract tool call information
|
|
239
|
-
tool_call = {
|
|
240
|
-
"name": part.function_call.name,
|
|
241
|
-
"args": part.function_call.args,
|
|
242
|
-
"id": part.function_call.id,
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
# Track tool calls and update UI
|
|
246
|
-
self.tool_calls.append(event.model_dump())
|
|
247
|
-
tool_message = (
|
|
248
|
-
f"\n\nCalling tool: `{tool_call['name']}` "
|
|
249
|
-
f"with args: `{tool_call['args']}`"
|
|
250
|
-
)
|
|
251
|
-
self.stream_handler.new_status(tool_message)
|
|
252
|
-
|
|
253
|
-
# Add to conversation history
|
|
254
|
-
self.st.session_state.user_chats[session]["messages"].append(
|
|
255
|
-
event.model_dump(mode="json")
|
|
256
|
-
)
|
|
257
|
-
# Case 2: Process function/tool responses
|
|
258
|
-
elif part.function_response:
|
|
259
|
-
# Extract response content
|
|
260
|
-
content = str(part.function_response.response)
|
|
261
|
-
|
|
262
|
-
# Track responses and update UI
|
|
263
|
-
self.tool_calls.append(event.model_dump())
|
|
264
|
-
response_message = f"\n\nTool response: `{content}`"
|
|
265
|
-
self.stream_handler.new_status(response_message)
|
|
266
|
-
|
|
267
|
-
# Add to conversation history
|
|
268
|
-
self.st.session_state.user_chats[session]["messages"].append(
|
|
269
|
-
event.model_dump(mode="json")
|
|
270
|
-
)
|
|
271
|
-
# Case 3: Process text responses
|
|
272
|
-
elif part.text:
|
|
273
|
-
if event.is_final_response():
|
|
274
|
-
# Store the final response in conversation history
|
|
275
|
-
self.st.session_state.user_chats[session]["messages"].append(
|
|
276
|
-
event.model_dump(mode="json")
|
|
277
|
-
)
|
|
278
|
-
# Save the invocation ID - it might be used by the feedback functionality
|
|
279
|
-
self.st.session_state["invocation_id"] = event.invocation_id
|
|
280
|
-
else:
|
|
281
|
-
# For streaming chunks, accumulate text and update UI
|
|
282
|
-
self.final_content += part.text
|
|
283
|
-
self.stream_handler.new_token(part.text)
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
def get_chain_response(st: Any, client: Client, stream_handler: StreamHandler) -> None:
|
|
287
|
-
"""Process the chain response update the Streamlit UI.
|
|
288
|
-
|
|
289
|
-
This function initiates the event processing for a chain of operations,
|
|
290
|
-
involving an AI model's response generation and potential tool calls.
|
|
291
|
-
It creates an EventProcessor instance and starts the event processing loop.
|
|
292
|
-
|
|
293
|
-
Args:
|
|
294
|
-
st (Any): The Streamlit app instance, used for accessing session state
|
|
295
|
-
and updating the UI.
|
|
296
|
-
client (Client): An instance of the Client class used to stream events
|
|
297
|
-
from the server.
|
|
298
|
-
stream_handler (StreamHandler): An instance of the StreamHandler class
|
|
299
|
-
used to update the Streamlit UI with
|
|
300
|
-
streaming content.
|
|
301
|
-
|
|
302
|
-
Returns:
|
|
303
|
-
None
|
|
304
|
-
|
|
305
|
-
Side effects:
|
|
306
|
-
- Updates the Streamlit UI with streaming tokens and tool call information.
|
|
307
|
-
- Modifies the session state to include the final AI message and run ID.
|
|
308
|
-
- Handles various events like chain starts/ends, tool calls, and model outputs.
|
|
309
|
-
"""
|
|
310
|
-
processor = EventProcessor(st, client, stream_handler)
|
|
311
|
-
processor.process_events()
|
|
@@ -1,129 +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
|
-
# mypy: disable-error-code="assignment"
|
|
16
|
-
import os
|
|
17
|
-
from typing import Any
|
|
18
|
-
|
|
19
|
-
import google.auth
|
|
20
|
-
from google import genai
|
|
21
|
-
from google.adk.events.event import Event
|
|
22
|
-
from google.genai.types import Content, GenerateContentConfig, HttpOptions, Part
|
|
23
|
-
|
|
24
|
-
SYS_INSTRUCTION = """Given a list of messages between a human and AI, come up with a short and relevant title for the conversation. Use up to 10 words. The title needs to be concise.
|
|
25
|
-
Examples:
|
|
26
|
-
**Input:**
|
|
27
|
-
```
|
|
28
|
-
Human: hi, what is the best italian dish?
|
|
29
|
-
AI: That's a tough one! Italy has so many amazing dishes, it's hard to pick just one "best." To help me give you a great suggestion, tell me a little more about what you're looking for.
|
|
30
|
-
```
|
|
31
|
-
**Output:** Best italian dish
|
|
32
|
-
|
|
33
|
-
**Input:**
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
Human: How to fix a broken laptop screen?
|
|
37
|
-
AI: Fixing a broken laptop screen can be tricky and often requires professional help. However, there are a few things you can try at home before resorting to a repair shop.
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Output:** Fixing a broken laptop screen
|
|
41
|
-
|
|
42
|
-
**Input:**
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
Human: Can you write me a poem about the beach?
|
|
46
|
-
AI: As the sun dips down below the horizon
|
|
47
|
-
And the waves gently kiss the shore,
|
|
48
|
-
I sit here and watch the ocean
|
|
49
|
-
And feel its power evermore.
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**Output:** Poem about the beach
|
|
53
|
-
|
|
54
|
-
**Input:**
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
Human: What's the best way to learn to code?
|
|
58
|
-
AI: There are many ways to learn to code, and the best method for you will depend on your learning style and goals.
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**Output:** How to learn to code
|
|
62
|
-
|
|
63
|
-
If there's not enough context in the conversation to create a meaningful title, create a generic title like "New Conversation", or "A simple greeting".
|
|
64
|
-
|
|
65
|
-
"""
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class TitleGenerator:
|
|
69
|
-
"""Generates concise titles for conversations using Gemini model."""
|
|
70
|
-
|
|
71
|
-
def __init__(self) -> None:
|
|
72
|
-
_, project_id = google.auth.default()
|
|
73
|
-
|
|
74
|
-
self.client = genai.Client(
|
|
75
|
-
http_options=HttpOptions(api_version="v1"),
|
|
76
|
-
vertexai=True,
|
|
77
|
-
project=project_id,
|
|
78
|
-
location=os.getenv("LOCATION", "us-central1"),
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
def summarize(self, events: list[Event]) -> str:
|
|
82
|
-
"""Generates a title based on a list of conversation events."""
|
|
83
|
-
contents = []
|
|
84
|
-
# Extract text content from each event and add it to the contents list
|
|
85
|
-
for event in events:
|
|
86
|
-
if event.get("content") and event["content"].get("parts"):
|
|
87
|
-
text_parts = [
|
|
88
|
-
part.get("text", "")
|
|
89
|
-
for part in event["content"]["parts"]
|
|
90
|
-
if part.get("text")
|
|
91
|
-
]
|
|
92
|
-
text_content = "\n".join(text_parts)
|
|
93
|
-
if text_content.strip():
|
|
94
|
-
contents.append(
|
|
95
|
-
Content(
|
|
96
|
-
role=event["content"].get("role", "user"),
|
|
97
|
-
parts=[Part.from_text(text=text_content)],
|
|
98
|
-
)
|
|
99
|
-
)
|
|
100
|
-
contents.append(
|
|
101
|
-
Content(
|
|
102
|
-
role="user",
|
|
103
|
-
parts=[
|
|
104
|
-
Part.from_text(text="End of conversation - Create one single title")
|
|
105
|
-
],
|
|
106
|
-
)
|
|
107
|
-
)
|
|
108
|
-
response = self.client.models.generate_content(
|
|
109
|
-
model="gemini-2.0-flash-001",
|
|
110
|
-
contents=contents,
|
|
111
|
-
config=GenerateContentConfig(
|
|
112
|
-
system_instruction=SYS_INSTRUCTION,
|
|
113
|
-
max_output_tokens=10,
|
|
114
|
-
temperature=0,
|
|
115
|
-
),
|
|
116
|
-
).text
|
|
117
|
-
return response
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
class DummySummarizer:
|
|
121
|
-
"""A simple summarizer that returns a fixed string."""
|
|
122
|
-
|
|
123
|
-
def __init__(self) -> None:
|
|
124
|
-
"""Initialize the dummy summarizer."""
|
|
125
|
-
pass
|
|
126
|
-
|
|
127
|
-
def summarize(self, **kwargs: Any) -> str:
|
|
128
|
-
"""Return a simple summary string regardless of input."""
|
|
129
|
-
return "Conversation"
|
|
@@ -1,27 +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 python:3.11-slim
|
|
16
|
-
|
|
17
|
-
RUN pip install --no-cache-dir \
|
|
18
|
-
"bigframes==1.36.0" \
|
|
19
|
-
"langchain==0.3.18" \
|
|
20
|
-
"markdownify==0.14.1" \
|
|
21
|
-
"swifter==1.4.0" \
|
|
22
|
-
"google-cloud-aiplatform>=1.80.0" \
|
|
23
|
-
"kfp>=1.4.0" \
|
|
24
|
-
"google-cloud-discoveryengine==0.13.6" \
|
|
25
|
-
"backoff==2.2.1" \
|
|
26
|
-
"google-cloud-pipeline-components==2.19.0" \
|
|
27
|
-
"langchain-google-vertexai==2.0.13"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
|
|
2
|
-
RUN apt-get update && apt-get install -y wget sudo apt-transport-https ca-certificates gnupg curl software-properties-common && \
|
|
3
|
-
# Setup GitHub CLI
|
|
4
|
-
sudo mkdir -p -m 755 /etc/apt/keyrings && \
|
|
5
|
-
wget -q -O- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \
|
|
6
|
-
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && \
|
|
7
|
-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
|
|
8
|
-
# Setup Google Cloud SDK
|
|
9
|
-
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
|
|
10
|
-
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
|
|
11
|
-
# Setup Terraform
|
|
12
|
-
wget -q -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null && \
|
|
13
|
-
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list > /dev/null && \
|
|
14
|
-
# Install all packages at once
|
|
15
|
-
apt-get update && \
|
|
16
|
-
apt-get install -y gh google-cloud-cli terraform && \
|
|
17
|
-
# Clean up
|
|
18
|
-
apt-get clean && \
|
|
19
|
-
rm -rf /var/lib/apt/lists/*
|
src/resources/idx/.idx/dev.nix
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# To learn more about how to use Nix to configure your environment
|
|
3
|
-
# see: https://firebase.google.com/docs/studio/customize-workspace
|
|
4
|
-
{ pkgs, ... }: {
|
|
5
|
-
# Which nixpkgs channel to use.
|
|
6
|
-
channel = "stable-24.11"; # or "unstable"
|
|
7
|
-
|
|
8
|
-
# Use https://search.nixos.org/packages to find packages
|
|
9
|
-
packages = [
|
|
10
|
-
pkgs.python311
|
|
11
|
-
pkgs.python311Packages.pip
|
|
12
|
-
pkgs.python311Packages.uv
|
|
13
|
-
pkgs.gnumake
|
|
14
|
-
pkgs.terraform
|
|
15
|
-
pkgs.gh
|
|
16
|
-
];
|
|
17
|
-
# Sets environment variables in the workspace
|
|
18
|
-
env = {};
|
|
19
|
-
idx = {
|
|
20
|
-
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
|
|
21
|
-
extensions = [
|
|
22
|
-
"ms-toolsai.jupyter"
|
|
23
|
-
"ms-python.python"
|
|
24
|
-
"krish-r.vscode-toggle-terminal"
|
|
25
|
-
];
|
|
26
|
-
workspace = {
|
|
27
|
-
# Runs when a workspace is first created with this `dev.nix` file
|
|
28
|
-
onCreate = {
|
|
29
|
-
create-venv = ''
|
|
30
|
-
# Load environment variables from .env file if it exists
|
|
31
|
-
source .env
|
|
32
|
-
echo "Logging into gcloud..."
|
|
33
|
-
echo "Please authenticate with Google Cloud by following the prompts."
|
|
34
|
-
gcloud auth login --update-adc --brief --quiet
|
|
35
|
-
|
|
36
|
-
echo "Setting gcloud project..."
|
|
37
|
-
gcloud config set project $GOOGLE_CLOUD_PROJECT
|
|
38
|
-
|
|
39
|
-
echo "Creating Python virtual environment and installing packages..."
|
|
40
|
-
uv venv && uv pip install agent-starter-pack
|
|
41
|
-
echo "alias agent-starter-pack=\"~/$WS_NAME/.venv/bin/agent-starter-pack\"" >> ~/.bashrc
|
|
42
|
-
source ~/.bashrc
|
|
43
|
-
|
|
44
|
-
echo "Running agent starter pack creation..."
|
|
45
|
-
uv run agent-starter-pack create $AGENT_NAME
|
|
46
|
-
code ~/$WS_NAME/$AGENT_NAME/README.md
|
|
47
|
-
exec bash
|
|
48
|
-
'';
|
|
49
|
-
# Open editors for the following files by default, if they exist:
|
|
50
|
-
default.openFiles = [];
|
|
51
|
-
};
|
|
52
|
-
# To run something each time the workspace is (re)started, use the `onStart` hook
|
|
53
|
-
};
|
|
54
|
-
# Enable previews and customize configuration
|
|
55
|
-
previews = {};
|
|
56
|
-
};
|
|
57
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Agent Starter Pack",
|
|
3
|
-
"description": "Production-ready Gen AI Agent templates for Google Cloud. Addressing common challenges (Deployment & Operations, Evaluation, Customization, Observability) in building and deploying GenAI agents.",
|
|
4
|
-
"icon": "https://github.com/GoogleCloudPlatform/agent-starter-pack/blob/main/docs/images/icon.png?raw=true",
|
|
5
|
-
"params": [
|
|
6
|
-
{
|
|
7
|
-
"id": "agent_name",
|
|
8
|
-
"name": "Agent Name",
|
|
9
|
-
"description": "The name of the agent being created.",
|
|
10
|
-
"type": "string",
|
|
11
|
-
"required": true
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"id": "google_cloud_project_id",
|
|
15
|
-
"name": "Your Goole Cloud Project ID",
|
|
16
|
-
"description": "The Google Cloud Platform Project ID where resources will be managed.",
|
|
17
|
-
"type": "string",
|
|
18
|
-
"required": true
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# No user-configurable parameters
|
|
2
|
-
# Accept additional arguments to this template corresponding to template
|
|
3
|
-
# parameter IDs
|
|
4
|
-
{ pkgs, agent_name ? "", google_cloud_project_id ? "", ... }: {
|
|
5
|
-
# Shell script that produces the final environment
|
|
6
|
-
bootstrap = ''
|
|
7
|
-
# Copy the folder containing the `idx-template` files to the final
|
|
8
|
-
# project folder for the new workspace. ${./.} inserts the directory
|
|
9
|
-
# of the checked-out Git folder containing this template.
|
|
10
|
-
cp -rf ${./.} "$out"
|
|
11
|
-
|
|
12
|
-
# Set some permissions
|
|
13
|
-
chmod -R +w "$out"
|
|
14
|
-
|
|
15
|
-
# Create .env file with the parameter values
|
|
16
|
-
cat > "$out/.env" << EOF
|
|
17
|
-
AGENT_NAME=${agent_name}
|
|
18
|
-
GOOGLE_CLOUD_PROJECT=${google_cloud_project_id}
|
|
19
|
-
WS_NAME=$WS_NAME
|
|
20
|
-
EOF
|
|
21
|
-
|
|
22
|
-
# Remove the template files themselves and any connection to the template's
|
|
23
|
-
# Git repository
|
|
24
|
-
rm -rf "$out/.git" "$out/idx-template".{nix,json}
|
|
25
|
-
'';
|
|
26
|
-
}
|