agent-starter-pack 0.1.6__py3-none-any.whl → 0.2.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.
Potentially problematic release.
This version of agent-starter-pack might be problematic. Click here for more details.
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/METADATA +6 -6
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/RECORD +78 -78
- agents/{agentic_rag_vertexai_search → agentic_rag}/README.md +3 -3
- agents/{agentic_rag_vertexai_search → agentic_rag}/app/agent.py +22 -6
- agents/agentic_rag/app/retrievers.py +132 -0
- agents/{agentic_rag_vertexai_search → agentic_rag}/notebooks/evaluating_langgraph_agent.ipynb +3 -3
- agents/{agentic_rag_vertexai_search → agentic_rag}/template/.templateconfig.yaml +3 -5
- agents/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb +4 -4
- agents/crewai_coding_crew/notebooks/evaluating_langgraph_agent.ipynb +3 -3
- agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb +3 -3
- agents/{multimodal_live_api → live_api}/README.md +7 -0
- agents/{multimodal_live_api → live_api}/app/agent.py +3 -11
- agents/{multimodal_live_api → live_api}/app/server.py +3 -2
- agents/{multimodal_live_api → live_api}/template/.templateconfig.yaml +2 -2
- src/base_template/Makefile +12 -7
- src/base_template/README.md +71 -71
- src/base_template/app/utils/tracing.py +3 -1
- src/base_template/app/utils/typing.py +1 -0
- src/base_template/deployment/cd/deploy-to-prod.yaml +10 -4
- src/base_template/deployment/cd/staging.yaml +11 -10
- src/base_template/deployment/ci/pr_checks.yaml +1 -1
- src/base_template/deployment/terraform/apis.tf +6 -0
- src/base_template/deployment/terraform/build_triggers.tf +34 -21
- src/base_template/deployment/terraform/dev/iam.tf +13 -6
- src/base_template/deployment/terraform/dev/log_sinks.tf +25 -28
- src/base_template/deployment/terraform/dev/providers.tf +1 -0
- src/base_template/deployment/terraform/dev/storage.tf +69 -11
- src/base_template/deployment/terraform/dev/variables.tf +50 -53
- src/base_template/deployment/terraform/dev/vars/env.tfvars +13 -11
- src/base_template/deployment/terraform/iam.tf +3 -3
- src/base_template/deployment/terraform/log_sinks.tf +24 -26
- src/base_template/deployment/terraform/providers.tf +2 -0
- src/base_template/deployment/terraform/service_accounts.tf +7 -7
- src/base_template/deployment/terraform/storage.tf +123 -11
- src/base_template/deployment/terraform/variables.tf +49 -70
- src/base_template/deployment/terraform/vars/env.tfvars +12 -17
- src/base_template/pyproject.toml +4 -3
- src/cli/commands/create.py +79 -19
- src/cli/commands/setup_cicd.py +91 -22
- src/cli/main.py +3 -1
- src/cli/utils/__init__.py +9 -2
- src/cli/utils/cicd.py +12 -0
- src/cli/utils/datastores.py +32 -0
- src/cli/utils/gcp.py +4 -6
- src/cli/utils/template.py +127 -45
- src/cli/utils/version.py +87 -0
- src/data_ingestion/README.md +24 -19
- src/data_ingestion/data_ingestion_pipeline/components/ingest_data.py +135 -2
- src/data_ingestion/data_ingestion_pipeline/components/process_data.py +276 -2
- src/data_ingestion/data_ingestion_pipeline/pipeline.py +28 -5
- src/data_ingestion/data_ingestion_pipeline/submit_pipeline.py +49 -14
- src/data_ingestion/pyproject.toml +1 -0
- src/deployment_targets/agent_engine/app/agent_engine_app.py +3 -1
- src/deployment_targets/cloud_run/tests/unit/test_server.py +15 -33
- src/frontends/live_api_react/frontend/package-lock.json +226 -186
- src/frontends/live_api_react/frontend/package.json +1 -1
- src/frontends/streamlit/frontend/utils/stream_handler.py +5 -5
- src/resources/containers/data_processing/Dockerfile +3 -1
- src/resources/locks/{uv-agentic_rag_vertexai_search-agent_engine.lock → uv-agentic_rag-agent_engine.lock} +747 -694
- src/resources/locks/{uv-agentic_rag_vertexai_search-cloud_run.lock → uv-agentic_rag-cloud_run.lock} +944 -806
- src/resources/locks/uv-crewai_coding_crew-agent_engine.lock +651 -694
- src/resources/locks/uv-crewai_coding_crew-cloud_run.lock +813 -789
- src/resources/locks/uv-langgraph_base_react-agent_engine.lock +666 -686
- src/resources/locks/uv-langgraph_base_react-cloud_run.lock +848 -798
- src/resources/locks/{uv-multimodal_live_api-cloud_run.lock → uv-live_api-cloud_run.lock} +856 -791
- src/resources/setup_cicd/cicd_variables.tf +5 -0
- src/resources/setup_cicd/github.tf +4 -2
- src/utils/watch_and_rebuild.py +14 -0
- agents/agentic_rag_vertexai_search/app/retrievers.py +0 -79
- src/deployment_targets/cloud_run/deployment/terraform/artifact_registry.tf +0 -22
- src/deployment_targets/cloud_run/deployment/terraform/dev/service_accounts.tf +0 -20
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/entry_points.txt +0 -0
- {agent_starter_pack-0.1.6.dist-info → agent_starter_pack-0.2.0.dist-info}/licenses/LICENSE +0 -0
- /agents/{agentic_rag_vertexai_search → agentic_rag}/app/templates.py +0 -0
- /agents/{agentic_rag_vertexai_search → agentic_rag}/tests/integration/test_agent.py +0 -0
- /agents/{multimodal_live_api → live_api}/app/templates.py +0 -0
- /agents/{multimodal_live_api → live_api}/app/vector_store.py +0 -0
- /agents/{multimodal_live_api → live_api}/tests/integration/test_server_e2e.py +0 -0
- /agents/{multimodal_live_api → live_api}/tests/load_test/load_test.py +0 -0
- /agents/{multimodal_live_api → live_api}/tests/unit/test_server.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-starter-pack
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: CLI tool to create GCP-based AI agent projects from templates
|
|
5
5
|
Author-email: Google LLC <agent-starter-pack@google.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -24,7 +24,7 @@ Description-Content-Type: text/markdown
|
|
|
24
24
|
|
|
25
25
|
# 🚀 Agent Starter Pack
|
|
26
26
|
|
|
27
|
-
 [](https://youtu.be/jHt-ZVD660g) [](./docs/README.md)
|
|
27
|
+
 [](https://youtu.be/jHt-ZVD660g) [](./docs/README.md) 
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
The `agent-starter-pack` is a collection of production-ready Generative AI Agent templates built for Google Cloud. <br>
|
|
@@ -70,9 +70,9 @@ agent-starter-pack create my-agent -d agent_engine -a langgraph_base_react
|
|
|
70
70
|
| Agent Name | Description |
|
|
71
71
|
|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
|
72
72
|
| `langgraph_base_react` | A agent implementing a base ReAct agent using LangGraph |
|
|
73
|
-
| `
|
|
73
|
+
| `agentic_rag` | A RAG agent using LangGraph for document retrieval and Q&A. Supporting [Vertex AI Search](https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction) and [Vector Search](https://cloud.google.com/vertex-ai/docs/vector-search/overview). |
|
|
74
74
|
| `crewai_coding_crew` | A multi-agent system implemented with CrewAI created to support coding activities |
|
|
75
|
-
| `
|
|
75
|
+
| `live_api` | A real-time multimodal RAG agent powered by Gemini, supporting audio/video/text chat with vector DB-backed responses |
|
|
76
76
|
|
|
77
77
|
**More agents are on the way!** We are continuously expanding our [agent library](./agents/). Have a specific agent type in mind? [Contribute!](#contributing)
|
|
78
78
|
|
|
@@ -82,7 +82,7 @@ agent-starter-pack create my-agent -d agent_engine -a langgraph_base_react
|
|
|
82
82
|
The `agent-starter-pack` offers two key features to accelerate and simplify the development of your agent:
|
|
83
83
|
|
|
84
84
|
- **🔄 [CI/CD Automation (Experimental)](docs/cli/setup_cicd.md)** - One command to set up a complete GitHub + Cloud Build pipeline for all environments
|
|
85
|
-
- **📥 [Data Pipeline for RAG with
|
|
85
|
+
- **📥 [Data Pipeline for RAG with Terraform/CI-CD](docs/data-ingestion.md)** - Seamlessly integrate a data pipeline to process embeddings for RAG into your agent system. Supporting [Vertex AI Search](https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction) and [Vector Search](https://cloud.google.com/vertex-ai/docs/vector-search/overview).
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
## High-Level Architecture
|
|
@@ -98,7 +98,7 @@ This starter pack covers all aspects of Agent development, from prototyping and
|
|
|
98
98
|
This project represents the next evolution of the [e2e-gen-ai-app-starter-pack](goo.gle/e2e-gen-ai-app-starter-pack). Building on the foundation of the original, we've made significant improvements:
|
|
99
99
|
|
|
100
100
|
* **Streamlined CLI:** A new command-line interface (`agent-starter-pack`) simplifies project creation, template selection, and deployment.
|
|
101
|
-
* **Expanded Agent Options:**
|
|
101
|
+
* **Expanded Agent Options:** Support for a wider variety of agent frameworks (LangGraph, CrewAI, and the Google GenAI SDK) and deployment targets (including Vertex AI Agent Engine).
|
|
102
102
|
* **Simplified setup**: Integrated gcloud authentication and projects and region configurations
|
|
103
103
|
|
|
104
104
|
---
|
|
@@ -1,78 +1,80 @@
|
|
|
1
|
-
agents/
|
|
2
|
-
agents/
|
|
3
|
-
agents/
|
|
4
|
-
agents/
|
|
5
|
-
agents/
|
|
6
|
-
agents/
|
|
7
|
-
agents/
|
|
1
|
+
agents/agentic_rag/README.md,sha256=TTja750olu5bIysddw8kFF1MlAYQGYdEZVI08oL7-ts,1984
|
|
2
|
+
agents/agentic_rag/app/agent.py,sha256=g9IrWRk4BT9-J911v7mDT6YyvFqOzUrEI6sO1YJbzLk,5331
|
|
3
|
+
agents/agentic_rag/app/retrievers.py,sha256=qfxwSEixMddvAu4FvUTZAFh1Gdp3RPY65s0Wp6gEFVk,4561
|
|
4
|
+
agents/agentic_rag/app/templates.py,sha256=h3dtaVScPNMLqEudh63ZURzZh59p4tclKusFP5rWPgA,1632
|
|
5
|
+
agents/agentic_rag/notebooks/evaluating_langgraph_agent.ipynb,sha256=fb4rTMlA-XCniZyPIP9ni4nvIDmLj9Uq8Saw7WrG0fc,58015
|
|
6
|
+
agents/agentic_rag/template/.templateconfig.yaml,sha256=4sP1Dw7Men2h4aLBlqlB44T3FNXbVPmqAvjSIGJikSo,1071
|
|
7
|
+
agents/agentic_rag/tests/integration/test_agent.py,sha256=8Y4BUvfxPaiEcT8WvdMTl5hVYTWS_W_4aQtYmgrdgx8,1935
|
|
8
8
|
agents/crewai_coding_crew/README.md,sha256=4No7sfHQVHELARGiT3fWANJzDR0NP48ow4ct3FoPwlA,1672
|
|
9
9
|
agents/crewai_coding_crew/app/agent.py,sha256=GcmNrOyRPhnI7LICIV6GvBvcDfA_PKqPsQcOEzAORmY,3269
|
|
10
10
|
agents/crewai_coding_crew/app/crew/crew.py,sha256=pqeeJ4txP-gcVT3PKEAw2zZ4x8g4cDlnFFbf0_zZRr4,2000
|
|
11
11
|
agents/crewai_coding_crew/app/crew/config/agents.yaml,sha256=Cn9zTcP3C-8MvlV19cYdlxR0iIs2_FOy2gKOJLUpNRo,1154
|
|
12
12
|
agents/crewai_coding_crew/app/crew/config/tasks.yaml,sha256=SSFuiSQPhi4dM0V5HdNuMqtN7JJr5RUCMhhBzUkPBpc,1511
|
|
13
|
-
agents/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb,sha256=
|
|
14
|
-
agents/crewai_coding_crew/notebooks/evaluating_langgraph_agent.ipynb,sha256=
|
|
13
|
+
agents/crewai_coding_crew/notebooks/evaluating_crewai_agent.ipynb,sha256=ifTn4RfrJeYQ8ell9n6VE65ZEfcnKGkMLFG8RBlPK70,57974
|
|
14
|
+
agents/crewai_coding_crew/notebooks/evaluating_langgraph_agent.ipynb,sha256=fb4rTMlA-XCniZyPIP9ni4nvIDmLj9Uq8Saw7WrG0fc,58015
|
|
15
15
|
agents/crewai_coding_crew/template/.templateconfig.yaml,sha256=cl2idKg9NZKrkIkDhxCVSiDIJaoDjy5yMVmVc93Nlm8,974
|
|
16
16
|
agents/crewai_coding_crew/tests/integration/test_agent.py,sha256=0uvfmM3FSdESIU7ICb2oqABsQqylQU2PE3UBwbpif-A,1629
|
|
17
17
|
agents/langgraph_base_react/README.md,sha256=erfhoSbEqbqn1XM_sSjxXyWleBWIyAMuaN5xMIG6f3M,485
|
|
18
18
|
agents/langgraph_base_react/app/agent.py,sha256=2HsbZaSLpMhJQ21geauKPfavcavPW50lx4WV5dXlvnQ,2514
|
|
19
|
-
agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb,sha256=
|
|
19
|
+
agents/langgraph_base_react/notebooks/evaluating_langgraph_agent.ipynb,sha256=fb4rTMlA-XCniZyPIP9ni4nvIDmLj9Uq8Saw7WrG0fc,58015
|
|
20
20
|
agents/langgraph_base_react/template/.templateconfig.yaml,sha256=NpQRZbXtCOeX0XiYtqyI73V6zH4tWWr1TpcTDsSTcjw,991
|
|
21
21
|
agents/langgraph_base_react/tests/integration/test_agent.py,sha256=wg2Y8V4l7dh7rhWy7Z8zioDW5ILRsz7RZJ-mz0AhK3U,1619
|
|
22
|
-
agents/
|
|
23
|
-
agents/
|
|
24
|
-
agents/
|
|
25
|
-
agents/
|
|
26
|
-
agents/
|
|
27
|
-
agents/
|
|
28
|
-
agents/
|
|
29
|
-
agents/
|
|
30
|
-
agents/
|
|
22
|
+
agents/live_api/README.md,sha256=eB6e1VAwOsX6d3ns2HgVzdtywKUaZ39-PraKFCjtj7s,3012
|
|
23
|
+
agents/live_api/app/agent.py,sha256=KXcc10JU-ytbvDmr8bx6uOGxoVQMckppUa29cQBA8rM,2522
|
|
24
|
+
agents/live_api/app/server.py,sha256=L4gcYKu-2gTVHPhHz809Ml-tFFvQ8uUtu4hPJ_y-Nd0,7119
|
|
25
|
+
agents/live_api/app/templates.py,sha256=HgA4QGIle4Q-Nr6xAAXk1pTX7eNbZqlQUD9_fbCvDWA,3301
|
|
26
|
+
agents/live_api/app/vector_store.py,sha256=AYRSNpfevbVTt-nnWna_dp2pn4T7o1nz9-9wOoWaxsA,2045
|
|
27
|
+
agents/live_api/template/.templateconfig.yaml,sha256=8X2NyfZeM47tg-QP6Efz7WR3AKWkDAlvKnYeMFiuMcY,1091
|
|
28
|
+
agents/live_api/tests/integration/test_server_e2e.py,sha256=D2VETDIyTD2fQyQ6DXwLr-POSYyVzzzcpIFLt5Ppyx4,8398
|
|
29
|
+
agents/live_api/tests/load_test/load_test.py,sha256=HHZyfC4gqiQtZVF_CbbxENGgWQccMLpwMv0IdoQ6cbQ,1275
|
|
30
|
+
agents/live_api/tests/unit/test_server.py,sha256=_TjlgQgNkjerIaBGnu8P8_KB8ZlSolDcivALpUOn_Rw,4786
|
|
31
31
|
src/base_template/.gitignore,sha256=mJKTZIcVdAFiIUQicRfPNGUg6WvwcfTEC2xbmAaU34g,2579
|
|
32
|
-
src/base_template/Makefile,sha256=
|
|
33
|
-
src/base_template/README.md,sha256=
|
|
34
|
-
src/base_template/pyproject.toml,sha256=
|
|
35
|
-
src/base_template/app/utils/tracing.py,sha256=
|
|
36
|
-
src/base_template/app/utils/typing.py,sha256=
|
|
32
|
+
src/base_template/Makefile,sha256=1tNyhpY-6XUNr-9Kr-ApkAFZt7LlN9XbBvGLlqQfoxE,2866
|
|
33
|
+
src/base_template/README.md,sha256=tA4V5-wO--vZdDImvW2OYALEaSFLr5swjHosJE90pRs,9416
|
|
34
|
+
src/base_template/pyproject.toml,sha256=NyJ0L0-BofQ162fIzPO2SZGF6A8YmcwYYN7LMB3quGs,2813
|
|
35
|
+
src/base_template/app/utils/tracing.py,sha256=JA5xVmWpJqaMiNUcD5irGS7Xii1LO37Dmfmzt3kA0Ys,5715
|
|
36
|
+
src/base_template/app/utils/typing.py,sha256=LXvSescgmqf5V4h5vT5bcpu-6sWqzD6WgrEBGYLg1C0,3287
|
|
37
37
|
src/base_template/deployment/README.md,sha256=8AorSeF2Aj0kvPmuQLFrmAAUWVbdTzg0S-rVBbfdirQ,4835
|
|
38
|
-
src/base_template/deployment/cd/deploy-to-prod.yaml,sha256=
|
|
39
|
-
src/base_template/deployment/cd/staging.yaml,sha256=
|
|
40
|
-
src/base_template/deployment/ci/pr_checks.yaml,sha256=
|
|
41
|
-
src/base_template/deployment/terraform/apis.tf,sha256=
|
|
42
|
-
src/base_template/deployment/terraform/build_triggers.tf,sha256=
|
|
43
|
-
src/base_template/deployment/terraform/iam.tf,sha256
|
|
38
|
+
src/base_template/deployment/cd/deploy-to-prod.yaml,sha256=ayfsOtgYK346f8YYebmaZKZYdm_aOpN2wSkKyQdd6l8,4236
|
|
39
|
+
src/base_template/deployment/cd/staging.yaml,sha256=LQ_5zMoALhCffhu5a0TnCiMJdvcxkPy34ItBgfg0l6Y,7856
|
|
40
|
+
src/base_template/deployment/ci/pr_checks.yaml,sha256=XobyKDHvglLqMMVhFR4cMJ_VHaUI6q2aEWJplILtSO0,1487
|
|
41
|
+
src/base_template/deployment/terraform/apis.tf,sha256=98vqe53RLtFwnQq_9N1widR8J0c1SGqwhCXp_GohITA,1497
|
|
42
|
+
src/base_template/deployment/terraform/build_triggers.tf,sha256=TdGZNS5_2eMhHfH3k2GIsQNJ5DPZPN1EO1snRPdzEK4,6195
|
|
43
|
+
src/base_template/deployment/terraform/iam.tf,sha256=-KrOngRch4gKnPkZy0ybQQq0RW5-TI80tJ-VJLg-AdA,5597
|
|
44
44
|
src/base_template/deployment/terraform/locals.tf,sha256=mrmOigExLk5g734-2VodDj8qQUTBq20e7FgQD0KUF8E,1390
|
|
45
|
-
src/base_template/deployment/terraform/log_sinks.tf,sha256=
|
|
46
|
-
src/base_template/deployment/terraform/providers.tf,sha256=
|
|
47
|
-
src/base_template/deployment/terraform/service_accounts.tf,sha256=
|
|
48
|
-
src/base_template/deployment/terraform/storage.tf,sha256=
|
|
49
|
-
src/base_template/deployment/terraform/variables.tf,sha256=
|
|
45
|
+
src/base_template/deployment/terraform/log_sinks.tf,sha256=PP_n3Jr-_EhMy6shVUrx7ztdQic5W3mKPjC0zQSvAjA,2955
|
|
46
|
+
src/base_template/deployment/terraform/providers.tf,sha256=LFjFQm8XbhWfQRwBUwhTjHLDWUbHW-IlFg71E0zFHIg,1080
|
|
47
|
+
src/base_template/deployment/terraform/service_accounts.tf,sha256=av5UohEL5JmTw4FUMg7DVYjg_8Kg1u9yYUTD3QlGEmo,1689
|
|
48
|
+
src/base_template/deployment/terraform/storage.tf,sha256=v1Vo3SS9yUJOJ8QDVyo0sj_YFY-lElRvdsUrxbIzyuI,8639
|
|
49
|
+
src/base_template/deployment/terraform/variables.tf,sha256=ytEOMsdVy7HNTPPkAXmsxRkO21bFB9sne3iRwN7szd8,5685
|
|
50
50
|
src/base_template/deployment/terraform/dev/apis.tf,sha256=kUXkyN-fB8SKssVBxWKZvtHHFGcz09L4Rz9fPQNPSB8,1337
|
|
51
|
-
src/base_template/deployment/terraform/dev/iam.tf,sha256=
|
|
52
|
-
src/base_template/deployment/terraform/dev/log_sinks.tf,sha256=
|
|
53
|
-
src/base_template/deployment/terraform/dev/providers.tf,sha256=
|
|
54
|
-
src/base_template/deployment/terraform/dev/storage.tf,sha256=
|
|
55
|
-
src/base_template/deployment/terraform/dev/variables.tf,sha256=
|
|
56
|
-
src/base_template/deployment/terraform/dev/vars/env.tfvars,sha256=
|
|
57
|
-
src/base_template/deployment/terraform/vars/env.tfvars,sha256=
|
|
51
|
+
src/base_template/deployment/terraform/dev/iam.tf,sha256=ZHFs4TMvq6mqD90n8ecXndzW3pyu4EbZO4iJis88BH0,3394
|
|
52
|
+
src/base_template/deployment/terraform/dev/log_sinks.tf,sha256=uVdMtDdd8MnxtKhqzVaYqadE11P3r4fs2IdgNecxM4I,2671
|
|
53
|
+
src/base_template/deployment/terraform/dev/providers.tf,sha256=1S9jCh48d6ailVZ1e14EHsUUDSp7DyGZGExJwViFCkM,900
|
|
54
|
+
src/base_template/deployment/terraform/dev/storage.tf,sha256=1mgLs21SUhfcoRICqd7BqUlEVAVGeN3kMsQ4UAQLOh8,4654
|
|
55
|
+
src/base_template/deployment/terraform/dev/variables.tf,sha256=d3MBpaEHkzRvRS-un7XEgMS55gUEDlMlzkTQEQ9-Fbs,4024
|
|
56
|
+
src/base_template/deployment/terraform/dev/vars/env.tfvars,sha256=fySlaivTsrxA6sM7HNsrLZIzwoJQN8RdA5q9dS1Xwog,964
|
|
57
|
+
src/base_template/deployment/terraform/vars/env.tfvars,sha256=vasZKhOscuK0yjYrAUDHqbbYj8HV4d_rN87UJ-2ZEBM,1467
|
|
58
58
|
src/base_template/tests/unit/test_utils/test_tracing_exporter.py,sha256=JAb0vIB7wNFPm_kaDaHcxtPKNReypDHjdsMQyzpuePQ,4687
|
|
59
|
-
src/cli/main.py,sha256=
|
|
60
|
-
src/cli/commands/create.py,sha256=
|
|
61
|
-
src/cli/commands/setup_cicd.py,sha256=
|
|
62
|
-
src/cli/utils/__init__.py,sha256=
|
|
63
|
-
src/cli/utils/cicd.py,sha256=
|
|
64
|
-
src/cli/utils/
|
|
59
|
+
src/cli/main.py,sha256=pMsSlNwkrFqHUHHA5U-WMZ4QRquaI_F7OXQt6yxuugE,1688
|
|
60
|
+
src/cli/commands/create.py,sha256=JjD1DkeSd727w9N8ept4nu287KyEbLRbijUsfe8RwvQ,22851
|
|
61
|
+
src/cli/commands/setup_cicd.py,sha256=RoKxzciX9fdAM_xPrGIIr9V0TpSCFFqTD8n1giJhZ3k,30671
|
|
62
|
+
src/cli/utils/__init__.py,sha256=_cTmsXGPqOtK0q8UW5164QTltbJRJFR_Efxq_BRL1-o,1311
|
|
63
|
+
src/cli/utils/cicd.py,sha256=KyiVE2lHB6GJDkjflrfsNdh6v1KnjNRh0y09YxPfAWo,27432
|
|
64
|
+
src/cli/utils/datastores.py,sha256=gv1V6eDcOEKx4MRNG5C3Y-VfixYq1AzQuaYMLp8QRNo,1058
|
|
65
|
+
src/cli/utils/gcp.py,sha256=IHTLqMCOkDwITQV_7YnNun2b6YIzTWKZCxgaDVobdeQ,4066
|
|
65
66
|
src/cli/utils/logging.py,sha256=0lHe4EPi1A8sOx9xkA7gS4UNl0GsIyp2ahydkkuCzLY,1570
|
|
66
|
-
src/cli/utils/template.py,sha256=
|
|
67
|
-
src/
|
|
68
|
-
src/data_ingestion/
|
|
67
|
+
src/cli/utils/template.py,sha256=kY6K7Nra2hYN1a36TUb2PoLDKwD3Np9rLTMeVBRbsNg,28730
|
|
68
|
+
src/cli/utils/version.py,sha256=F4udQmzniPStqWZFIgnv3Qg3l9non4mfy2An-Oveqmc,2916
|
|
69
|
+
src/data_ingestion/README.md,sha256=AF0XGNl4oKfp8--fL--rbd4i5UcOL7VnRP07vnN1wP0,4381
|
|
70
|
+
src/data_ingestion/pyproject.toml,sha256=-1Mf2QB8K70ICQV5UPZDpf-fN3UwEQLVzQyxfakCSTY,445
|
|
69
71
|
src/data_ingestion/uv.lock,sha256=HzSD6_IxS2urt49EefD9MvVxBwxW_bJ-k0XltTDT3Vc,144223
|
|
70
|
-
src/data_ingestion/data_ingestion_pipeline/pipeline.py,sha256=
|
|
71
|
-
src/data_ingestion/data_ingestion_pipeline/submit_pipeline.py,sha256=
|
|
72
|
-
src/data_ingestion/data_ingestion_pipeline/components/ingest_data.py,sha256=
|
|
73
|
-
src/data_ingestion/data_ingestion_pipeline/components/process_data.py,sha256=
|
|
72
|
+
src/data_ingestion/data_ingestion_pipeline/pipeline.py,sha256=UAS6dxV954yARP0NdDbCf5kzap3NfmoX52eZ2mZtWXs,3331
|
|
73
|
+
src/data_ingestion/data_ingestion_pipeline/submit_pipeline.py,sha256=tWGqL0zUB3V5JxR1SpX7LMjCW5r6JEGnvgF8tAxZ12s,7784
|
|
74
|
+
src/data_ingestion/data_ingestion_pipeline/components/ingest_data.py,sha256=s5IlAshPbf5kgBTBb-sz0zHqZnIpCzaoM2b2cs7PkJA,10640
|
|
75
|
+
src/data_ingestion/data_ingestion_pipeline/components/process_data.py,sha256=3D4CaUV9pBaIU10MogJMQAR00JPVzqjFHN6eL7WM_5Y,22045
|
|
74
76
|
src/deployment_targets/agent_engine/deployment_metadata.json,sha256=G_t_n-UNrFsBgH1Xrw5-ZqYzUGwZ4X6ipsIm_yiSq-w,72
|
|
75
|
-
src/deployment_targets/agent_engine/app/agent_engine_app.py,sha256=
|
|
77
|
+
src/deployment_targets/agent_engine/app/agent_engine_app.py,sha256=aMBsmyxXwLwDaZ8KWqnpdpOSD9-upZZiTGbiJ80wI2Y,9486
|
|
76
78
|
src/deployment_targets/agent_engine/app/utils/gcs.py,sha256=voQNs8sbvLDH0PX3avpn8RFNTq7QWNgXfMWUKU7hBTA,1495
|
|
77
79
|
src/deployment_targets/agent_engine/notebooks/intro_agent_engine.ipynb,sha256=RE6Gp-bu4bHtNBngfkt_CF5emy5YcOWQ5rMYW_Cv8_w,48809
|
|
78
80
|
src/deployment_targets/agent_engine/tests/integration/test_agent_engine_app.py,sha256=maYeJgeZceMgD4TI8ZID6SKAqHPlQuW2CksT7MGile4,3938
|
|
@@ -83,15 +85,13 @@ src/deployment_targets/agent_engine/tests/unit/test_dummy.py,sha256=hL-JCmoQUJ4I
|
|
|
83
85
|
src/deployment_targets/cloud_run/Dockerfile,sha256=JTh6P_RXE3bkdsHS0zIgguDVVf0XyLViMcb-UNT3Da4,835
|
|
84
86
|
src/deployment_targets/cloud_run/uv.lock,sha256=2RYrR89xDS1FHVb-g2JGZq8zZ-rzbm_jRvehVCYuXRQ,887957
|
|
85
87
|
src/deployment_targets/cloud_run/app/server.py,sha256=h6H6xwK_VVlOOfD6sOSbxX3WqRrHHzH0IUbns5VOyoo,3999
|
|
86
|
-
src/deployment_targets/cloud_run/deployment/terraform/artifact_registry.tf,sha256=7KgheT1UuCUUQK2pfb8cmS_H8qftzy7HHKu1HrCS0_0,970
|
|
87
|
-
src/deployment_targets/cloud_run/deployment/terraform/dev/service_accounts.tf,sha256=CBavl84WbuQCGz0bQt5B7Sh9ZlpQVMRNHQZAnyWxppg,820
|
|
88
88
|
src/deployment_targets/cloud_run/tests/integration/test_server_e2e.py,sha256=KKtdtBTxaAfHQodm4FdyQHa7hBAwWCCda5aEF26-bjk,5978
|
|
89
89
|
src/deployment_targets/cloud_run/tests/load_test/README.md,sha256=JP47idadGBiLaBxBPOBJBEY4W87Xh3-wv5Bn8avhvHU,2804
|
|
90
90
|
src/deployment_targets/cloud_run/tests/load_test/load_test.py,sha256=HsxmcNKyEopeGER4QUmnjiW4Bqp6h1TXsCUkyrq6inw,3317
|
|
91
91
|
src/deployment_targets/cloud_run/tests/load_test/.results/.placeholder,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
|
-
src/deployment_targets/cloud_run/tests/unit/test_server.py,sha256=
|
|
93
|
-
src/frontends/live_api_react/frontend/package-lock.json,sha256=
|
|
94
|
-
src/frontends/live_api_react/frontend/package.json,sha256=
|
|
92
|
+
src/deployment_targets/cloud_run/tests/unit/test_server.py,sha256=_lpSBJ2kKT37WA2ofLjVAL-qK0xpTOhfhzwiue_bhps,3931
|
|
93
|
+
src/frontends/live_api_react/frontend/package-lock.json,sha256=OgbAH3fn_v4bd-TwS3NNKiqPN_ysyqALD_ap20W6-as,734245
|
|
94
|
+
src/frontends/live_api_react/frontend/package.json,sha256=OBOzzDiDiESPzmbLDlZ6KM1Trit71vXdP692dI-g9Uo,1381
|
|
95
95
|
src/frontends/live_api_react/frontend/tsconfig.json,sha256=cyqEhf7-Yydz-PX8_cuF8JpsyC363NDTNkrmCk0sKAo,595
|
|
96
96
|
src/frontends/live_api_react/frontend/public/favicon.ico,sha256=FY9oTN01RzaJ2lZ1rCjNXsEfT1gWZJA3fPx0QMBlMCU,15086
|
|
97
97
|
src/frontends/live_api_react/frontend/public/index.html,sha256=tOhOQOx5kMi9WhxT-4XAk75tmkoHNCyBM36dgR725TM,2508
|
|
@@ -134,25 +134,25 @@ src/frontends/streamlit/frontend/utils/chat_utils.py,sha256=Z0OYQu-14_d9tDmH9Z4V
|
|
|
134
134
|
src/frontends/streamlit/frontend/utils/local_chat_history.py,sha256=9wc8L8j4tk10DBPQdV64kdZvqE1fHxC2esK8szid0l8,4741
|
|
135
135
|
src/frontends/streamlit/frontend/utils/message_editing.py,sha256=YWoPe2KeWMuL3YVTm0am6MK3kzjEIYVmdkdwTQpmGdQ,2263
|
|
136
136
|
src/frontends/streamlit/frontend/utils/multimodal_utils.py,sha256=v6YbCkz_YcnEo-9YvRjwBNt0SzU4M39bYxJGmKk69vE,7313
|
|
137
|
-
src/frontends/streamlit/frontend/utils/stream_handler.py,sha256=
|
|
137
|
+
src/frontends/streamlit/frontend/utils/stream_handler.py,sha256=MH_NqA0lLD1UpVRV2TAhtOMsUsar203JhR9T3a5Vgps,12050
|
|
138
138
|
src/frontends/streamlit/frontend/utils/title_summary.py,sha256=B0cadS_KPW-tsbABauI4J681aqjEtuKFDa25e9R1WKc,3030
|
|
139
|
-
src/resources/containers/data_processing/Dockerfile,sha256=
|
|
139
|
+
src/resources/containers/data_processing/Dockerfile,sha256=VoB9d5yZiiWnqRfWrIq0gGNMzZg-eVy733OgP72ZgO0,950
|
|
140
140
|
src/resources/containers/e2e-tests/Dockerfile,sha256=Q_aTyX_iaFY8j06XZkpMuggJnNO5daiLmmrvqaZHMxw,1611
|
|
141
|
-
src/resources/locks/uv-
|
|
142
|
-
src/resources/locks/uv-
|
|
143
|
-
src/resources/locks/uv-crewai_coding_crew-agent_engine.lock,sha256=
|
|
144
|
-
src/resources/locks/uv-crewai_coding_crew-cloud_run.lock,sha256=
|
|
145
|
-
src/resources/locks/uv-langgraph_base_react-agent_engine.lock,sha256=
|
|
146
|
-
src/resources/locks/uv-langgraph_base_react-cloud_run.lock,sha256=
|
|
147
|
-
src/resources/locks/uv-
|
|
148
|
-
src/resources/setup_cicd/cicd_variables.tf,sha256=
|
|
149
|
-
src/resources/setup_cicd/github.tf,sha256=
|
|
141
|
+
src/resources/locks/uv-agentic_rag-agent_engine.lock,sha256=QV639I2HNqplK5nkMZ0Xj0KqCUAZaFZf20A_R092yMA,615563
|
|
142
|
+
src/resources/locks/uv-agentic_rag-cloud_run.lock,sha256=YrlqbGynBEBSCTdRHKELF0K4_RnkpquM-N3AE2rQEI8,782559
|
|
143
|
+
src/resources/locks/uv-crewai_coding_crew-agent_engine.lock,sha256=kKRl9jy-ZUyZGPiZtSIzjN_jDtP-PnPnNwKwppN_pWo,712678
|
|
144
|
+
src/resources/locks/uv-crewai_coding_crew-cloud_run.lock,sha256=QD11eic8XZl1f5KJFOTphllyLw0ktUItQjur0pLGogI,888102
|
|
145
|
+
src/resources/locks/uv-langgraph_base_react-agent_engine.lock,sha256=jV28_KmoC2QPDnlG5Nzk6je-mj2BnNdGQIqLuGJ0WQk,595609
|
|
146
|
+
src/resources/locks/uv-langgraph_base_react-cloud_run.lock,sha256=WRVTZskbmjGfzFRDiSFeGtNt1U__zPmcvhy9T75dCn8,758444
|
|
147
|
+
src/resources/locks/uv-live_api-cloud_run.lock,sha256=HCgeO9Zx45Xcm5pSOxr3jHLm4mm7zG8Ogu5MLfPuBuk,761501
|
|
148
|
+
src/resources/setup_cicd/cicd_variables.tf,sha256=PMflYe1TzQi63LORHkmeCktTYzXFplJgxffNH4DtuAQ,1244
|
|
149
|
+
src/resources/setup_cicd/github.tf,sha256=scTBgeZlCM74N-pzhVKsnTN0PX9a5GboNl1HN3-LlCM,2791
|
|
150
150
|
src/resources/setup_cicd/providers.tf,sha256=Km4z6IJt7x7PLaa0kyZbBrO2m3lpuIJZFD5jB7QBfF0,1122
|
|
151
151
|
src/utils/generate_locks.py,sha256=xu5IAhGGBPkVQGSJX4kk7_JNDwWJUEaXAHbmaQIohbg,4386
|
|
152
152
|
src/utils/lock_utils.py,sha256=_QdzQtgIbCmJ87s046_i1g966slVNmvr3bJDeHbRQSM,2419
|
|
153
|
-
src/utils/watch_and_rebuild.py,sha256=
|
|
154
|
-
agent_starter_pack-0.
|
|
155
|
-
agent_starter_pack-0.
|
|
156
|
-
agent_starter_pack-0.
|
|
157
|
-
agent_starter_pack-0.
|
|
158
|
-
agent_starter_pack-0.
|
|
153
|
+
src/utils/watch_and_rebuild.py,sha256=vP4yIiA7E_lj5sfQdJUl8TXas6V7msDg8XWUutAC05Q,6679
|
|
154
|
+
agent_starter_pack-0.2.0.dist-info/METADATA,sha256=ylCNkjd3f5GqVyzgyHF-NacFhkKgjtAjNSi0hp4LIG8,8126
|
|
155
|
+
agent_starter_pack-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
156
|
+
agent_starter_pack-0.2.0.dist-info/entry_points.txt,sha256=U7uCxR7YulIhZ0L8R8Hui0Bsy6J7oyESBeDYJYMrQjA,56
|
|
157
|
+
agent_starter_pack-0.2.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
158
|
+
agent_starter_pack-0.2.0.dist-info/RECORD,,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Agentic RAG
|
|
1
|
+
# Agentic RAG
|
|
2
2
|
|
|
3
|
-
This agent enhances the
|
|
3
|
+
This agent enhances the Agent Starter Pack with a production-ready data ingestion pipeline, enriching your Retrieval Augmented Generation (RAG) applications. You will be able to ingest, process, and embed custom data, improving the relevance and context of your generated responses. You can choose between different datastore options including Vertex AI Search and Vertex AI Vector Search depending on your specific needs.
|
|
4
4
|
|
|
5
5
|
The agent provides the infrastructure to create a Vertex AI Pipeline with your custom code. Because it's built on Vertex AI Pipelines, you benefit from features like scheduled runs, recurring executions, and on-demand triggers. For processing terabyte-scale data, we recommend combining Vertex AI Pipelines with data analytics tools like BigQuery or Dataflow.
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ The agent implements the following architecture:
|
|
|
14
14
|
|
|
15
15
|
### Key Features
|
|
16
16
|
|
|
17
|
-
- **Vertex AI Search
|
|
17
|
+
- **Flexible Datastore Options:** Choose between Vertex AI Search or Vertex AI Vector Search for efficient data storage and retrieval based on your specific needs.
|
|
18
18
|
- **Automated Data Ingestion Pipeline:** Automates the process of ingesting data from input sources.
|
|
19
19
|
- **Custom Embeddings:** Generates embeddings using Vertex AI Embeddings and incorporates them into your data for enhanced semantic search.
|
|
20
20
|
- **Terraform Deployment:** Ingestion pipeline is instantiated with Terraform alongside the rest of the infrastructure of the starter pack.
|
|
@@ -31,11 +31,6 @@ from app.templates import format_docs, inspect_conversation_template, rag_templa
|
|
|
31
31
|
EMBEDDING_MODEL = "text-embedding-005"
|
|
32
32
|
LOCATION = "us-central1"
|
|
33
33
|
LLM = "gemini-2.0-flash-001"
|
|
34
|
-
EMBEDDING_COLUMN = "embedding"
|
|
35
|
-
TOP_K = 5
|
|
36
|
-
|
|
37
|
-
data_store_region = os.getenv("DATA_STORE_REGION", "us")
|
|
38
|
-
data_store_id = os.getenv("DATA_STORE_ID", "sample-datastore")
|
|
39
34
|
|
|
40
35
|
# Initialize Google Cloud and Vertex AI
|
|
41
36
|
credentials, project_id = google.auth.default()
|
|
@@ -45,6 +40,13 @@ embedding = VertexAIEmbeddings(
|
|
|
45
40
|
project=project_id, location=LOCATION, model_name=EMBEDDING_MODEL
|
|
46
41
|
)
|
|
47
42
|
|
|
43
|
+
{% if cookiecutter.datastore_type == "vertex_ai_search" %}
|
|
44
|
+
EMBEDDING_COLUMN = "embedding"
|
|
45
|
+
TOP_K = 5
|
|
46
|
+
|
|
47
|
+
data_store_region = os.getenv("DATA_STORE_REGION", "us")
|
|
48
|
+
data_store_id = os.getenv("DATA_STORE_ID", "sample-datastore")
|
|
49
|
+
|
|
48
50
|
retriever = get_retriever(
|
|
49
51
|
project_id=project_id,
|
|
50
52
|
data_store_id=data_store_id,
|
|
@@ -53,6 +55,20 @@ retriever = get_retriever(
|
|
|
53
55
|
embedding_column=EMBEDDING_COLUMN,
|
|
54
56
|
max_documents=10,
|
|
55
57
|
)
|
|
58
|
+
{% elif cookiecutter.datastore_type == "vertex_ai_vector_search" %}
|
|
59
|
+
vector_search_index = os.getenv("VECTOR_SEARCH_INDEX")
|
|
60
|
+
vector_search_index_endpoint = os.getenv("VECTOR_SEARCH_INDEX_ENDPOINT")
|
|
61
|
+
vector_search_bucket = os.getenv("VECTOR_SEARCH_BUCKET")
|
|
62
|
+
|
|
63
|
+
retriever = get_retriever(
|
|
64
|
+
project_id=project_id,
|
|
65
|
+
region=LOCATION,
|
|
66
|
+
vector_search_bucket=vector_search_bucket,
|
|
67
|
+
vector_search_index=vector_search_index,
|
|
68
|
+
vector_search_index_endpoint=vector_search_index_endpoint,
|
|
69
|
+
embedding=embedding,
|
|
70
|
+
)
|
|
71
|
+
{% endif %}
|
|
56
72
|
compressor = get_compressor(
|
|
57
73
|
project_id=project_id,
|
|
58
74
|
)
|
|
@@ -134,7 +150,7 @@ workflow.add_node(
|
|
|
134
150
|
ToolNode(
|
|
135
151
|
tools=tools,
|
|
136
152
|
# With False, tool errors won't be caught by LangGraph
|
|
137
|
-
handle_tool_errors=
|
|
153
|
+
handle_tool_errors=True,
|
|
138
154
|
),
|
|
139
155
|
)
|
|
140
156
|
workflow.add_edge("agent", "tools")
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
# ruff: noqa
|
|
15
|
+
# mypy: disable-error-code="no-untyped-def"
|
|
16
|
+
|
|
17
|
+
import os
|
|
18
|
+
|
|
19
|
+
from unittest.mock import MagicMock
|
|
20
|
+
from langchain_google_community.vertex_rank import VertexAIRank
|
|
21
|
+
from langchain_google_vertexai import VertexAIEmbeddings
|
|
22
|
+
{% if cookiecutter.datastore_type == "vertex_ai_search" -%}
|
|
23
|
+
from langchain_google_community import VertexAISearchRetriever
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def get_retriever(
|
|
27
|
+
project_id: str,
|
|
28
|
+
data_store_id: str,
|
|
29
|
+
data_store_region: str,
|
|
30
|
+
embedding: VertexAIEmbeddings,
|
|
31
|
+
embedding_column: str = "embedding",
|
|
32
|
+
max_documents: int = 10,
|
|
33
|
+
custom_embedding_ratio: float = 0.5,
|
|
34
|
+
) -> VertexAISearchRetriever:
|
|
35
|
+
"""
|
|
36
|
+
Creates and returns an instance of the retriever service.
|
|
37
|
+
|
|
38
|
+
Uses mock service if the INTEGRATION_TEST environment variable is set to "TRUE",
|
|
39
|
+
otherwise initializes real Vertex AI retriever.
|
|
40
|
+
"""
|
|
41
|
+
try:
|
|
42
|
+
return VertexAISearchRetriever(
|
|
43
|
+
project_id=project_id,
|
|
44
|
+
data_store_id=data_store_id,
|
|
45
|
+
location_id=data_store_region,
|
|
46
|
+
engine_data_type=1,
|
|
47
|
+
# The following parameters are used when you want to search
|
|
48
|
+
# using custom embeddings in Agent Builder.
|
|
49
|
+
# The ratio is set to 0.5 by default to use a mix of custom
|
|
50
|
+
# embeddings but you can adapt the ratio as you need.
|
|
51
|
+
custom_embedding_ratio=custom_embedding_ratio,
|
|
52
|
+
custom_embedding=embedding,
|
|
53
|
+
custom_embedding_field_path=embedding_column,
|
|
54
|
+
# Extracting 20 documents before re-rank.
|
|
55
|
+
max_documents=max_documents,
|
|
56
|
+
beta=True,
|
|
57
|
+
)
|
|
58
|
+
except Exception:
|
|
59
|
+
retriever = MagicMock()
|
|
60
|
+
|
|
61
|
+
def raise_exception(*args, **kwargs) -> None:
|
|
62
|
+
"""Function that raises an exception when the retriever is not available."""
|
|
63
|
+
raise Exception("Retriever not available")
|
|
64
|
+
|
|
65
|
+
retriever.invoke = raise_exception
|
|
66
|
+
return retriever
|
|
67
|
+
{% elif cookiecutter.datastore_type == "vertex_ai_vector_search" -%}
|
|
68
|
+
from google.cloud import aiplatform
|
|
69
|
+
from langchain_google_vertexai import VectorSearchVectorStore
|
|
70
|
+
from langchain_core.vectorstores import VectorStoreRetriever
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def get_retriever(
|
|
74
|
+
project_id: str,
|
|
75
|
+
region: str,
|
|
76
|
+
vector_search_bucket: str,
|
|
77
|
+
vector_search_index: str,
|
|
78
|
+
vector_search_index_endpoint: str,
|
|
79
|
+
embedding: VertexAIEmbeddings,
|
|
80
|
+
) -> VectorStoreRetriever:
|
|
81
|
+
"""
|
|
82
|
+
Creates and returns an instance of the retriever service.
|
|
83
|
+
"""
|
|
84
|
+
try:
|
|
85
|
+
aiplatform.init(
|
|
86
|
+
project=project_id,
|
|
87
|
+
location=region,
|
|
88
|
+
staging_bucket=vector_search_bucket,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
my_index = aiplatform.MatchingEngineIndex(vector_search_index)
|
|
92
|
+
|
|
93
|
+
my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(
|
|
94
|
+
vector_search_index_endpoint
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
return VectorSearchVectorStore.from_components(
|
|
98
|
+
project_id=project_id,
|
|
99
|
+
region=region,
|
|
100
|
+
gcs_bucket_name=vector_search_bucket.replace("gs://", ""),
|
|
101
|
+
index_id=my_index.name,
|
|
102
|
+
endpoint_id=my_index_endpoint.name,
|
|
103
|
+
embedding=embedding,
|
|
104
|
+
stream_update=True,
|
|
105
|
+
).as_retriever()
|
|
106
|
+
except Exception:
|
|
107
|
+
retriever = MagicMock()
|
|
108
|
+
|
|
109
|
+
def raise_exception(*args, **kwargs) -> None:
|
|
110
|
+
"""Function that raises an exception when the retriever is not available."""
|
|
111
|
+
raise Exception("Retriever not available")
|
|
112
|
+
|
|
113
|
+
retriever.invoke = raise_exception
|
|
114
|
+
return retriever
|
|
115
|
+
{% endif %}
|
|
116
|
+
|
|
117
|
+
def get_compressor(project_id: str, top_n: int = 5) -> VertexAIRank:
|
|
118
|
+
"""
|
|
119
|
+
Creates and returns an instance of the compressor service.
|
|
120
|
+
"""
|
|
121
|
+
try:
|
|
122
|
+
return VertexAIRank(
|
|
123
|
+
project_id=project_id,
|
|
124
|
+
location_id="global",
|
|
125
|
+
ranking_config="default_ranking_config",
|
|
126
|
+
title_field="id",
|
|
127
|
+
top_n=top_n,
|
|
128
|
+
)
|
|
129
|
+
except Exception:
|
|
130
|
+
compressor = MagicMock()
|
|
131
|
+
compressor.compress_documents = lambda x: []
|
|
132
|
+
return compressor
|
agents/{agentic_rag_vertexai_search → agentic_rag}/notebooks/evaluating_langgraph_agent.ipynb
RENAMED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
" </td>\n",
|
|
50
50
|
" <td style=\"text-align: center\">\n",
|
|
51
51
|
" <a href=\"https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\">\n",
|
|
52
|
-
" <img width=\"32px\" src=\"https://
|
|
52
|
+
" <img width=\"32px\" src=\"https://www.svgrepo.com/download/217753/github.svg\" alt=\"GitHub logo\"><br> View on GitHub\n",
|
|
53
53
|
" </a>\n",
|
|
54
54
|
" </td>\n",
|
|
55
55
|
"</table>\n",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"</a>\n",
|
|
68
68
|
"\n",
|
|
69
69
|
"<a href=\"https://twitter.com/intent/tweet?url=https%3A//github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\" target=\"_blank\">\n",
|
|
70
|
-
" <img width=\"20px\" src=\"https://upload.wikimedia.org/wikipedia/commons/5/
|
|
70
|
+
" <img width=\"20px\" src=\"https://upload.wikimedia.org/wikipedia/commons/5/5a/X_icon_2.svg\" alt=\"X logo\">\n",
|
|
71
71
|
"</a>\n",
|
|
72
72
|
"\n",
|
|
73
73
|
"<a href=\"https://reddit.com/submit?url=https%3A//github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\" target=\"_blank\">\n",
|
|
@@ -1444,7 +1444,7 @@
|
|
|
1444
1444
|
" ],\n",
|
|
1445
1445
|
"}\n",
|
|
1446
1446
|
"\n",
|
|
1447
|
-
"byod_eval_sample_dataset = pd.DataFrame(
|
|
1447
|
+
"byod_eval_sample_dataset = pd.DataFrame(byod_eval_data)"
|
|
1448
1448
|
]
|
|
1449
1449
|
},
|
|
1450
1450
|
{
|
|
@@ -12,17 +12,15 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
description: "A RAG agent
|
|
15
|
+
description: "A RAG agent for document retrieval and Q&A. Includes a data pipeline for ingesting and indexing documents into Vertex AI Search or Vector Search."
|
|
16
16
|
settings:
|
|
17
17
|
requires_data_ingestion: true
|
|
18
18
|
deployment_targets: ["agent_engine", "cloud_run"]
|
|
19
19
|
extra_dependencies: [
|
|
20
20
|
"langchain-google-vertexai~=2.0.7",
|
|
21
21
|
"langchain~=0.3.14",
|
|
22
|
-
"langgraph~=0.
|
|
23
|
-
"langchain-google-vertexai~=2.0.7",
|
|
24
|
-
"langchain~=0.3.14",
|
|
22
|
+
"langgraph~=0.3.21",
|
|
25
23
|
"langchain-community~=0.3.17",
|
|
26
24
|
"langchain-openai~=0.3.5",
|
|
27
|
-
"langchain-google-community[vertexaisearch]~=2.0.
|
|
25
|
+
"langchain-google-community[vertexaisearch]~=2.0.7",
|
|
28
26
|
]
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
" </td>\n",
|
|
50
50
|
" <td style=\"text-align: center\">\n",
|
|
51
51
|
" <a href=\"https://github.com/GoogleCloudPlatform/generative-ai/blob/main//generative-ai/gemini/evaluation/evaluating_crewai_agent.ipynb\">\n",
|
|
52
|
-
" <img width=\"32px\" src=\"https://
|
|
52
|
+
" <img width=\"32px\" src=\"https://www.svgrepo.com/download/217753/github.svg\" alt=\"GitHub logo\"><br> View on GitHub\n",
|
|
53
53
|
" </a>\n",
|
|
54
54
|
" </td>\n",
|
|
55
55
|
"</table>\n",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"</a>\n",
|
|
68
68
|
"\n",
|
|
69
69
|
"<a href=\"https://twitter.com/intent/tweet?url=https%3A//github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_crewai_agent.ipynb\" target=\"_blank\">\n",
|
|
70
|
-
" <img width=\"20px\" src=\"https://upload.wikimedia.org/wikipedia/commons/5/
|
|
70
|
+
" <img width=\"20px\" src=\"https://upload.wikimedia.org/wikipedia/commons/5/5a/X_icon_2.svg\" alt=\"X logo\">\n",
|
|
71
71
|
"</a>\n",
|
|
72
72
|
"\n",
|
|
73
73
|
"<a href=\"https://reddit.com/submit?url=https%3A//github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_crewai_agent.ipynb\" target=\"_blank\">\n",
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"# Build agent\n",
|
|
288
288
|
"from crewai import Agent, Crew, Process, Task\n",
|
|
289
289
|
"from crewai.flow.flow import Flow, listen, start\n",
|
|
290
|
-
"from
|
|
290
|
+
"from crewai.tools import tool\n",
|
|
291
291
|
"\n",
|
|
292
292
|
"# Evaluate agent\n",
|
|
293
293
|
"from google.cloud import aiplatform\n",
|
|
@@ -1454,7 +1454,7 @@
|
|
|
1454
1454
|
" ],\n",
|
|
1455
1455
|
"}\n",
|
|
1456
1456
|
"\n",
|
|
1457
|
-
"byod_eval_sample_dataset = pd.DataFrame(
|
|
1457
|
+
"byod_eval_sample_dataset = pd.DataFrame(byod_eval_data)"
|
|
1458
1458
|
]
|
|
1459
1459
|
},
|
|
1460
1460
|
{
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
" </td>\n",
|
|
50
50
|
" <td style=\"text-align: center\">\n",
|
|
51
51
|
" <a href=\"https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\">\n",
|
|
52
|
-
" <img width=\"32px\" src=\"https://
|
|
52
|
+
" <img width=\"32px\" src=\"https://www.svgrepo.com/download/217753/github.svg\" alt=\"GitHub logo\"><br> View on GitHub\n",
|
|
53
53
|
" </a>\n",
|
|
54
54
|
" </td>\n",
|
|
55
55
|
"</table>\n",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"</a>\n",
|
|
68
68
|
"\n",
|
|
69
69
|
"<a href=\"https://twitter.com/intent/tweet?url=https%3A//github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\" target=\"_blank\">\n",
|
|
70
|
-
" <img width=\"20px\" src=\"https://upload.wikimedia.org/wikipedia/commons/5/
|
|
70
|
+
" <img width=\"20px\" src=\"https://upload.wikimedia.org/wikipedia/commons/5/5a/X_icon_2.svg\" alt=\"X logo\">\n",
|
|
71
71
|
"</a>\n",
|
|
72
72
|
"\n",
|
|
73
73
|
"<a href=\"https://reddit.com/submit?url=https%3A//github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\" target=\"_blank\">\n",
|
|
@@ -1444,7 +1444,7 @@
|
|
|
1444
1444
|
" ],\n",
|
|
1445
1445
|
"}\n",
|
|
1446
1446
|
"\n",
|
|
1447
|
-
"byod_eval_sample_dataset = pd.DataFrame(
|
|
1447
|
+
"byod_eval_sample_dataset = pd.DataFrame(byod_eval_data)"
|
|
1448
1448
|
]
|
|
1449
1449
|
},
|
|
1450
1450
|
{
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
" </td>\n",
|
|
50
50
|
" <td style=\"text-align: center\">\n",
|
|
51
51
|
" <a href=\"https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\">\n",
|
|
52
|
-
" <img width=\"32px\" src=\"https://
|
|
52
|
+
" <img width=\"32px\" src=\"https://www.svgrepo.com/download/217753/github.svg\" alt=\"GitHub logo\"><br> View on GitHub\n",
|
|
53
53
|
" </a>\n",
|
|
54
54
|
" </td>\n",
|
|
55
55
|
"</table>\n",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"</a>\n",
|
|
68
68
|
"\n",
|
|
69
69
|
"<a href=\"https://twitter.com/intent/tweet?url=https%3A//github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\" target=\"_blank\">\n",
|
|
70
|
-
" <img width=\"20px\" src=\"https://upload.wikimedia.org/wikipedia/commons/5/
|
|
70
|
+
" <img width=\"20px\" src=\"https://upload.wikimedia.org/wikipedia/commons/5/5a/X_icon_2.svg\" alt=\"X logo\">\n",
|
|
71
71
|
"</a>\n",
|
|
72
72
|
"\n",
|
|
73
73
|
"<a href=\"https://reddit.com/submit?url=https%3A//github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/evaluating_langgraph_agent.ipynb\" target=\"_blank\">\n",
|
|
@@ -1444,7 +1444,7 @@
|
|
|
1444
1444
|
" ],\n",
|
|
1445
1445
|
"}\n",
|
|
1446
1446
|
"\n",
|
|
1447
|
-
"byod_eval_sample_dataset = pd.DataFrame(
|
|
1447
|
+
"byod_eval_sample_dataset = pd.DataFrame(byod_eval_data)"
|
|
1448
1448
|
]
|
|
1449
1449
|
},
|
|
1450
1450
|
{
|