- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- GenerateAppResourceRequest.RefineInstructions
- GenerateAppResourceRequest.ToolGenerationConfig
- FileContext
- FileContext.FileBytes
- GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig
- GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig
- GenerateAppResourceRequest.AppGenerationConfig
- GenerateAppResourceRequest.EvaluationGenerationConfig
- GenerateAppResourceRequest.EvaluationPersonasGenerationConfig
- GenerateAppResourceRequest.QualityReportGenerationConfig
- GenerateAppResourceRequest.HillClimbingFixConfig
- QualityReport
- QualityReport.AgentIssues
- QualityReport.Issue
Generates specific resources (e.g. agent) in the app using LLM assistant.
HTTP request
POST https://ces.googleapis.com/v1beta/{parent=projects/*/locations/*/apps/*}:generateAppResource
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The resource name of the app to generate the resource for. |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "refineInstructions": [ { object ( |
| Fields | |
|---|---|
refineInstructions[] |
Optional. List of refine instructions to be used to refine the resource. |
toolGenerationConfig |
Optional. The configuration to be used to generate the tool. |
appGenerationConfig |
Optional. The configuration to be used to generate the agents and tools. |
evaluationGenerationConfig |
Optional. The configuration to be used to generate the evaluations. |
evaluationPersonasGenerationConfig |
Optional. The configuration to be used to generate the evaluation personas. |
qualityReportGenerationConfig |
Optional. The configuration to be used for quality report generation. |
hillClimbingFixConfig |
Optional. The configuration to be used for hill climbing fixes. |
Union field resource. The resource to generate. resource can be only one of the following: |
|
agent |
The agent resource to be used by the LLM assistant, can be empty for generating a new agent. |
tool |
The tool resource to be used by the LLM assistant, can be empty for generating a new tool. |
toolset |
The toolset resource to be used by the LLM assistant, can be empty for generating a new toolset. |
Response body
If successful, the response body contains an instance of Operation.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/ces
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
ces.apps.update
For more information, see the IAM documentation.
GenerateAppResourceRequest.RefineInstructions
The instructions to be used to refine a part of the resource. The part of the resource can be specified with a start index, end index and a field mask. For example, if you want to refine a part of the agent instructions you can specify the index of the first character of the instructions, the index of the last character of the instructions and the field mask as "instructions".
| JSON representation |
|---|
{ "startIndex": string, "endIndex": string, "fieldMask": string, "instructions": string } |
| Fields | |
|---|---|
startIndex |
Required. The first character (inclusive) of the text to refine. |
endIndex |
Required. The last character (inclusive) of the text to refine. |
fieldMask |
Required. The field of the resource being refined. Only one field is allowed per RefineInstructions. If refining agent instructions, the field mask should be "instructions". This is a comma-separated list of fully qualified names of fields. Example: |
instructions |
Required. The instructions to refine the resource. |
GenerateAppResourceRequest.ToolGenerationConfig
The configuration to be used to generate a tool.
| JSON representation |
|---|
{ "context": string, "fileContexts": [ { object ( |
| Fields | |
|---|---|
context |
Optional. The context which describes the tool to be generated. This can be empty if the tool request & response are provided. |
fileContexts[] |
Optional. The files to be used as context. |
openApiToolsetGenerationConfig |
Optional. The configuration to be used to generate an Open API schema. |
FileContext
Files to be used as context. Files can be provided as raw bytes.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field file. File provided as context. file can be only one of the following: |
|
fileBytes |
Optional. File provided as raw bytes. |
FileContext.FileBytes
File provided as raw bytes.
| JSON representation |
|---|
{ "fileName": string, "mimeType": string, "data": string } |
| Fields | |
|---|---|
fileName |
Required. The name of the file provided as raw bytes. |
mimeType |
Required. The IANA standard MIME type of the source data. |
data |
Required. Raw bytes of the file. A base64-encoded string. |
GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig
The configuration to be used to generate an Open API schema.
| JSON representation |
|---|
{
"uri": string,
"operationGenerationConfigs": [
{
object ( |
| Fields | |
|---|---|
uri |
Required. The base uri of the tool. |
operationGenerationConfigs[] |
Required. The list of operations to be added to the Open API schema. |
GenerateAppResourceRequest.ToolGenerationConfig.OpenApiToolsetGenerationConfig.OperationGenerationConfig
The configuration to be used to generate an operation in the Open API schema.
| JSON representation |
|---|
{ "method": string, "path": string, "requestJson": string, "responseJson": string } |
| Fields | |
|---|---|
method |
Required. The uri of the tool. This should include query and path parameters if any. |
path |
Required. The path of the tool to be appended to the base uri. This should include query and path parameters if any. |
requestJson |
Required. A sample request to the tool in JSON format. Skip if the tool does not support request body. |
responseJson |
Required. A sample response from the tool in JSON format. |
GenerateAppResourceRequest.AppGenerationConfig
The configuration to be used to generate the app.
| JSON representation |
|---|
{
"context": string,
"fileContexts": [
{
object ( |
| Fields | |
|---|---|
context |
Optional. The context which describes the requirements of the agents & tools to be generated. |
fileContexts[] |
Optional. The files to be used as context. |
datasetId |
Optional. The insights dataset to be used to fetch conversation data for generating the agents & tools. Format: |
generateEvaluations |
Optional. Whether to generate the evaluations for the app. If true, the provided context will be used to generate the evaluations data. |
gcsLocation |
Optional. The Cloud Storage location to store the generated question answer data to be used by the Datastore tool. This data is generated only when using conversation data as an input source. The location must be in the same project as the app. Format: |
GenerateAppResourceRequest.EvaluationGenerationConfig
The configuration to be used to generate the evaluations.
| JSON representation |
|---|
{ "datasetId": string } |
| Fields | |
|---|---|
datasetId |
Optional. The insights dataset to be used to fetch conversation data for generating the evaluations. Format: |
GenerateAppResourceRequest.EvaluationPersonasGenerationConfig
This type has no fields.
The configuration to be used to generate the evaluation personas.
GenerateAppResourceRequest.QualityReportGenerationConfig
The configuration to be used for quality report generation.
| JSON representation |
|---|
{ "evaluationRun": string } |
| Fields | |
|---|---|
evaluationRun |
Required. The evaluation run used to inform quality report analysis. |
GenerateAppResourceRequest.HillClimbingFixConfig
The configuration to be used for hill climbing fixes.
| JSON representation |
|---|
{
"qualityReport": {
object ( |
| Fields | |
|---|---|
qualityReport |
Required. The quality report used to inform the instruction following fix. |
QualityReport
The report describing any identified quality issues in the app.
| JSON representation |
|---|
{ "issues": [ { object ( |
| Fields | |
|---|---|
issues[] |
Optional. The issues grouped by agent. |
evaluationRuns[] |
Optional. A list of evaluation runs used to generate the quality report. Format: |
generalIssues[] |
Optional. General issues not specific to any agent. |
QualityReport.AgentIssues
Issues identified for a single agent.
| JSON representation |
|---|
{
"agent": string,
"issues": [
{
object ( |
| Fields | |
|---|---|
agent |
Optional. The name of the agent to which the issues are related. Format: |
issues[] |
Optional. List of issues found for this agent. |
QualityReport.Issue
The issue identified.
| JSON representation |
|---|
{ "description": string, "occurrenceCount": integer, "proposedSolution": string } |
| Fields | |
|---|---|
description |
Optional. Description of the issue found. |
occurrenceCount |
Optional. How many times this issue occurred. |
proposedSolution |
Optional. Proposed solution to fix the issue by modifying instructions or tools. |