-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
tools[Component] This issue is related to tools[Component] This issue is related to tools
Description
Description
VertexAiSearchTool fails with datastores that have contentConfig: PUBLIC_WEBSITE (website crawling), but works correctly with contentConfig: CONTENT_REQUIRED (GCS/PDF files).
Environment
- google-adk version: 1.22.1
- Python version: 3.12
- OS: Windows 11
- Deployment: Both local (
adk web) and Vertex AI Agent Engine
Steps to Reproduce
- Create a datastore from website crawling (PUBLIC_WEBSITE type)
- Create an agent with VertexAiSearchTool pointing to that datastore
- Run the agent locally with
adk webor deploy to Agent Engine - Query the agent
Code Example
from google.adk.agents import LlmAgent
from google.adk.tools import VertexAiSearchTool
# This datastore is PUBLIC_WEBSITE type (website crawling)
WEB_DATASTORE_ID = "projects/{PROJECT_ID}/locations/global/collections/default_collection/dataStores/{WEBSITE_DATASTORE_ID}"
agent = LlmAgent(
name="web_search_agent",
model="gemini-2.5-flash-lite",
instruction="Search for information",
tools=[VertexAiSearchTool(data_store_id=WEB_DATASTORE_ID, max_results=8)],
)Expected Behavior
The agent should search the datastore and return results.
Actual Behavior
The agent returns:
I am sorry, I cannot fulfill this request. The tool `vertex_ai_search` is not available.
Datastore Configuration Comparison
| Datastore | contentConfig | Status |
|---|---|---|
| Website crawling | PUBLIC_WEBSITE |
❌ FAILS |
| GCS/PDF files | CONTENT_REQUIRED |
✅ WORKS |
API Response for Failing Datastore (PUBLIC_WEBSITE)
{
"name": "projects/{PROJECT_ID}/locations/global/collections/default_collection/dataStores/{WEBSITE_DATASTORE_ID}",
"displayName": "Website_Datastore",
"industryVertical": "GENERIC",
"solutionTypes": ["SOLUTION_TYPE_SEARCH"],
"contentConfig": "PUBLIC_WEBSITE",
"defaultSchemaId": "default_schema"
}API Response for Working Datastore (CONTENT_REQUIRED)
{
"name": "projects/{PROJECT_ID}/locations/global/collections/default_collection/dataStores/{PDF_DATASTORE_ID}",
"displayName": "PDF_Datastore",
"industryVertical": "GENERIC",
"solutionTypes": ["SOLUTION_TYPE_SEARCH"],
"contentConfig": "CONTENT_REQUIRED",
"defaultSchemaId": "default_schema",
"documentProcessingConfig": {
"defaultParsingConfig": {
"digitalParsingConfig": {}
}
}
}Additional Context
- The service account has
roles/discoveryengine.adminpermissions - The datastores exist and are accessible via the Discovery Engine API
- The issue occurs both locally (
adk web) and when deployed to Agent Engine - Multiple agents in a ParallelAgent configuration, each with their own VertexAiSearchTool instance pointing to different datastores
- Only datastores with
CONTENT_REQUIREDwork, allPUBLIC_WEBSITEdatastores fail with the same error
Possible Cause
It seems like VertexAiSearchTool may have different handling requirements for PUBLIC_WEBSITE vs CONTENT_REQUIRED datastores, possibly related to the SearchResultMode configuration (CHUNKS vs DOCUMENTS).
Metadata
Metadata
Assignees
Labels
tools[Component] This issue is related to tools[Component] This issue is related to tools