BEDROCK-AGENT-RUNTIME

InvokeAgent

enum_ResponseState := [ "FAILURE", "REPROMPT" ]

valid {
    input.Body.enableTrace == BOOLEAN
    input.Body.endSession == BOOLEAN
    input.Body.inputText == STRING
    input.Body.sessionState.invocationId == STRING
    input.Body.sessionState.promptSessionAttributes.STRING == STRING
    input.Body.sessionState.returnControlInvocationResults[_].apiResult.actionGroup == STRING
    input.Body.sessionState.returnControlInvocationResults[_].apiResult.apiPath == STRING
    input.Body.sessionState.returnControlInvocationResults[_].apiResult.httpMethod == STRING
    input.Body.sessionState.returnControlInvocationResults[_].apiResult.httpStatusCode == INTEGER
    input.Body.sessionState.returnControlInvocationResults[_].apiResult.responseBody.STRING.body == STRING
    input.Body.sessionState.returnControlInvocationResults[_].apiResult.responseState == enum_ResponseState[_]
    input.Body.sessionState.returnControlInvocationResults[_].functionResult.actionGroup == STRING
    input.Body.sessionState.returnControlInvocationResults[_].functionResult.function == STRING
    input.Body.sessionState.returnControlInvocationResults[_].functionResult.responseBody.STRING.body == STRING
    input.Body.sessionState.returnControlInvocationResults[_].functionResult.responseState == enum_ResponseState[_]
    input.Body.sessionState.sessionAttributes.STRING == STRING
    input.ReqMap.agentAliasId == STRING
    input.ReqMap.agentId == STRING
    input.ReqMap.sessionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

Retrieve

enum_SearchType := [ "HYBRID", "SEMANTIC" ]

valid {
    input.Body.nextToken == STRING
    input.Body.retrievalConfiguration.vectorSearchConfiguration.filter.andAll[_] == NESTED
    input.Body.retrievalConfiguration.vectorSearchConfiguration.filter.orAll[_] == NESTED
    input.Body.retrievalConfiguration.vectorSearchConfiguration.numberOfResults == INTEGER
    input.Body.retrievalConfiguration.vectorSearchConfiguration.overrideSearchType == enum_SearchType[_]
    input.Body.retrievalQuery.text == STRING
    input.ReqMap.knowledgeBaseId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RetrieveAndGenerate

enum_ExternalSourceType := [ "S3", "BYTE_CONTENT" ]
enum_RetrieveAndGenerateType := [ "KNOWLEDGE_BASE", "EXTERNAL_SOURCES" ]
enum_SearchType := [ "HYBRID", "SEMANTIC" ]

valid {
    input.Body.input.text == STRING
    input.Body.retrieveAndGenerateConfiguration.externalSourcesConfiguration.generationConfiguration.promptTemplate.textPromptTemplate == STRING
    input.Body.retrieveAndGenerateConfiguration.externalSourcesConfiguration.modelArn == STRING
    input.Body.retrieveAndGenerateConfiguration.externalSourcesConfiguration.sources[_].byteContent.contentType == STRING
    input.Body.retrieveAndGenerateConfiguration.externalSourcesConfiguration.sources[_].byteContent.data == BLOB
    input.Body.retrieveAndGenerateConfiguration.externalSourcesConfiguration.sources[_].byteContent.identifier == STRING
    input.Body.retrieveAndGenerateConfiguration.externalSourcesConfiguration.sources[_].s3Location.uri == STRING
    input.Body.retrieveAndGenerateConfiguration.externalSourcesConfiguration.sources[_].sourceType == enum_ExternalSourceType[_]
    input.Body.retrieveAndGenerateConfiguration.knowledgeBaseConfiguration.generationConfiguration.promptTemplate.textPromptTemplate == STRING
    input.Body.retrieveAndGenerateConfiguration.knowledgeBaseConfiguration.knowledgeBaseId == STRING
    input.Body.retrieveAndGenerateConfiguration.knowledgeBaseConfiguration.modelArn == STRING
    input.Body.retrieveAndGenerateConfiguration.knowledgeBaseConfiguration.retrievalConfiguration.vectorSearchConfiguration.filter.andAll[_] == NESTED
    input.Body.retrieveAndGenerateConfiguration.knowledgeBaseConfiguration.retrievalConfiguration.vectorSearchConfiguration.filter.orAll[_] == NESTED
    input.Body.retrieveAndGenerateConfiguration.knowledgeBaseConfiguration.retrievalConfiguration.vectorSearchConfiguration.numberOfResults == INTEGER
    input.Body.retrieveAndGenerateConfiguration.knowledgeBaseConfiguration.retrievalConfiguration.vectorSearchConfiguration.overrideSearchType == enum_SearchType[_]
    input.Body.retrieveAndGenerateConfiguration.type == enum_RetrieveAndGenerateType[_]
    input.Body.sessionConfiguration.kmsKeyArn == STRING
    input.Body.sessionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}