### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Guided Search Refinement Attributes Source: https://cloud.google.com/agentspace/docs/preview-search-results_hl=de Example JSON structure for refinement attributes in guided search results, used to filter search results based on extracted key-value pairs. ```json { "guidedSearchResult": { "refinementAttributes": [ { "attributeKey": "_gs.color", "attributeValue" : "green" }, { "attributeKey": "_gs.category", "attributeValue" : "shoe" } ] } } ``` -------------------------------- ### Guided Search Refinement Attributes Source: https://cloud.google.com/agentspace/docs/preview-search-results Example JSON structure for refinement attributes in guided search results, used to filter search results based on extracted key-value pairs. ```json { "guidedSearchResult": { "refinementAttributes": [ { "attributeKey": "_gs.color", "attributeValue" : "green" }, { "attributeKey": "_gs.category", "attributeValue" : "shoe" } ] } } ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.sampleQuerySets.sampleQueries/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Google Cloud Resources Source: https://cloud.google.com/agentspace/docs/idea-generation This snippet lists various resources available for Google Cloud users, including links to GitHub, getting started guides, documentation, code samples, and training materials. ```text * GitHub * Getting Started with Google Cloud * Google Cloud documentation * Code samples * Cloud Architecture Center * Training and Certification * Developer Center ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.sampleQuerySets.sampleQueries/import Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.sampleQuerySets.sampleQueries/create Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get Schema using Ruby Source: https://cloud.google.com/agentspace/docs/get-schema-definition Illustrates how to use the Agentspace Ruby client library to get a schema. This sample requires following Ruby setup guidelines and setting up authentication. ```ruby require "google/cloud/discovery_engine/v1" ## # Snippet for the get_schema call in the SchemaService service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of # Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#get_schema. # def get_schema # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SchemaService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::GetSchemaRequest.new # Call the get_schema method. result = client.get_schema request # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Schema. p result end ``` -------------------------------- ### Get answers and follow-ups in Agent Space Source: https://cloud.google.com/agentspace/docs/stream-answer This snippet demonstrates how to get answers and follow-ups using Agent Space. It shows an example query for comparing BigQuery and Spanner databases. ```text QUERY : a free-text string that contains the question or search query. For example, "Compare the BigQuery and Spanner databases?". ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.sampleQuerySets.sampleQueries/get Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.dataStores.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Install and Configure User Identity Accessor for Jira Cloud Source: https://cloud.google.com/agentspace/docs/connect-jira-cloud This guide explains how to install and configure the User Identity Accessor for Jira Cloud, including understanding roles and permissions, and provides support information. ```N/A Steps: 1. Understand Roles and permissions. 2. Install User Identity Accessor for Jira Cloud. 3. Configure User Identity Accessor for Jira Cloud. 4. Support for User Identity Accessor for Jira Cloud. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.dataStores.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get Answers and Follow-ups with DiscoveryEngine API Source: https://cloud.google.com/agentspace/docs/get-started This section explains how to obtain answers to complex queries and utilize multi-turn search capabilities through the DiscoveryEngine API. It is intended for developers working with Google Agentspace. ```API See Get answers and follow-ups. ``` -------------------------------- ### Get Search Results with DiscoveryEngine API Source: https://cloud.google.com/agentspace/docs/get-started This section describes how to preview search results in the Google Cloud console or retrieve them using the DiscoveryEngine API. It is relevant for developers integrating Google Agentspace apps. ```API See Get search results. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.engines.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get TargetSite Path Parameter Source: https://cloud.google.com/agentspace/docs/reference/rest/v1/projects.locations.collections.dataStores.siteSearchEngine.targetSites/get Defines the 'name' path parameter required for the Get TargetSite request. It specifies the parameter type, whether it's required, and provides an example of the resource name format. ```text name (string, Required) Full resource name of TargetSite, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/siteSearchEngine/targetSites/{targetSite}. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. ``` -------------------------------- ### Install and Initialize Google Cloud CLI Source: https://cloud.google.com/agentspace/docs/before-you-begin_hl=de This snippet details the process of installing and initializing the Google Cloud CLI, a prerequisite for using the Agentspace API. It guides users through the necessary steps to set up the command-line interface for interacting with Google Cloud services. ```bash gcloud init ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/import Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get Operation Details via REST API Source: https://cloud.google.com/agentspace/docs/long-running-operations_hl=de This example shows how to retrieve details about a long-running operation using a cURL command. It makes a GET request to the Discovery Engine API endpoint, requiring an authorization token and the operation name. The response contains the status and metadata of the operation. ```curl curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://discoveryengine.googleapis.com/v1/OPERATION_NAME" ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/create Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1/projects.locations.dataStores.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get Operation Details via REST API Source: https://cloud.google.com/agentspace/docs/long-running-operations This example shows how to retrieve details about a long-running operation using a cURL command. It makes a GET request to the Discovery Engine API endpoint, requiring an authorization token and the operation name. The response contains the status and metadata of the operation. ```curl curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://discoveryengine.googleapis.com/v1/OPERATION_NAME" ``` -------------------------------- ### Search and Answer with API Source: https://cloud.google.com/agentspace/docs/answer_hl=de Demonstrates how to use the Google Agentspace API to get search results and answers. This includes examples for streaming answers and handling follow-up questions. ```python from google.cloud import agentspace_v1 def get_search_results(project_id: str, query: str): client = agentspace_v1.SearchServiceClient() request = agentspace_v1.SearchRequest( project=f"projects/{project_id}", query=query, ) response = client.search(request=request) for result in response.results: print(f"Title: {result.title}") print(f"Snippet: {result.snippet}") def get_answers(project_id: str, query: str): client = agentspace_v1.AnswerServiceClient() request = agentspace_v1.AnswerRequest( project=f"projects/{project_id}", query=query, ) response = client.answer(request=request) print(f"Answer: {response.answer}") for citation in response.citations: print(f"Source: {citation.source}") print(f"Page: {citation.page}") def stream_answers(project_id: str, query: str): client = agentspace_v1.AnswerServiceClient() request = agentspace_v1.AnswerRequest( project=f"projects/{project_id}", query=query, ) streaming_response = client.stream_answer(request=request) for chunk in streaming_response: print(f"Answer chunk: {chunk.answer}") # Example usage: # get_search_results("your-project-id", "What is Google Agentspace?") # get_answers("your-project-id", "How to configure Agentspace?") # stream_answers("your-project-id", "Explain the benefits of Agentspace.") ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.dataStores/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Search and Answer with API Source: https://cloud.google.com/agentspace/docs/answer Demonstrates how to use the Google Agentspace API to get search results and answers. This includes examples for streaming answers and handling follow-up questions. ```python from google.cloud import agentspace_v1 def get_search_results(project_id: str, query: str): client = agentspace_v1.SearchServiceClient() request = agentspace_v1.SearchRequest( project=f"projects/{project_id}", query=query, ) response = client.search(request=request) for result in response.results: print(f"Title: {result.title}") print(f"Snippet: {result.snippet}") def get_answers(project_id: str, query: str): client = agentspace_v1.AnswerServiceClient() request = agentspace_v1.AnswerRequest( project=f"projects/{project_id}", query=query, ) response = client.answer(request=request) print(f"Answer: {response.answer}") for citation in response.citations: print(f"Source: {citation.source}") print(f"Page: {citation.page}") def stream_answers(project_id: str, query: str): client = agentspace_v1.AnswerServiceClient() request = agentspace_v1.AnswerRequest( project=f"projects/{project_id}", query=query, ) streaming_response = client.stream_answer(request=request) for chunk in streaming_response: print(f"Answer chunk: {chunk.answer}") # Example usage: # get_search_results("your-project-id", "What is Google Agentspace?") # get_answers("your-project-id", "How to configure Agentspace?") # stream_answers("your-project-id", "Explain the benefits of Agentspace.") ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.servingConfigs/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1/projects.locations.collections.dataStores.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Write User Event in Java Source: https://cloud.google.com/agentspace/docs/record-user-events_hl=ja Provides a Java example for writing a user event with the Agentspace client library. Ensure Java setup and authentication are completed, and configure endpoints as needed. ```Java import com.google.cloud.discoveryengine.v1.DataStoreName; import com.google.cloud.discoveryengine.v1.UserEvent; import com.google.cloud.discoveryengine.v1.UserEventServiceClient; import com.google.cloud.discoveryengine.v1.WriteUserEventRequest; public class SyncWriteUserEvent { public static void main(String[] args) throws Exception { syncWriteUserEvent(); } public static void syncWriteUserEvent() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { WriteUserEventRequest request = WriteUserEventRequest.newBuilder() .setParent( DataStoreName.ofProjectLocationDataStoreName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]") .toString()) .setUserEvent(UserEvent.newBuilder().build()) .setWriteAsync(true) .build(); UserEvent response = userEventServiceClient.writeUserEvent(request); } } } ``` -------------------------------- ### Document Relevance Score Structure Source: https://cloud.google.com/agentspace/docs/preview-search-results_hl=de Example JSON structure showing how document relevance scores are returned within search results, indicating the similarity between a query and a document. ```json { "results": [ { "id": "DOCUMENT_ID", "document": { ... }, "modelScores": { "relevance_score": { "values": [ DOCUMENT-RELEVANCE-SCORE ] } } }, ... } ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/get Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.completionConfig/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Document Relevance Score Structure Source: https://cloud.google.com/agentspace/docs/preview-search-results Example JSON structure showing how document relevance scores are returned within search results, indicating the similarity between a query and a document. ```json { "results": [ { "id": "DOCUMENT_ID", "document": { ... }, "modelScores": { "relevance_score": { "values": [ DOCUMENT-RELEVANCE-SCORE ] } } }, ... } ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.collections.dataStores.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get Schema using Python Source: https://cloud.google.com/agentspace/docs/get-schema-definition Provides a Python code sample for fetching a schema via the Agentspace client library. Users need to follow Python setup instructions and configure authentication. ```python # This snippet has been automatically generated and should be regarded as a # code template only. # It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in: # https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import discoveryengine_v1 def sample_get_schema(): # Create a client client = discoveryengine_v1.SchemaServiceClient() # Initialize request argument(s) request = discoveryengine_v1.GetSchemaRequest( name="name_value", ) # Make the request response = client.get_schema(request=request) # Handle the response print(response) ``` -------------------------------- ### DataStore Path Parameter Source: https://cloud.google.com/agentspace/docs/reference/rest/v1/projects.locations.dataStores/get Defines the 'name' path parameter required for the get DataStore method. It specifies the parameter type as string and provides an example of the full resource name format. ```text name: string Required. Full resource name of DataStore, such as projects/{project}/locations/{location}/collections/{collectionId}/dataStores/{dataStoreId}.If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.If the requested DataStore does not exist, a NOT_FOUND error is returned. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Retrieving Salesforce Consumer Key and Secret Source: https://cloud.google.com/agentspace/docs/connect-salesforce This guide outlines the steps to retrieve the consumer ID (key) and consumer secret from the Salesforce App Manager. These credentials are vital for authenticating the Salesforce connector in Agentspace. ```Salesforce Setup 1. Go to **App manager** , locate your app, and in the options, select **View**. 2. Click **Manage Customer Details**. 3. If prompted, verify your identity. 4. Copy the consumer details. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.dataStores.completionConfig/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Retrieving Salesforce Consumer Key and Secret Source: https://cloud.google.com/agentspace/docs/connect-salesforce_hl=es-419 This guide outlines the steps to retrieve the consumer ID (key) and consumer secret from the Salesforce App Manager. These credentials are vital for authenticating the Salesforce connector in Agentspace. ```Salesforce Setup 1. Go to **App manager** , locate your app, and in the options, select **View**. 2. Click **Manage Customer Details**. 3. If prompted, verify your identity. 4. Copy the consumer details. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.collections.engines.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.dataStores.servingConfigs/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Develop with the DiscoveryEngine API Source: https://cloud.google.com/agentspace/docs/get-started This section provides information on using the DiscoveryEngine API to develop applications or services that leverage Google Agentspace. It covers accessing search results, answering questions, and filtering data. ```Unspecified Get search results Answer API Get answers and follow-ups with the API Stream answers About custom preambles Answer generation model versions Get search summaries Filter search Filter results in the app Filter by metadata Filter by document-level relevance Boost search results Order structured results Get snippets and extractive content Personalize your experience About personalization and memory Configure personalization and memory ``` -------------------------------- ### Complete Query using Ruby Source: https://cloud.google.com/agentspace/docs/configure-autocomplete_hl=fr This Ruby snippet shows how to call the `complete_query` method on the `CompletionService::Client` for Agentspace. It requires prior setup following the Agentspace quickstart instructions and may need regional endpoint configuration. ```ruby require "google/cloud/discovery_engine/v1" ## # Snippet for the complete_query call in the CompletionService service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of # Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#complete_query. # def complete_query # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::CompleteQueryRequest.new # Call the complete_query method. result = client.complete_query request # The returned object is of type Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse. p result end ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.dataStores.siteSearchEngine.targetSites/batchCreate Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.dataStores.siteSearchEngine.sitemaps/fetch Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Complete Query using Ruby Source: https://cloud.google.com/agentspace/docs/configure-autocomplete This Ruby snippet shows how to call the `complete_query` method on the `CompletionService::Client` for Agentspace. It requires prior setup following the Agentspace quickstart instructions and may need regional endpoint configuration. ```ruby require "google/cloud/discovery_engine/v1" ## # Snippet for the complete_query call in the CompletionService service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of # Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#complete_query. # def complete_query # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::CompletionService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::CompleteQueryRequest.new # Call the complete_query method. result = client.complete_query request # The returned object is of type Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse. p result end ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1/projects.locations.dataStores/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Step-by-Step Setup with Google Agentspace Assist Source: https://cloud.google.com/agentspace/docs/setup-agentspace-assist_hl=es-419 This snippet describes the interactive, step-by-step guidance provided by Google Agentspace assist for setting up your environment. It covers how the assist feature prompts for details, provides next steps, and guides through workflows. ```English Google Agentspace assist can also provide interactive, step-by-step instructions to guide you through the entire setup process. The following describes how Google Agentspace assist guides you through the setup process: * Initiates a predefined workflow based on the data source you select and the information you share. * Presents one clear instruction at a time, outlining the expected outcomes for each step. * Prompts you to validate inputs, such as OAuth scopes or API key formats. It can also help to debug any issues that might appear. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.engines.completionConfig/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Filter Search Results with DiscoveryEngine API Source: https://cloud.google.com/agentspace/docs/get-started This section details how to filter search results using metadata fields when working with the DiscoveryEngine API. It is applicable for developers needing to refine custom search for structured or unstructured data. ```API See Filter custom search for structured or unstructured data. ``` -------------------------------- ### Call Answer Method with Curl Source: https://cloud.google.com/agentspace/docs/answer_hl=de Demonstrates how to call the answer method using curl to get a generated answer and search results with source links. This example shows the required input parameters for a basic search and answer request. ```curl curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search:answer" \ -d '{ "query": { "text": "QUERY"} }' ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.collections.dataStores/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Call Answer Method with Curl Source: https://cloud.google.com/agentspace/docs/answer Demonstrates how to call the answer method using curl to get a generated answer and search results with source links. This example shows the required input parameters for a basic search and answer request. ```curl curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search:answer" \ -d '{ "query": { "text": "QUERY"} }' ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.dataStores.completionConfig/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Query Agentspace with Curl Source: https://cloud.google.com/agentspace/docs/answer_hl=de This snippet shows how to send a POST request to the Agentspace API to get an answer for a given query. It includes authorization headers, content type, the API endpoint, and a JSON payload with the query and search parameters. The example demonstrates setting 'maxReturnResults' to 3. ```bash curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/projects/my-project-123/locations/global/collections/default_collection/engines/my-app/servingConfigs/default_search:answer" \ -d '{ "query": { "text": "Does spanner database have an API?"}, "searchSpec": { "searchParams": { "maxReturnResults": 3 } } }' ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.userStores.userLicenses/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.servingConfigs/get Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Query Agentspace with Curl Source: https://cloud.google.com/agentspace/docs/answer This snippet shows how to send a POST request to the Agentspace API to get an answer for a given query. It includes authorization headers, content type, the API endpoint, and a JSON payload with the query and search parameters. The example demonstrates setting 'maxReturnResults' to 3. ```bash curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/projects/my-project-123/locations/global/collections/default_collection/engines/my-app/servingConfigs/default_search:answer" \ -d '{ "query": { "text": "Does spanner database have an API?"}, "searchSpec": { "searchParams": { "maxReturnResults": 3 } } }' ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.sampleQuerySets.sampleQueries/patch Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get Grounding Support Scores with REST API Source: https://cloud.google.com/agentspace/docs/answer_hl=de This REST API example demonstrates how to retrieve grounding support scores for answers and claims using a curl command. It sends a POST request to the Discovery Engine API with the query and a grounding specification to include support scores in the response. ```bash curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search:answer" \ -d '{ "query": { "text": "QUERY"}, "groundingSpec": { "includeGroundingSupports": true, } }' ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.completionSuggestions/import Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get Grounding Support Scores with REST API Source: https://cloud.google.com/agentspace/docs/answer This REST API example demonstrates how to retrieve grounding support scores for answers and claims using a curl command. It sends a POST request to the Discovery Engine API with the query and a grounding specification to include support scores in the response. ```bash curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search:answer" \ -d '{ "query": { "text": "QUERY"}, "groundingSpec": { "includeGroundingSupports": true, } }' ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.dataStores.sessions/create Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Analyze Data with Agent Space Assistant Source: https://cloud.google.com/agentspace/docs/assistant-analyze This guide details how to use the Agent Space assistant to analyze provided data. Users can upload files, paste data, or reference search results to ask questions, perform calculations, and generate tables or reports. Example prompts for data analysis are provided. ```bash 1. (Optional) Upload a file. 2. Enter a prompt. Example prompts for data analysis include: * "Can you tell me what the total revenue for December is?" * "Which product had the highest sales?" * "Generate a sales report for the last quarter, including a breakdown by product category and a comparison to the previous year." ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/recommend Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Salesforce Entity Access Configuration Source: https://cloud.google.com/agentspace/docs/connect-salesforce This guide explains how to ensure the Google Cloud connector can access Salesforce objects by configuring entity access. Options include changing default profile permissions to 'Public', adjusting 'Sharing settings', or creating and assigning a permission set with specific system permissions. ```Salesforce Setup Change the default profile permission to `Public`. Configure the access to each entity separately in **Sharing settings**. Create a permission set and share the permission set with the user: 1. Enter `Permission sets` in the Quick Find box and select **Permission sets**. 2. Click **New**. 3. Enter a name and save the permission set. 4. Under **System** , click **System permissions**. 5. Click **Edit** , select **View setup and configuration** , and save. 6. On the **Permission sets** page, click **Manage assignments** 7. Click **Add assignments** , select the user that you want to assign the permission set to, and then click **Assign**. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.userEvents/import Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Salesforce Entity Access Configuration Source: https://cloud.google.com/agentspace/docs/connect-salesforce_hl=es-419 This guide explains how to ensure the Google Cloud connector can access Salesforce objects by configuring entity access. Options include changing default profile permissions to 'Public', adjusting 'Sharing settings', or creating and assigning a permission set with specific system permissions. ```Salesforce Setup Change the default profile permission to `Public`. Configure the access to each entity separately in **Sharing settings**. Create a permission set and share the permission set with the user: 1. Enter `Permission sets` in the Quick Find box and select **Permission sets**. 2. Click **New**. 3. Enter a name and save the permission set. 4. Under **System** , click **System permissions**. 5. Click **Edit** , select **View setup and configuration** , and save. 6. On the **Permission sets** page, click **Manage assignments** 7. Click **Add assignments** , select the user that you want to assign the permission set to, and then click **Assign**. ``` -------------------------------- ### Manage Discovery Engine Data Connectors Source: https://cloud.google.com/agentspace/docs/access-control Provides permissions to manage data connectors, including acquiring access tokens, updating refresh tokens, building action invocations, checking refresh tokens, executing actions, getting connector details, querying available actions, starting connector runs, and updating connector configurations. ```gcloud gcloud discoveryengine dataConnectors acquireAccessToken gcloud discoveryengine dataConnectors acquireAndStoreRefreshToken gcloud discoveryengine dataConnectors buildActionInvocation gcloud discoveryengine dataConnectors checkRefreshToken gcloud discoveryengine dataConnectors executeAction gcloud discoveryengine dataConnectors get gcloud discoveryengine dataConnectors queryAvailableActions gcloud discoveryengine dataConnectors startConnectorRun gcloud discoveryengine dataConnectors update ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.servingConfigs/searchLite Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Get Evaluation Operation Source: https://cloud.google.com/agentspace/docs/reference/rest Gets the latest state of a long-running operation for an evaluation. This is a GET operation for operation status. ```REST GET /v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*} ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.dataStores.servingConfigs/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.collections.engines.servingConfigs/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Cloud SQL Overview Source: https://cloud.google.com/agentspace/docs/answer_hl=de Cloud SQL is a fully managed relational database service on Google Cloud Platform, supporting MySQL, PostgreSQL, and SQL Server. It simplifies database administration tasks, allowing users to focus on data management. The service offers various resources including quickstarts, guides, API references, and client libraries for integration. ```SQL -- Example of connecting to Cloud SQL (conceptual, actual connection varies by client library) -- Connection string might look like: "postgres://user:password@host:port/database" ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1alpha/projects.locations.dataStores/completeQuery Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Cloud SQL Overview Source: https://cloud.google.com/agentspace/docs/answer Cloud SQL is a fully managed relational database service on Google Cloud Platform, supporting MySQL, PostgreSQL, and SQL Server. It simplifies database administration tasks, allowing users to focus on data management. The service offers various resources including quickstarts, guides, API references, and client libraries for integration. ```SQL -- Example of connecting to Cloud SQL (conceptual, actual connection varies by client library) -- Connection string might look like: "postgres://user:password@host:port/database" ``` -------------------------------- ### Install PHP Client Library Source: https://cloud.google.com/agentspace/docs/libraries_hl=es-419 Installs the Google Cloud Discovery Engine client library for PHP using Composer. Ensure you have Composer installed. ```bash composer require google/cloud-discoveryengine ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.sessions/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Delete Schema in Ruby using Agentspace Client Library Source: https://cloud.google.com/agentspace/docs/delete-schemas_hl=es-419 This Ruby code snippet provides a basic example of deleting a schema in Agentspace using the `SchemaService::Client#delete_schema` method. It requires following the Ruby setup instructions and setting up Application Default Credentials. The snippet is a template and may need modifications for request initialization and regional endpoint configuration. ```ruby require "google/cloud/discovery_engine/v1" ## # Snippet for the delete_schema call in the SchemaService service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of # Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#delete_schema. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.sampleQuerySets/list Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Delete Schema in Ruby using Agentspace Client Library Source: https://cloud.google.com/agentspace/docs/delete-schemas_hl=fr This Ruby code snippet provides a basic example of deleting a schema in Agentspace using the `SchemaService::Client#delete_schema` method. It requires following the Ruby setup instructions and setting up Application Default Credentials. The snippet is a template and may need modifications for request initialization and regional endpoint configuration. ```ruby require "google/cloud/discovery_engine/v1" ## # Snippet for the delete_schema call in the SchemaService service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: # - It may require correct/in-range values for request initialization. # - It may require specifying regional endpoints when creating the service # client as shown in https://cloud.google.com/ruby/docs/reference. # # This is an auto-generated example demonstrating basic usage of # Google::Cloud::DiscoveryEngine::V1::SchemaService::Client#delete_schema. ``` -------------------------------- ### Provision Project Source: https://cloud.google.com/agentspace/docs/reference/rest/v1beta/projects.locations.dataStores.siteSearchEngine.sitemaps/fetch Initiates the provisioning of a new project, which is a fundamental step in setting up the Agent Search environment. ```REST POST /v1beta/{parent=projects/*}/provision ``` -------------------------------- ### Install Node.js Client Library Source: https://cloud.google.com/agentspace/docs/libraries_hl=es-419 Installs the Google Cloud Discovery Engine client library for Node.js using npm. Ensure you have Node.js and npm installed. ```bash npm install @google-cloud/discoveryengine ```