diff --git a/clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts index 673e138579ab..159eeea1ed23 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts @@ -98,6 +98,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * }, * httpStatusCode: Number("int"), * responseState: "FAILURE" || "REPROMPT", + * agentId: "STRING_VALUE", * }, * functionResult: { // FunctionResult * actionGroup: "STRING_VALUE", // required @@ -109,6 +110,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * }, * }, * responseState: "FAILURE" || "REPROMPT", + * agentId: "STRING_VALUE", * }, * }, * ], @@ -229,6 +231,18 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * }, * }, * ], + * conversationHistory: { // ConversationHistory + * messages: [ // Messages + * { // Message + * role: "user" || "assistant", // required + * content: [ // ContentBlocks // required + * { // ContentBlock Union: only one key present + * text: "STRING_VALUE", + * }, + * ], + * }, + * ], + * }, * }, * agentId: "STRING_VALUE", // required * agentAliasId: "STRING_VALUE", // required @@ -241,6 +255,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * streamFinalResponse: true || false, * applyGuardrailInterval: Number("int"), * }, + * sourceArn: "STRING_VALUE", * }; * const command = new InvokeAgentCommand(input); * const response = await client.send(command); @@ -427,6 +442,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * // ], * // }, * // parserMode: "DEFAULT" || "OVERRIDDEN", + * // foundationModel: "STRING_VALUE", * // }, * // modelInvocationOutput: { // PreProcessingModelInvocationOutput * // traceId: "STRING_VALUE", @@ -452,7 +468,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * // }, * // invocationInput: { // InvocationInput * // traceId: "STRING_VALUE", - * // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER", + * // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER" || "AGENT_COLLABORATOR", * // actionGroupInvocationInput: { // ActionGroupInvocationInput * // actionGroupName: "STRING_VALUE", * // verb: "STRING_VALUE", @@ -489,13 +505,107 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * // "STRING_VALUE", * // ], * // }, + * // agentCollaboratorInvocationInput: { // AgentCollaboratorInvocationInput + * // agentCollaboratorName: "STRING_VALUE", + * // agentCollaboratorAliasArn: "STRING_VALUE", + * // input: { // AgentCollaboratorInputPayload + * // type: "TEXT" || "RETURN_CONTROL", + * // text: "STRING_VALUE", + * // returnControlResults: { // ReturnControlResults + * // invocationId: "STRING_VALUE", + * // returnControlInvocationResults: [ // ReturnControlInvocationResults + * // { // InvocationResultMember Union: only one key present + * // apiResult: { // ApiResult + * // actionGroup: "STRING_VALUE", // required + * // httpMethod: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // confirmationState: "CONFIRM" || "DENY", + * // responseBody: { // ResponseBody + * // "": { // ContentBody + * // body: "STRING_VALUE", + * // }, + * // }, + * // httpStatusCode: Number("int"), + * // responseState: "FAILURE" || "REPROMPT", + * // agentId: "STRING_VALUE", + * // }, + * // functionResult: { // FunctionResult + * // actionGroup: "STRING_VALUE", // required + * // confirmationState: "CONFIRM" || "DENY", + * // function: "STRING_VALUE", + * // responseBody: { + * // "": { + * // body: "STRING_VALUE", + * // }, + * // }, + * // responseState: "FAILURE" || "REPROMPT", + * // agentId: "STRING_VALUE", + * // }, + * // }, + * // ], + * // }, + * // }, + * // }, * // }, * // observation: { // Observation * // traceId: "STRING_VALUE", - * // type: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT", + * // type: "ACTION_GROUP" || "AGENT_COLLABORATOR" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT", * // actionGroupInvocationOutput: { // ActionGroupInvocationOutput * // text: "STRING_VALUE", * // }, + * // agentCollaboratorInvocationOutput: { // AgentCollaboratorInvocationOutput + * // agentCollaboratorName: "STRING_VALUE", + * // agentCollaboratorAliasArn: "STRING_VALUE", + * // output: { // AgentCollaboratorOutputPayload + * // type: "TEXT" || "RETURN_CONTROL", + * // text: "STRING_VALUE", + * // returnControlPayload: { // ReturnControlPayload + * // invocationInputs: [ // InvocationInputs + * // { // InvocationInputMember Union: only one key present + * // apiInvocationInput: { // ApiInvocationInput + * // actionGroup: "STRING_VALUE", // required + * // httpMethod: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // parameters: [ // ApiParameters + * // { // ApiParameter + * // name: "STRING_VALUE", + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // requestBody: { // ApiRequestBody + * // content: { // ApiContentMap + * // "": { // PropertyParameters + * // properties: [ // ParameterList + * // "", + * // ], + * // }, + * // }, + * // }, + * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", + * // }, + * // functionInvocationInput: { // FunctionInvocationInput + * // actionGroup: "STRING_VALUE", // required + * // parameters: [ // FunctionParameters + * // { // FunctionParameter + * // name: "STRING_VALUE", + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // function: "STRING_VALUE", + * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", + * // }, + * // }, + * // ], + * // invocationId: "STRING_VALUE", + * // }, + * // }, + * // }, * // knowledgeBaseLookupOutput: { // KnowledgeBaseLookupOutput * // retrievedReferences: [ * // { @@ -561,6 +671,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * // ], * // }, * // parserMode: "DEFAULT" || "OVERRIDDEN", + * // foundationModel: "STRING_VALUE", * // }, * // modelInvocationOutput: { // OrchestrationModelInvocationOutput * // traceId: "STRING_VALUE", @@ -592,6 +703,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * // ], * // }, * // parserMode: "DEFAULT" || "OVERRIDDEN", + * // foundationModel: "STRING_VALUE", * // }, * // modelInvocationOutput: { // PostProcessingModelInvocationOutput * // traceId: "STRING_VALUE", @@ -609,6 +721,219 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * // }, * // }, * // }, + * // routingClassifierTrace: { // RoutingClassifierTrace Union: only one key present + * // invocationInput: { + * // traceId: "STRING_VALUE", + * // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER" || "AGENT_COLLABORATOR", + * // actionGroupInvocationInput: { + * // actionGroupName: "STRING_VALUE", + * // verb: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // parameters: [ + * // "", + * // ], + * // requestBody: { + * // content: { + * // "": [ + * // "", + * // ], + * // }, + * // }, + * // function: "STRING_VALUE", + * // executionType: "LAMBDA" || "RETURN_CONTROL", + * // invocationId: "STRING_VALUE", + * // }, + * // knowledgeBaseLookupInput: { + * // text: "STRING_VALUE", + * // knowledgeBaseId: "STRING_VALUE", + * // }, + * // codeInterpreterInvocationInput: { + * // code: "STRING_VALUE", + * // files: [ + * // "STRING_VALUE", + * // ], + * // }, + * // agentCollaboratorInvocationInput: { + * // agentCollaboratorName: "STRING_VALUE", + * // agentCollaboratorAliasArn: "STRING_VALUE", + * // input: { + * // type: "TEXT" || "RETURN_CONTROL", + * // text: "STRING_VALUE", + * // returnControlResults: { + * // invocationId: "STRING_VALUE", + * // returnControlInvocationResults: [ + * // {// Union: only one key present + * // apiResult: { + * // actionGroup: "STRING_VALUE", // required + * // httpMethod: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // confirmationState: "CONFIRM" || "DENY", + * // responseBody: { + * // "": { + * // body: "STRING_VALUE", + * // }, + * // }, + * // httpStatusCode: Number("int"), + * // responseState: "FAILURE" || "REPROMPT", + * // agentId: "STRING_VALUE", + * // }, + * // functionResult: { + * // actionGroup: "STRING_VALUE", // required + * // confirmationState: "CONFIRM" || "DENY", + * // function: "STRING_VALUE", + * // responseBody: { + * // "": { + * // body: "STRING_VALUE", + * // }, + * // }, + * // responseState: "FAILURE" || "REPROMPT", + * // agentId: "STRING_VALUE", + * // }, + * // }, + * // ], + * // }, + * // }, + * // }, + * // }, + * // observation: { + * // traceId: "STRING_VALUE", + * // type: "ACTION_GROUP" || "AGENT_COLLABORATOR" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT", + * // actionGroupInvocationOutput: { + * // text: "STRING_VALUE", + * // }, + * // agentCollaboratorInvocationOutput: { + * // agentCollaboratorName: "STRING_VALUE", + * // agentCollaboratorAliasArn: "STRING_VALUE", + * // output: { + * // type: "TEXT" || "RETURN_CONTROL", + * // text: "STRING_VALUE", + * // returnControlPayload: { + * // invocationInputs: [ + * // {// Union: only one key present + * // apiInvocationInput: { + * // actionGroup: "STRING_VALUE", // required + * // httpMethod: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // parameters: [ + * // { + * // name: "STRING_VALUE", + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // requestBody: { + * // content: { + * // "": { + * // properties: [ + * // "", + * // ], + * // }, + * // }, + * // }, + * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", + * // }, + * // functionInvocationInput: { + * // actionGroup: "STRING_VALUE", // required + * // parameters: [ + * // { + * // name: "STRING_VALUE", + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // function: "STRING_VALUE", + * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", + * // }, + * // }, + * // ], + * // invocationId: "STRING_VALUE", + * // }, + * // }, + * // }, + * // knowledgeBaseLookupOutput: { + * // retrievedReferences: [ + * // { + * // content: { + * // text: "STRING_VALUE", // required + * // }, + * // location: { + * // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required + * // s3Location: { + * // uri: "STRING_VALUE", + * // }, + * // webLocation: { + * // url: "STRING_VALUE", + * // }, + * // confluenceLocation: { + * // url: "STRING_VALUE", + * // }, + * // salesforceLocation: { + * // url: "STRING_VALUE", + * // }, + * // sharePointLocation: { + * // url: "STRING_VALUE", + * // }, + * // customDocumentLocation: { + * // id: "STRING_VALUE", + * // }, + * // }, + * // metadata: { + * // "": "DOCUMENT_VALUE", + * // }, + * // }, + * // ], + * // }, + * // finalResponse: { + * // text: "STRING_VALUE", + * // }, + * // repromptResponse: { + * // text: "STRING_VALUE", + * // source: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "PARSER", + * // }, + * // codeInterpreterInvocationOutput: { + * // executionOutput: "STRING_VALUE", + * // executionError: "STRING_VALUE", + * // files: [ + * // "STRING_VALUE", + * // ], + * // executionTimeout: true || false, + * // }, + * // }, + * // modelInvocationInput: { + * // traceId: "STRING_VALUE", + * // text: "STRING_VALUE", + * // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER", + * // overrideLambda: "STRING_VALUE", + * // promptCreationMode: "DEFAULT" || "OVERRIDDEN", + * // inferenceConfiguration: { + * // temperature: Number("float"), + * // topP: Number("float"), + * // topK: Number("int"), + * // maximumLength: Number("int"), + * // stopSequences: [ + * // "STRING_VALUE", + * // ], + * // }, + * // parserMode: "DEFAULT" || "OVERRIDDEN", + * // foundationModel: "STRING_VALUE", + * // }, + * // modelInvocationOutput: { // RoutingClassifierModelInvocationOutput + * // traceId: "STRING_VALUE", + * // rawResponse: { + * // content: "STRING_VALUE", + * // }, + * // metadata: { + * // usage: { + * // inputTokens: Number("int"), + * // outputTokens: Number("int"), + * // }, + * // }, + * // }, + * // }, * // failureTrace: { // FailureTrace * // traceId: "STRING_VALUE", * // failureReason: "STRING_VALUE", @@ -623,40 +948,44 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * // agentId: "STRING_VALUE", * // agentAliasId: "STRING_VALUE", * // agentVersion: "STRING_VALUE", + * // callerChain: [ // CallerChain + * // { // Caller Union: only one key present + * // agentAliasArn: "STRING_VALUE", + * // }, + * // ], + * // collaboratorName: "STRING_VALUE", * // }, - * // returnControl: { // ReturnControlPayload - * // invocationInputs: [ // InvocationInputs - * // { // InvocationInputMember Union: only one key present - * // apiInvocationInput: { // ApiInvocationInput + * // returnControl: { + * // invocationInputs: [ + * // {// Union: only one key present + * // apiInvocationInput: { * // actionGroup: "STRING_VALUE", // required * // httpMethod: "STRING_VALUE", * // apiPath: "STRING_VALUE", - * // parameters: [ // ApiParameters - * // { // ApiParameter + * // parameters: [ + * // { * // name: "STRING_VALUE", * // type: "STRING_VALUE", * // value: "STRING_VALUE", * // }, * // ], - * // requestBody: { // ApiRequestBody - * // content: { // ApiContentMap - * // "": { // PropertyParameters - * // properties: [ // ParameterList - * // { - * // name: "STRING_VALUE", - * // type: "STRING_VALUE", - * // value: "STRING_VALUE", - * // }, + * // requestBody: { + * // content: { + * // "": { + * // properties: [ + * // "", * // ], * // }, * // }, * // }, * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", * // }, - * // functionInvocationInput: { // FunctionInvocationInput + * // functionInvocationInput: { * // actionGroup: "STRING_VALUE", // required - * // parameters: [ // FunctionParameters - * // { // FunctionParameter + * // parameters: [ + * // { * // name: "STRING_VALUE", * // type: "STRING_VALUE", * // value: "STRING_VALUE", @@ -664,6 +993,8 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat * // ], * // function: "STRING_VALUE", * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", * // }, * // }, * // ], diff --git a/clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts index d1fdfa02aca1..1eb36e6def9e 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts @@ -96,6 +96,7 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * }, * httpStatusCode: Number("int"), * responseState: "FAILURE" || "REPROMPT", + * agentId: "STRING_VALUE", * }, * functionResult: { // FunctionResult * actionGroup: "STRING_VALUE", // required @@ -107,6 +108,7 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * }, * }, * responseState: "FAILURE" || "REPROMPT", + * agentId: "STRING_VALUE", * }, * }, * ], @@ -477,6 +479,7 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * // ], * // }, * // parserMode: "DEFAULT" || "OVERRIDDEN", + * // foundationModel: "STRING_VALUE", * // }, * // modelInvocationOutput: { // PreProcessingModelInvocationOutput * // traceId: "STRING_VALUE", @@ -502,7 +505,7 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * // }, * // invocationInput: { // InvocationInput * // traceId: "STRING_VALUE", - * // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER", + * // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER" || "AGENT_COLLABORATOR", * // actionGroupInvocationInput: { // ActionGroupInvocationInput * // actionGroupName: "STRING_VALUE", * // verb: "STRING_VALUE", @@ -539,13 +542,107 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * // "STRING_VALUE", * // ], * // }, + * // agentCollaboratorInvocationInput: { // AgentCollaboratorInvocationInput + * // agentCollaboratorName: "STRING_VALUE", + * // agentCollaboratorAliasArn: "STRING_VALUE", + * // input: { // AgentCollaboratorInputPayload + * // type: "TEXT" || "RETURN_CONTROL", + * // text: "STRING_VALUE", + * // returnControlResults: { // ReturnControlResults + * // invocationId: "STRING_VALUE", + * // returnControlInvocationResults: [ // ReturnControlInvocationResults + * // { // InvocationResultMember Union: only one key present + * // apiResult: { // ApiResult + * // actionGroup: "STRING_VALUE", // required + * // httpMethod: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // confirmationState: "CONFIRM" || "DENY", + * // responseBody: { // ResponseBody + * // "": { // ContentBody + * // body: "STRING_VALUE", + * // }, + * // }, + * // httpStatusCode: Number("int"), + * // responseState: "FAILURE" || "REPROMPT", + * // agentId: "STRING_VALUE", + * // }, + * // functionResult: { // FunctionResult + * // actionGroup: "STRING_VALUE", // required + * // confirmationState: "CONFIRM" || "DENY", + * // function: "STRING_VALUE", + * // responseBody: { + * // "": { + * // body: "STRING_VALUE", + * // }, + * // }, + * // responseState: "FAILURE" || "REPROMPT", + * // agentId: "STRING_VALUE", + * // }, + * // }, + * // ], + * // }, + * // }, + * // }, * // }, * // observation: { // Observation * // traceId: "STRING_VALUE", - * // type: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT", + * // type: "ACTION_GROUP" || "AGENT_COLLABORATOR" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT", * // actionGroupInvocationOutput: { // ActionGroupInvocationOutput * // text: "STRING_VALUE", * // }, + * // agentCollaboratorInvocationOutput: { // AgentCollaboratorInvocationOutput + * // agentCollaboratorName: "STRING_VALUE", + * // agentCollaboratorAliasArn: "STRING_VALUE", + * // output: { // AgentCollaboratorOutputPayload + * // type: "TEXT" || "RETURN_CONTROL", + * // text: "STRING_VALUE", + * // returnControlPayload: { // ReturnControlPayload + * // invocationInputs: [ // InvocationInputs + * // { // InvocationInputMember Union: only one key present + * // apiInvocationInput: { // ApiInvocationInput + * // actionGroup: "STRING_VALUE", // required + * // httpMethod: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // parameters: [ // ApiParameters + * // { // ApiParameter + * // name: "STRING_VALUE", + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // requestBody: { // ApiRequestBody + * // content: { // ApiContentMap + * // "": { // PropertyParameters + * // properties: [ // ParameterList + * // "", + * // ], + * // }, + * // }, + * // }, + * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", + * // }, + * // functionInvocationInput: { // FunctionInvocationInput + * // actionGroup: "STRING_VALUE", // required + * // parameters: [ // FunctionParameters + * // { // FunctionParameter + * // name: "STRING_VALUE", + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // function: "STRING_VALUE", + * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", + * // }, + * // }, + * // ], + * // invocationId: "STRING_VALUE", + * // }, + * // }, + * // }, * // knowledgeBaseLookupOutput: { // KnowledgeBaseLookupOutput * // retrievedReferences: [ * // { @@ -611,6 +708,7 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * // ], * // }, * // parserMode: "DEFAULT" || "OVERRIDDEN", + * // foundationModel: "STRING_VALUE", * // }, * // modelInvocationOutput: { // OrchestrationModelInvocationOutput * // traceId: "STRING_VALUE", @@ -642,6 +740,7 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * // ], * // }, * // parserMode: "DEFAULT" || "OVERRIDDEN", + * // foundationModel: "STRING_VALUE", * // }, * // modelInvocationOutput: { // PostProcessingModelInvocationOutput * // traceId: "STRING_VALUE", @@ -659,6 +758,219 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * // }, * // }, * // }, + * // routingClassifierTrace: { // RoutingClassifierTrace Union: only one key present + * // invocationInput: { + * // traceId: "STRING_VALUE", + * // invocationType: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "FINISH" || "ACTION_GROUP_CODE_INTERPRETER" || "AGENT_COLLABORATOR", + * // actionGroupInvocationInput: { + * // actionGroupName: "STRING_VALUE", + * // verb: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // parameters: [ + * // "", + * // ], + * // requestBody: { + * // content: { + * // "": [ + * // "", + * // ], + * // }, + * // }, + * // function: "STRING_VALUE", + * // executionType: "LAMBDA" || "RETURN_CONTROL", + * // invocationId: "STRING_VALUE", + * // }, + * // knowledgeBaseLookupInput: { + * // text: "STRING_VALUE", + * // knowledgeBaseId: "STRING_VALUE", + * // }, + * // codeInterpreterInvocationInput: { + * // code: "STRING_VALUE", + * // files: [ + * // "STRING_VALUE", + * // ], + * // }, + * // agentCollaboratorInvocationInput: { + * // agentCollaboratorName: "STRING_VALUE", + * // agentCollaboratorAliasArn: "STRING_VALUE", + * // input: { + * // type: "TEXT" || "RETURN_CONTROL", + * // text: "STRING_VALUE", + * // returnControlResults: { + * // invocationId: "STRING_VALUE", + * // returnControlInvocationResults: [ + * // {// Union: only one key present + * // apiResult: { + * // actionGroup: "STRING_VALUE", // required + * // httpMethod: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // confirmationState: "CONFIRM" || "DENY", + * // responseBody: { + * // "": { + * // body: "STRING_VALUE", + * // }, + * // }, + * // httpStatusCode: Number("int"), + * // responseState: "FAILURE" || "REPROMPT", + * // agentId: "STRING_VALUE", + * // }, + * // functionResult: { + * // actionGroup: "STRING_VALUE", // required + * // confirmationState: "CONFIRM" || "DENY", + * // function: "STRING_VALUE", + * // responseBody: { + * // "": { + * // body: "STRING_VALUE", + * // }, + * // }, + * // responseState: "FAILURE" || "REPROMPT", + * // agentId: "STRING_VALUE", + * // }, + * // }, + * // ], + * // }, + * // }, + * // }, + * // }, + * // observation: { + * // traceId: "STRING_VALUE", + * // type: "ACTION_GROUP" || "AGENT_COLLABORATOR" || "KNOWLEDGE_BASE" || "FINISH" || "ASK_USER" || "REPROMPT", + * // actionGroupInvocationOutput: { + * // text: "STRING_VALUE", + * // }, + * // agentCollaboratorInvocationOutput: { + * // agentCollaboratorName: "STRING_VALUE", + * // agentCollaboratorAliasArn: "STRING_VALUE", + * // output: { + * // type: "TEXT" || "RETURN_CONTROL", + * // text: "STRING_VALUE", + * // returnControlPayload: { + * // invocationInputs: [ + * // {// Union: only one key present + * // apiInvocationInput: { + * // actionGroup: "STRING_VALUE", // required + * // httpMethod: "STRING_VALUE", + * // apiPath: "STRING_VALUE", + * // parameters: [ + * // { + * // name: "STRING_VALUE", + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // requestBody: { + * // content: { + * // "": { + * // properties: [ + * // "", + * // ], + * // }, + * // }, + * // }, + * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", + * // }, + * // functionInvocationInput: { + * // actionGroup: "STRING_VALUE", // required + * // parameters: [ + * // { + * // name: "STRING_VALUE", + * // type: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // function: "STRING_VALUE", + * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", + * // }, + * // }, + * // ], + * // invocationId: "STRING_VALUE", + * // }, + * // }, + * // }, + * // knowledgeBaseLookupOutput: { + * // retrievedReferences: [ + * // { + * // content: { + * // text: "STRING_VALUE", // required + * // }, + * // location: { + * // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM", // required + * // s3Location: { + * // uri: "STRING_VALUE", + * // }, + * // webLocation: { + * // url: "STRING_VALUE", + * // }, + * // confluenceLocation: { + * // url: "STRING_VALUE", + * // }, + * // salesforceLocation: { + * // url: "STRING_VALUE", + * // }, + * // sharePointLocation: { + * // url: "STRING_VALUE", + * // }, + * // customDocumentLocation: { + * // id: "STRING_VALUE", + * // }, + * // }, + * // metadata: { + * // "": "DOCUMENT_VALUE", + * // }, + * // }, + * // ], + * // }, + * // finalResponse: { + * // text: "STRING_VALUE", + * // }, + * // repromptResponse: { + * // text: "STRING_VALUE", + * // source: "ACTION_GROUP" || "KNOWLEDGE_BASE" || "PARSER", + * // }, + * // codeInterpreterInvocationOutput: { + * // executionOutput: "STRING_VALUE", + * // executionError: "STRING_VALUE", + * // files: [ + * // "STRING_VALUE", + * // ], + * // executionTimeout: true || false, + * // }, + * // }, + * // modelInvocationInput: { + * // traceId: "STRING_VALUE", + * // text: "STRING_VALUE", + * // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER", + * // overrideLambda: "STRING_VALUE", + * // promptCreationMode: "DEFAULT" || "OVERRIDDEN", + * // inferenceConfiguration: { + * // temperature: Number("float"), + * // topP: Number("float"), + * // topK: Number("int"), + * // maximumLength: Number("int"), + * // stopSequences: [ + * // "STRING_VALUE", + * // ], + * // }, + * // parserMode: "DEFAULT" || "OVERRIDDEN", + * // foundationModel: "STRING_VALUE", + * // }, + * // modelInvocationOutput: { // RoutingClassifierModelInvocationOutput + * // traceId: "STRING_VALUE", + * // rawResponse: { + * // content: "STRING_VALUE", + * // }, + * // metadata: { + * // usage: { + * // inputTokens: Number("int"), + * // outputTokens: Number("int"), + * // }, + * // }, + * // }, + * // }, * // failureTrace: { // FailureTrace * // traceId: "STRING_VALUE", * // failureReason: "STRING_VALUE", @@ -672,38 +984,36 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * // }, * // }, * // returnControl: { // InlineAgentReturnControlPayload - * // invocationInputs: [ // InvocationInputs - * // { // InvocationInputMember Union: only one key present - * // apiInvocationInput: { // ApiInvocationInput + * // invocationInputs: [ + * // {// Union: only one key present + * // apiInvocationInput: { * // actionGroup: "STRING_VALUE", // required * // httpMethod: "STRING_VALUE", * // apiPath: "STRING_VALUE", - * // parameters: [ // ApiParameters - * // { // ApiParameter + * // parameters: [ + * // { * // name: "STRING_VALUE", * // type: "STRING_VALUE", * // value: "STRING_VALUE", * // }, * // ], - * // requestBody: { // ApiRequestBody - * // content: { // ApiContentMap - * // "": { // PropertyParameters - * // properties: [ // ParameterList - * // { - * // name: "STRING_VALUE", - * // type: "STRING_VALUE", - * // value: "STRING_VALUE", - * // }, + * // requestBody: { + * // content: { + * // "": { + * // properties: [ + * // "", * // ], * // }, * // }, * // }, * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", * // }, - * // functionInvocationInput: { // FunctionInvocationInput + * // functionInvocationInput: { * // actionGroup: "STRING_VALUE", // required - * // parameters: [ // FunctionParameters - * // { // FunctionParameter + * // parameters: [ + * // { * // name: "STRING_VALUE", * // type: "STRING_VALUE", * // value: "STRING_VALUE", @@ -711,6 +1021,8 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons * // ], * // function: "STRING_VALUE", * // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT", + * // agentId: "STRING_VALUE", + * // collaboratorName: "STRING_VALUE", * // }, * // }, * // ], diff --git a/clients/client-bedrock-agent-runtime/src/models/models_0.ts b/clients/client-bedrock-agent-runtime/src/models/models_0.ts index 0c21ab19ffe0..255ba6c04df5 100644 --- a/clients/client-bedrock-agent-runtime/src/models/models_0.ts +++ b/clients/client-bedrock-agent-runtime/src/models/models_0.ts @@ -536,6 +536,648 @@ export interface AgentActionGroup { functionSchema?: FunctionSchema | undefined; } +/** + * @public + * @enum + */ +export const ConfirmationState = { + CONFIRM: "CONFIRM", + DENY: "DENY", +} as const; + +/** + * @public + */ +export type ConfirmationState = (typeof ConfirmationState)[keyof typeof ConfirmationState]; + +/** + *

Contains the body of the API response.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface ContentBody { + /** + *

The body of the API response.

+ * @public + */ + body?: string | undefined; +} + +/** + * @public + * @enum + */ +export const ResponseState = { + FAILURE: "FAILURE", + REPROMPT: "REPROMPT", +} as const; + +/** + * @public + */ +export type ResponseState = (typeof ResponseState)[keyof typeof ResponseState]; + +/** + *

Contains information about the API operation that was called from the action group and the response body that was returned.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface ApiResult { + /** + *

The action group that the API operation belongs to.

+ * @public + */ + actionGroup: string | undefined; + + /** + *

The HTTP method for the API operation.

+ * @public + */ + httpMethod?: string | undefined; + + /** + *

The path to the API operation.

+ * @public + */ + apiPath?: string | undefined; + + /** + *

Controls the API operations or functions to invoke based on the user confirmation.

+ * @public + */ + confirmationState?: ConfirmationState | undefined; + + /** + *

The response body from the API operation. The key of the object is the content type (currently, only TEXT is supported). The response may be returned directly or from the Lambda function.

+ * @public + */ + responseBody?: Record | undefined; + + /** + *

http status code from API execution response (for example: 200, 400, 500).

+ * @public + */ + httpStatusCode?: number | undefined; + + /** + *

Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt

+ * @public + */ + responseState?: ResponseState | undefined; + + /** + *

The agent's ID.

+ * @public + */ + agentId?: string | undefined; +} + +/** + *

Contains information about the function that was called from the action group and the response that was returned.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface FunctionResult { + /** + *

The action group that the function belongs to.

+ * @public + */ + actionGroup: string | undefined; + + /** + *

Contains the user confirmation information about the function that was called.

+ * @public + */ + confirmationState?: ConfirmationState | undefined; + + /** + *

The name of the function that was called.

+ * @public + */ + function?: string | undefined; + + /** + *

The response from the function call using the parameters. The key of the object is the content type (currently, only TEXT is supported). The response may be returned directly or from the Lambda function.

+ * @public + */ + responseBody?: Record | undefined; + + /** + *

Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt

+ * @public + */ + responseState?: ResponseState | undefined; + + /** + *

The agent's ID.

+ * @public + */ + agentId?: string | undefined; +} + +/** + *

A result from the invocation of an action. For more information, see Return control to the agent developer and Control session context.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export type InvocationResultMember = + | InvocationResultMember.ApiResultMember + | InvocationResultMember.FunctionResultMember + | InvocationResultMember.$UnknownMember; + +/** + * @public + */ +export namespace InvocationResultMember { + /** + *

The result from the API response from the action group invocation.

+ * @public + */ + export interface ApiResultMember { + apiResult: ApiResult; + functionResult?: never; + $unknown?: never; + } + + /** + *

The result from the function from the action group invocation.

+ * @public + */ + export interface FunctionResultMember { + apiResult?: never; + functionResult: FunctionResult; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + apiResult?: never; + functionResult?: never; + $unknown: [string, any]; + } + + export interface Visitor { + apiResult: (value: ApiResult) => T; + functionResult: (value: FunctionResult) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: InvocationResultMember, visitor: Visitor): T => { + if (value.apiResult !== undefined) return visitor.apiResult(value.apiResult); + if (value.functionResult !== undefined) return visitor.functionResult(value.functionResult); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + *

An action invocation result.

+ * @public + */ +export interface ReturnControlResults { + /** + *

The action's invocation ID.

+ * @public + */ + invocationId?: string | undefined; + + /** + *

The action invocation result.

+ * @public + */ + returnControlInvocationResults?: InvocationResultMember[] | undefined; +} + +/** + * @public + * @enum + */ +export const PayloadType = { + RETURN_CONTROL: "RETURN_CONTROL", + TEXT: "TEXT", +} as const; + +/** + * @public + */ +export type PayloadType = (typeof PayloadType)[keyof typeof PayloadType]; + +/** + *

Input for an agent collaborator. The input can be text or an action invocation result.

+ * @public + */ +export interface AgentCollaboratorInputPayload { + /** + *

The input type.

+ * @public + */ + type?: PayloadType | undefined; + + /** + *

Input text.

+ * @public + */ + text?: string | undefined; + + /** + *

An action invocation result.

+ * @public + */ + returnControlResults?: ReturnControlResults | undefined; +} + +/** + *

An agent collaborator invocation input.

+ * @public + */ +export interface AgentCollaboratorInvocationInput { + /** + *

The collaborator's name.

+ * @public + */ + agentCollaboratorName?: string | undefined; + + /** + *

The collaborator's alias ARN.

+ * @public + */ + agentCollaboratorAliasArn?: string | undefined; + + /** + *

Text or action invocation result input for the collaborator.

+ * @public + */ + input?: AgentCollaboratorInputPayload | undefined; +} + +/** + *

Information about a parameter to provide to the API request.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface ApiParameter { + /** + *

The name of the parameter.

+ * @public + */ + name?: string | undefined; + + /** + *

The data type for the parameter.

+ * @public + */ + type?: string | undefined; + + /** + *

The value of the parameter.

+ * @public + */ + value?: string | undefined; +} + +/** + *

Contains the parameters in the request body.

+ * @public + */ +export interface PropertyParameters { + /** + *

A list of parameters in the request body.

+ * @public + */ + properties?: Parameter[] | undefined; +} + +/** + *

The request body to provide for the API request, as the agent elicited from the user.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface ApiRequestBody { + /** + *

The content of the request body. The key of the object in this field is a media type defining the format of the request body.

+ * @public + */ + content?: Record | undefined; +} + +/** + *

Contains information about the API operation that the agent predicts should be called.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface ApiInvocationInput { + /** + *

The action group that the API operation belongs to.

+ * @public + */ + actionGroup: string | undefined; + + /** + *

The HTTP method of the API operation.

+ * @public + */ + httpMethod?: string | undefined; + + /** + *

The path to the API operation.

+ * @public + */ + apiPath?: string | undefined; + + /** + *

The parameters to provide for the API request, as the agent elicited from the user.

+ * @public + */ + parameters?: ApiParameter[] | undefined; + + /** + *

The request body to provide for the API request, as the agent elicited from the user.

+ * @public + */ + requestBody?: ApiRequestBody | undefined; + + /** + *

Contains information about the API operation to invoke.

+ * @public + */ + actionInvocationType?: ActionInvocationType | undefined; + + /** + *

The agent's ID.

+ * @public + */ + agentId?: string | undefined; + + /** + *

The agent collaborator's name.

+ * @public + */ + collaboratorName?: string | undefined; +} + +/** + *

Contains information about a parameter of the function.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface FunctionParameter { + /** + *

The name of the parameter.

+ * @public + */ + name?: string | undefined; + + /** + *

The data type of the parameter.

+ * @public + */ + type?: string | undefined; + + /** + *

The value of the parameter.

+ * @public + */ + value?: string | undefined; +} + +/** + *

Contains information about the function that the agent predicts should be called.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface FunctionInvocationInput { + /** + *

The action group that the function belongs to.

+ * @public + */ + actionGroup: string | undefined; + + /** + *

A list of parameters of the function.

+ * @public + */ + parameters?: FunctionParameter[] | undefined; + + /** + *

The name of the function.

+ * @public + */ + function?: string | undefined; + + /** + *

Contains information about the function to invoke,

+ * @public + */ + actionInvocationType?: ActionInvocationType | undefined; + + /** + *

The agent's ID.

+ * @public + */ + agentId?: string | undefined; + + /** + *

The collaborator's name.

+ * @public + */ + collaboratorName?: string | undefined; +} + +/** + *

Contains details about the API operation or function that the agent predicts should be called.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export type InvocationInputMember = + | InvocationInputMember.ApiInvocationInputMember + | InvocationInputMember.FunctionInvocationInputMember + | InvocationInputMember.$UnknownMember; + +/** + * @public + */ +export namespace InvocationInputMember { + /** + *

Contains information about the API operation that the agent predicts should be called.

+ * @public + */ + export interface ApiInvocationInputMember { + apiInvocationInput: ApiInvocationInput; + functionInvocationInput?: never; + $unknown?: never; + } + + /** + *

Contains information about the function that the agent predicts should be called.

+ * @public + */ + export interface FunctionInvocationInputMember { + apiInvocationInput?: never; + functionInvocationInput: FunctionInvocationInput; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + apiInvocationInput?: never; + functionInvocationInput?: never; + $unknown: [string, any]; + } + + export interface Visitor { + apiInvocationInput: (value: ApiInvocationInput) => T; + functionInvocationInput: (value: FunctionInvocationInput) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: InvocationInputMember, visitor: Visitor): T => { + if (value.apiInvocationInput !== undefined) return visitor.apiInvocationInput(value.apiInvocationInput); + if (value.functionInvocationInput !== undefined) + return visitor.functionInvocationInput(value.functionInvocationInput); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + *

Contains information to return from the action group that the agent has predicted to invoke.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface ReturnControlPayload { + /** + *

A list of objects that contain information about the parameters and inputs that need to be sent into the API operation or function, based on what the agent determines from its session with the user.

+ * @public + */ + invocationInputs?: InvocationInputMember[] | undefined; + + /** + *

The identifier of the action group invocation.

+ * @public + */ + invocationId?: string | undefined; +} + +/** + *

Output from an agent collaborator. The output can be text or an action invocation result.

+ * @public + */ +export interface AgentCollaboratorOutputPayload { + /** + *

The type of output.

+ * @public + */ + type?: PayloadType | undefined; + + /** + *

Text output.

+ * @public + */ + text?: string | undefined; + + /** + *

An action invocation result.

+ * @public + */ + returnControlPayload?: ReturnControlPayload | undefined; +} + +/** + *

Output from an agent collaborator.

+ * @public + */ +export interface AgentCollaboratorInvocationOutput { + /** + *

The output's agent collaborator name.

+ * @public + */ + agentCollaboratorName?: string | undefined; + + /** + *

The output's agent collaborator alias ARN.

+ * @public + */ + agentCollaboratorAliasArn?: string | undefined; + + /** + *

The output's output.

+ * @public + */ + output?: AgentCollaboratorOutputPayload | undefined; +} + /** *

There was an issue with a dependency due to a server issue. Retry your request.

* @public @@ -1522,6 +2164,88 @@ export interface InvokeFlowResponse { responseStream: AsyncIterable | undefined; } +/** + *

A content block.

+ * @public + */ +export type ContentBlock = ContentBlock.TextMember | ContentBlock.$UnknownMember; + +/** + * @public + */ +export namespace ContentBlock { + /** + *

The block's text.

+ * @public + */ + export interface TextMember { + text: string; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + text?: never; + $unknown: [string, any]; + } + + export interface Visitor { + text: (value: string) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: ContentBlock, visitor: Visitor): T => { + if (value.text !== undefined) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const ConversationRole = { + ASSISTANT: "assistant", + USER: "user", +} as const; + +/** + * @public + */ +export type ConversationRole = (typeof ConversationRole)[keyof typeof ConversationRole]; + +/** + *

Details about a message.

+ * @public + */ +export interface Message { + /** + *

The message's role.

+ * @public + */ + role: ConversationRole | undefined; + + /** + *

The message's content.

+ * @public + */ + content: ContentBlock[] | undefined; +} + +/** + *

A conversation history.

+ * @public + */ +export interface ConversationHistory { + /** + *

The conversation's messages.

+ * @public + */ + messages?: Message[] | undefined; +} + /** *

The property contains the file to chat with, along with its attributes.

* @public @@ -1870,242 +2594,34 @@ export interface VectorSearchBedrockRerankingConfiguration { /** * @public - * @enum - */ -export const VectorSearchRerankingConfigurationType = { - BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL", -} as const; - -/** - * @public - */ -export type VectorSearchRerankingConfigurationType = - (typeof VectorSearchRerankingConfigurationType)[keyof typeof VectorSearchRerankingConfigurationType]; - -/** - *

Contains configurations for reranking the retrieved results.

- * @public - */ -export interface VectorSearchRerankingConfiguration { - /** - *

The type of reranker model.

- * @public - */ - type: VectorSearchRerankingConfigurationType | undefined; - - /** - *

Contains configurations for an Amazon Bedrock reranker model.

- * @public - */ - bedrockRerankingConfiguration?: VectorSearchBedrockRerankingConfiguration | undefined; -} - -/** - * @public - * @enum - */ -export const ConfirmationState = { - CONFIRM: "CONFIRM", - DENY: "DENY", -} as const; - -/** - * @public - */ -export type ConfirmationState = (typeof ConfirmationState)[keyof typeof ConfirmationState]; - -/** - *

Contains the body of the API response.

- *

This data type is used in the following API operations:

- * - * @public - */ -export interface ContentBody { - /** - *

The body of the API response.

- * @public - */ - body?: string | undefined; -} - -/** - * @public - * @enum - */ -export const ResponseState = { - FAILURE: "FAILURE", - REPROMPT: "REPROMPT", -} as const; - -/** - * @public - */ -export type ResponseState = (typeof ResponseState)[keyof typeof ResponseState]; - -/** - *

Contains information about the API operation that was called from the action group and the response body that was returned.

- *

This data type is used in the following API operations:

- * - * @public - */ -export interface ApiResult { - /** - *

The action group that the API operation belongs to.

- * @public - */ - actionGroup: string | undefined; - - /** - *

The HTTP method for the API operation.

- * @public - */ - httpMethod?: string | undefined; - - /** - *

The path to the API operation.

- * @public - */ - apiPath?: string | undefined; - - /** - *

Controls the API operations or functions to invoke based on the user confirmation.

- * @public - */ - confirmationState?: ConfirmationState | undefined; - - /** - *

The response body from the API operation. The key of the object is the content type (currently, only TEXT is supported). The response may be returned directly or from the Lambda function.

- * @public - */ - responseBody?: Record | undefined; - - /** - *

http status code from API execution response (for example: 200, 400, 500).

- * @public - */ - httpStatusCode?: number | undefined; - - /** - *

Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt

- * @public - */ - responseState?: ResponseState | undefined; -} - -/** - *

Contains information about the function that was called from the action group and the response that was returned.

- *

This data type is used in the following API operations:

- * - * @public - */ -export interface FunctionResult { - /** - *

The action group that the function belongs to.

- * @public - */ - actionGroup: string | undefined; - - /** - *

Contains the user confirmation information about the function that was called.

- * @public - */ - confirmationState?: ConfirmationState | undefined; - - /** - *

The name of the function that was called.

- * @public - */ - function?: string | undefined; - - /** - *

The response from the function call using the parameters. The key of the object is the content type (currently, only TEXT is supported). The response may be returned directly or from the Lambda function.

- * @public - */ - responseBody?: Record | undefined; - - /** - *

Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt

- * @public - */ - responseState?: ResponseState | undefined; -} + * @enum + */ +export const VectorSearchRerankingConfigurationType = { + BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL", +} as const; /** - *

A result from the invocation of an action. For more information, see Return control to the agent developer and Control session context.

- *

This data type is used in the following API operations:

- * * @public */ -export type InvocationResultMember = - | InvocationResultMember.ApiResultMember - | InvocationResultMember.FunctionResultMember - | InvocationResultMember.$UnknownMember; +export type VectorSearchRerankingConfigurationType = + (typeof VectorSearchRerankingConfigurationType)[keyof typeof VectorSearchRerankingConfigurationType]; /** + *

Contains configurations for reranking the retrieved results.

* @public */ -export namespace InvocationResultMember { - /** - *

The result from the API response from the action group invocation.

- * @public - */ - export interface ApiResultMember { - apiResult: ApiResult; - functionResult?: never; - $unknown?: never; - } - +export interface VectorSearchRerankingConfiguration { /** - *

The result from the function from the action group invocation.

+ *

The type of reranker model.

* @public */ - export interface FunctionResultMember { - apiResult?: never; - functionResult: FunctionResult; - $unknown?: never; - } + type: VectorSearchRerankingConfigurationType | undefined; /** + *

Contains configurations for an Amazon Bedrock reranker model.

* @public */ - export interface $UnknownMember { - apiResult?: never; - functionResult?: never; - $unknown: [string, any]; - } - - export interface Visitor { - apiResult: (value: ApiResult) => T; - functionResult: (value: FunctionResult) => T; - _: (name: string, value: any) => T; - } - - export const visit = (value: InvocationResultMember, visitor: Visitor): T => { - if (value.apiResult !== undefined) return visitor.apiResult(value.apiResult); - if (value.functionResult !== undefined) return visitor.functionResult(value.functionResult); - return visitor._(value.$unknown[0], value.$unknown[1]); - }; + bedrockRerankingConfiguration?: VectorSearchBedrockRerankingConfiguration | undefined; } /** @@ -2426,337 +2942,135 @@ export interface RetrievalResultLocation { */ export interface RetrievedReference { /** - *

Contains the cited text from the data source.

- * @public - */ - content?: RetrievalResultContent | undefined; - - /** - *

Contains information about the location of the data source.

- * @public - */ - location?: RetrievalResultLocation | undefined; - - /** - *

Contains metadata attributes and their values for the file in the data source. For more information, see Metadata and filtering.

- * @public - */ - metadata?: Record | undefined; -} - -/** - *

An object containing a segment of the generated response that is based on a source in the knowledge base, alongside information about the source.

- *

This data type is used in the following API operations:

- * - * @public - */ -export interface Citation { - /** - *

Contains the generated response and metadata

- * @public - */ - generatedResponsePart?: GeneratedResponsePart | undefined; - - /** - *

Contains metadata about the sources cited for the generated response.

- * @public - */ - retrievedReferences?: RetrievedReference[] | undefined; -} - -/** - *

Contains citations for a part of an agent response.

- * @public - */ -export interface Attribution { - /** - *

A list of citations and related information for a part of an agent response.

- * @public - */ - citations?: Citation[] | undefined; -} - -/** - *

Contains a part of an agent response and citations for it.

- * @public - */ -export interface PayloadPart { - /** - *

A part of the agent response in bytes.

- * @public - */ - bytes?: Uint8Array | undefined; - - /** - *

Contains citations for a part of an agent response.

- * @public - */ - attribution?: Attribution | undefined; -} - -/** - *

Contains details of the response from code interpreter.

- * @public - */ -export interface OutputFile { - /** - *

The name of the file containing response from code interpreter.

- * @public - */ - name?: string | undefined; - - /** - *

The type of file that contains response from the code interpreter.

- * @public - */ - type?: string | undefined; - - /** - *

The byte count of files that contains response from code interpreter.

- * @public - */ - bytes?: Uint8Array | undefined; -} - -/** - *

Contains intermediate response for code interpreter if any files have been generated.

- * @public - */ -export interface FilePart { - /** - *

Files containing intermediate response for the user.

- * @public - */ - files?: OutputFile[] | undefined; -} - -/** - *

Information about a parameter to provide to the API request.

- *

This data type is used in the following API operations:

- * - * @public - */ -export interface ApiParameter { - /** - *

The name of the parameter.

- * @public - */ - name?: string | undefined; - - /** - *

The data type for the parameter.

- * @public - */ - type?: string | undefined; - - /** - *

The value of the parameter.

- * @public - */ - value?: string | undefined; -} - -/** - *

Contains the parameters in the request body.

- * @public - */ -export interface PropertyParameters { - /** - *

A list of parameters in the request body.

- * @public - */ - properties?: Parameter[] | undefined; -} - -/** - *

The request body to provide for the API request, as the agent elicited from the user.

- *

This data type is used in the following API operations:

- * - * @public - */ -export interface ApiRequestBody { - /** - *

The content of the request body. The key of the object in this field is a media type defining the format of the request body.

- * @public - */ - content?: Record | undefined; -} - -/** - *

Contains information about the API operation that the agent predicts should be called.

- *

This data type is used in the following API operations:

- * - * @public - */ -export interface ApiInvocationInput { - /** - *

The action group that the API operation belongs to.

- * @public - */ - actionGroup: string | undefined; - - /** - *

The HTTP method of the API operation.

+ *

Contains the cited text from the data source.

* @public */ - httpMethod?: string | undefined; + content?: RetrievalResultContent | undefined; /** - *

The path to the API operation.

+ *

Contains information about the location of the data source.

* @public */ - apiPath?: string | undefined; + location?: RetrievalResultLocation | undefined; /** - *

The parameters to provide for the API request, as the agent elicited from the user.

+ *

Contains metadata attributes and their values for the file in the data source. For more information, see Metadata and filtering.

* @public */ - parameters?: ApiParameter[] | undefined; + metadata?: Record | undefined; +} +/** + *

An object containing a segment of the generated response that is based on a source in the knowledge base, alongside information about the source.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface Citation { /** - *

The request body to provide for the API request, as the agent elicited from the user.

+ *

Contains the generated response and metadata

* @public */ - requestBody?: ApiRequestBody | undefined; + generatedResponsePart?: GeneratedResponsePart | undefined; /** - *

Contains information about the API operation to invoke.

+ *

Contains metadata about the sources cited for the generated response.

* @public */ - actionInvocationType?: ActionInvocationType | undefined; + retrievedReferences?: RetrievedReference[] | undefined; } /** - *

Contains information about a parameter of the function.

- *

This data type is used in the following API operations:

- * + *

Contains citations for a part of an agent response.

* @public */ -export interface FunctionParameter { +export interface Attribution { /** - *

The name of the parameter.

+ *

A list of citations and related information for a part of an agent response.

* @public */ - name?: string | undefined; + citations?: Citation[] | undefined; +} +/** + *

Contains a part of an agent response and citations for it.

+ * @public + */ +export interface PayloadPart { /** - *

The data type of the parameter.

+ *

A part of the agent response in bytes.

* @public */ - type?: string | undefined; + bytes?: Uint8Array | undefined; /** - *

The value of the parameter.

+ *

Contains citations for a part of an agent response.

* @public */ - value?: string | undefined; + attribution?: Attribution | undefined; } /** - *

Contains information about the function that the agent predicts should be called.

- *

This data type is used in the following API operations:

- * + *

Contains details of the response from code interpreter.

* @public */ -export interface FunctionInvocationInput { +export interface OutputFile { /** - *

The action group that the function belongs to.

+ *

The name of the file containing response from code interpreter.

* @public */ - actionGroup: string | undefined; + name?: string | undefined; /** - *

A list of parameters of the function.

+ *

The type of file that contains response from the code interpreter.

* @public */ - parameters?: FunctionParameter[] | undefined; + type?: string | undefined; /** - *

The name of the function.

+ *

The byte count of files that contains response from code interpreter.

* @public */ - function?: string | undefined; + bytes?: Uint8Array | undefined; +} +/** + *

Contains intermediate response for code interpreter if any files have been generated.

+ * @public + */ +export interface FilePart { /** - *

Contains information about the function to invoke,

+ *

Files containing intermediate response for the user.

* @public */ - actionInvocationType?: ActionInvocationType | undefined; + files?: OutputFile[] | undefined; } /** - *

Contains details about the API operation or function that the agent predicts should be called.

- *

This data type is used in the following API operations:

- * + *

Details about a caller.

* @public */ -export type InvocationInputMember = - | InvocationInputMember.ApiInvocationInputMember - | InvocationInputMember.FunctionInvocationInputMember - | InvocationInputMember.$UnknownMember; +export type Caller = Caller.AgentAliasArnMember | Caller.$UnknownMember; /** * @public */ -export namespace InvocationInputMember { +export namespace Caller { /** - *

Contains information about the API operation that the agent predicts should be called.

- * @public - */ - export interface ApiInvocationInputMember { - apiInvocationInput: ApiInvocationInput; - functionInvocationInput?: never; - $unknown?: never; - } - - /** - *

Contains information about the function that the agent predicts should be called.

+ *

The caller's agent alias ARN.

* @public */ - export interface FunctionInvocationInputMember { - apiInvocationInput?: never; - functionInvocationInput: FunctionInvocationInput; + export interface AgentAliasArnMember { + agentAliasArn: string; $unknown?: never; } @@ -2764,51 +3078,21 @@ export namespace InvocationInputMember { * @public */ export interface $UnknownMember { - apiInvocationInput?: never; - functionInvocationInput?: never; + agentAliasArn?: never; $unknown: [string, any]; } export interface Visitor { - apiInvocationInput: (value: ApiInvocationInput) => T; - functionInvocationInput: (value: FunctionInvocationInput) => T; + agentAliasArn: (value: string) => T; _: (name: string, value: any) => T; } - export const visit = (value: InvocationInputMember, visitor: Visitor): T => { - if (value.apiInvocationInput !== undefined) return visitor.apiInvocationInput(value.apiInvocationInput); - if (value.functionInvocationInput !== undefined) - return visitor.functionInvocationInput(value.functionInvocationInput); + export const visit = (value: Caller, visitor: Visitor): T => { + if (value.agentAliasArn !== undefined) return visitor.agentAliasArn(value.agentAliasArn); return visitor._(value.$unknown[0], value.$unknown[1]); }; } -/** - *

Contains information to return from the action group that the agent has predicted to invoke.

- *

This data type is used in the following API operations:

- * - * @public - */ -export interface ReturnControlPayload { - /** - *

A list of objects that contain information about the parameters and inputs that need to be sent into the API operation or function, based on what the agent determines from its session with the user.

- * @public - */ - invocationInputs?: InvocationInputMember[] | undefined; - - /** - *

The identifier of the action group invocation.

- * @public - */ - invocationId?: string | undefined; -} - /** *

* The event in the custom orchestration sequence. Events are the responses which the custom orchestration Lambda function sends as response to the agent. @@ -3329,6 +3613,7 @@ export interface CodeInterpreterInvocationInput { export const InvocationType = { ACTION_GROUP: "ACTION_GROUP", ACTION_GROUP_CODE_INTERPRETER: "ACTION_GROUP_CODE_INTERPRETER", + AGENT_COLLABORATOR: "AGENT_COLLABORATOR", FINISH: "FINISH", KNOWLEDGE_BASE: "KNOWLEDGE_BASE", } as const; @@ -3390,6 +3675,12 @@ export interface InvocationInput { * @public */ codeInterpreterInvocationInput?: CodeInterpreterInvocationInput | undefined; + + /** + *

The collaborator's invocation input.

+ * @public + */ + agentCollaboratorInvocationInput?: AgentCollaboratorInvocationInput | undefined; } /** @@ -3516,6 +3807,12 @@ export interface ModelInvocationInput { * @public */ parserMode?: CreationMode | undefined; + + /** + *

The identifier of a foundation model.

+ * @public + */ + foundationModel?: string | undefined; } /** @@ -3677,6 +3974,7 @@ export interface RepromptResponse { */ export const Type = { ACTION_GROUP: "ACTION_GROUP", + AGENT_COLLABORATOR: "AGENT_COLLABORATOR", ASK_USER: "ASK_USER", FINISH: "FINISH", KNOWLEDGE_BASE: "KNOWLEDGE_BASE", @@ -3733,6 +4031,12 @@ export interface Observation { */ actionGroupInvocationOutput?: ActionGroupInvocationOutput | undefined; + /** + *

A collaborator's invocation output.

+ * @public + */ + agentCollaboratorInvocationOutput?: AgentCollaboratorInvocationOutput | undefined; + /** *

Contains details about the results from looking up the knowledge base.

* @public @@ -4067,43 +4371,152 @@ export interface PreProcessingModelInvocationOutput { *

Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.

* @public */ -export type PreProcessingTrace = - | PreProcessingTrace.ModelInvocationInputMember - | PreProcessingTrace.ModelInvocationOutputMember - | PreProcessingTrace.$UnknownMember; +export type PreProcessingTrace = + | PreProcessingTrace.ModelInvocationInputMember + | PreProcessingTrace.ModelInvocationOutputMember + | PreProcessingTrace.$UnknownMember; + +/** + * @public + */ +export namespace PreProcessingTrace { + /** + *

The input for the pre-processing step.

+ *
    + *
  • + *

    The type is PRE_PROCESSING.

    + *
  • + *
  • + *

    The text contains the prompt.

    + *
  • + *
  • + *

    The inferenceConfiguration, parserMode, and overrideLambda values are set in the PromptOverrideConfiguration object that was set when the agent was created or updated.

    + *
  • + *
+ * @public + */ + export interface ModelInvocationInputMember { + modelInvocationInput: ModelInvocationInput; + modelInvocationOutput?: never; + $unknown?: never; + } + + /** + *

The foundation model output from the pre-processing step.

+ * @public + */ + export interface ModelInvocationOutputMember { + modelInvocationInput?: never; + modelInvocationOutput: PreProcessingModelInvocationOutput; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + modelInvocationInput?: never; + modelInvocationOutput?: never; + $unknown: [string, any]; + } + + export interface Visitor { + modelInvocationInput: (value: ModelInvocationInput) => T; + modelInvocationOutput: (value: PreProcessingModelInvocationOutput) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: PreProcessingTrace, visitor: Visitor): T => { + if (value.modelInvocationInput !== undefined) return visitor.modelInvocationInput(value.modelInvocationInput); + if (value.modelInvocationOutput !== undefined) return visitor.modelInvocationOutput(value.modelInvocationOutput); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + *

Invocation output from a routing classifier model.

+ * @public + */ +export interface RoutingClassifierModelInvocationOutput { + /** + *

The invocation's trace ID.

+ * @public + */ + traceId?: string | undefined; + + /** + *

The invocation's raw response.

+ * @public + */ + rawResponse?: RawResponse | undefined; + + /** + *

The invocation's metadata.

+ * @public + */ + metadata?: Metadata | undefined; +} + +/** + *

A trace for a routing classifier.

+ * @public + */ +export type RoutingClassifierTrace = + | RoutingClassifierTrace.InvocationInputMember + | RoutingClassifierTrace.ModelInvocationInputMember + | RoutingClassifierTrace.ModelInvocationOutputMember + | RoutingClassifierTrace.ObservationMember + | RoutingClassifierTrace.$UnknownMember; /** * @public */ -export namespace PreProcessingTrace { +export namespace RoutingClassifierTrace { /** - *

The input for the pre-processing step.

- *
    - *
  • - *

    The type is PRE_PROCESSING.

    - *
  • - *
  • - *

    The text contains the prompt.

    - *
  • - *
  • - *

    The inferenceConfiguration, parserMode, and overrideLambda values are set in the PromptOverrideConfiguration object that was set when the agent was created or updated.

    - *
  • - *
+ *

The classifier's invocation input.

+ * @public + */ + export interface InvocationInputMember { + invocationInput: InvocationInput; + observation?: never; + modelInvocationInput?: never; + modelInvocationOutput?: never; + $unknown?: never; + } + + /** + *

The classifier's observation.

+ * @public + */ + export interface ObservationMember { + invocationInput?: never; + observation: Observation; + modelInvocationInput?: never; + modelInvocationOutput?: never; + $unknown?: never; + } + + /** + *

The classifier's model invocation input.

* @public */ export interface ModelInvocationInputMember { + invocationInput?: never; + observation?: never; modelInvocationInput: ModelInvocationInput; modelInvocationOutput?: never; $unknown?: never; } /** - *

The foundation model output from the pre-processing step.

+ *

The classifier's model invocation output.

* @public */ export interface ModelInvocationOutputMember { + invocationInput?: never; + observation?: never; modelInvocationInput?: never; - modelInvocationOutput: PreProcessingModelInvocationOutput; + modelInvocationOutput: RoutingClassifierModelInvocationOutput; $unknown?: never; } @@ -4111,18 +4524,24 @@ export namespace PreProcessingTrace { * @public */ export interface $UnknownMember { + invocationInput?: never; + observation?: never; modelInvocationInput?: never; modelInvocationOutput?: never; $unknown: [string, any]; } export interface Visitor { + invocationInput: (value: InvocationInput) => T; + observation: (value: Observation) => T; modelInvocationInput: (value: ModelInvocationInput) => T; - modelInvocationOutput: (value: PreProcessingModelInvocationOutput) => T; + modelInvocationOutput: (value: RoutingClassifierModelInvocationOutput) => T; _: (name: string, value: any) => T; } - export const visit = (value: PreProcessingTrace, visitor: Visitor): T => { + export const visit = (value: RoutingClassifierTrace, visitor: Visitor): T => { + if (value.invocationInput !== undefined) return visitor.invocationInput(value.invocationInput); + if (value.observation !== undefined) return visitor.observation(value.observation); if (value.modelInvocationInput !== undefined) return visitor.modelInvocationInput(value.modelInvocationInput); if (value.modelInvocationOutput !== undefined) return visitor.modelInvocationOutput(value.modelInvocationOutput); return visitor._(value.$unknown[0], value.$unknown[1]); @@ -4140,6 +4559,7 @@ export type Trace = | Trace.OrchestrationTraceMember | Trace.PostProcessingTraceMember | Trace.PreProcessingTraceMember + | Trace.RoutingClassifierTraceMember | Trace.$UnknownMember; /** @@ -4155,6 +4575,7 @@ export namespace Trace { preProcessingTrace?: never; orchestrationTrace?: never; postProcessingTrace?: never; + routingClassifierTrace?: never; failureTrace?: never; customOrchestrationTrace?: never; $unknown?: never; @@ -4169,6 +4590,7 @@ export namespace Trace { preProcessingTrace: PreProcessingTrace; orchestrationTrace?: never; postProcessingTrace?: never; + routingClassifierTrace?: never; failureTrace?: never; customOrchestrationTrace?: never; $unknown?: never; @@ -4183,6 +4605,7 @@ export namespace Trace { preProcessingTrace?: never; orchestrationTrace: OrchestrationTrace; postProcessingTrace?: never; + routingClassifierTrace?: never; failureTrace?: never; customOrchestrationTrace?: never; $unknown?: never; @@ -4197,6 +4620,22 @@ export namespace Trace { preProcessingTrace?: never; orchestrationTrace?: never; postProcessingTrace: PostProcessingTrace; + routingClassifierTrace?: never; + failureTrace?: never; + customOrchestrationTrace?: never; + $unknown?: never; + } + + /** + *

A routing classifier's trace.

+ * @public + */ + export interface RoutingClassifierTraceMember { + guardrailTrace?: never; + preProcessingTrace?: never; + orchestrationTrace?: never; + postProcessingTrace?: never; + routingClassifierTrace: RoutingClassifierTrace; failureTrace?: never; customOrchestrationTrace?: never; $unknown?: never; @@ -4211,6 +4650,7 @@ export namespace Trace { preProcessingTrace?: never; orchestrationTrace?: never; postProcessingTrace?: never; + routingClassifierTrace?: never; failureTrace: FailureTrace; customOrchestrationTrace?: never; $unknown?: never; @@ -4227,6 +4667,7 @@ export namespace Trace { preProcessingTrace?: never; orchestrationTrace?: never; postProcessingTrace?: never; + routingClassifierTrace?: never; failureTrace?: never; customOrchestrationTrace: CustomOrchestrationTrace; $unknown?: never; @@ -4240,6 +4681,7 @@ export namespace Trace { preProcessingTrace?: never; orchestrationTrace?: never; postProcessingTrace?: never; + routingClassifierTrace?: never; failureTrace?: never; customOrchestrationTrace?: never; $unknown: [string, any]; @@ -4250,6 +4692,7 @@ export namespace Trace { preProcessingTrace: (value: PreProcessingTrace) => T; orchestrationTrace: (value: OrchestrationTrace) => T; postProcessingTrace: (value: PostProcessingTrace) => T; + routingClassifierTrace: (value: RoutingClassifierTrace) => T; failureTrace: (value: FailureTrace) => T; customOrchestrationTrace: (value: CustomOrchestrationTrace) => T; _: (name: string, value: any) => T; @@ -4260,6 +4703,7 @@ export namespace Trace { if (value.preProcessingTrace !== undefined) return visitor.preProcessingTrace(value.preProcessingTrace); if (value.orchestrationTrace !== undefined) return visitor.orchestrationTrace(value.orchestrationTrace); if (value.postProcessingTrace !== undefined) return visitor.postProcessingTrace(value.postProcessingTrace); + if (value.routingClassifierTrace !== undefined) return visitor.routingClassifierTrace(value.routingClassifierTrace); if (value.failureTrace !== undefined) return visitor.failureTrace(value.failureTrace); if (value.customOrchestrationTrace !== undefined) return visitor.customOrchestrationTrace(value.customOrchestrationTrace); @@ -4301,6 +4745,18 @@ export interface TracePart { * @public */ agentVersion?: string | undefined; + + /** + *

The part's caller chain.

+ * @public + */ + callerChain?: Caller[] | undefined; + + /** + *

The part's collaborator name.

+ * @public + */ + collaboratorName?: string | undefined; } /** @@ -7853,6 +8309,12 @@ export interface SessionState { * @public */ knowledgeBaseConfigurations?: KnowledgeBaseConfiguration[] | undefined; + + /** + *

The state's conversation history.

+ * @public + */ + conversationHistory?: ConversationHistory | undefined; } /** @@ -7920,6 +8382,12 @@ export interface InvokeAgentRequest { * @public */ streamingConfigurations?: StreamingConfigurations | undefined; + + /** + *

The ARN of the resource making the request.

+ * @public + */ + sourceArn?: string | undefined; } /** @@ -7979,6 +8447,109 @@ export const AgentActionGroupFilterSensitiveLog = (obj: AgentActionGroup): any = ...(obj.functionSchema && { functionSchema: FunctionSchemaFilterSensitiveLog(obj.functionSchema) }), }); +/** + * @internal + */ +export const ApiResultFilterSensitiveLog = (obj: ApiResult): any => ({ + ...obj, + ...(obj.apiPath && { apiPath: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const InvocationResultMemberFilterSensitiveLog = (obj: InvocationResultMember): any => { + if (obj.apiResult !== undefined) return { apiResult: ApiResultFilterSensitiveLog(obj.apiResult) }; + if (obj.functionResult !== undefined) return { functionResult: obj.functionResult }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const ReturnControlResultsFilterSensitiveLog = (obj: ReturnControlResults): any => ({ + ...obj, + ...(obj.returnControlInvocationResults && { + returnControlInvocationResults: obj.returnControlInvocationResults.map((item) => + InvocationResultMemberFilterSensitiveLog(item) + ), + }), +}); + +/** + * @internal + */ +export const AgentCollaboratorInputPayloadFilterSensitiveLog = (obj: AgentCollaboratorInputPayload): any => ({ + ...obj, + ...(obj.text && { text: SENSITIVE_STRING }), + ...(obj.returnControlResults && { + returnControlResults: ReturnControlResultsFilterSensitiveLog(obj.returnControlResults), + }), +}); + +/** + * @internal + */ +export const AgentCollaboratorInvocationInputFilterSensitiveLog = (obj: AgentCollaboratorInvocationInput): any => ({ + ...obj, + ...(obj.input && { input: AgentCollaboratorInputPayloadFilterSensitiveLog(obj.input) }), +}); + +/** + * @internal + */ +export const ApiInvocationInputFilterSensitiveLog = (obj: ApiInvocationInput): any => ({ + ...obj, + ...(obj.apiPath && { apiPath: SENSITIVE_STRING }), + ...(obj.collaboratorName && { collaboratorName: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const FunctionInvocationInputFilterSensitiveLog = (obj: FunctionInvocationInput): any => ({ + ...obj, + ...(obj.collaboratorName && { collaboratorName: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const InvocationInputMemberFilterSensitiveLog = (obj: InvocationInputMember): any => { + if (obj.apiInvocationInput !== undefined) + return { apiInvocationInput: ApiInvocationInputFilterSensitiveLog(obj.apiInvocationInput) }; + if (obj.functionInvocationInput !== undefined) + return { functionInvocationInput: FunctionInvocationInputFilterSensitiveLog(obj.functionInvocationInput) }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const ReturnControlPayloadFilterSensitiveLog = (obj: ReturnControlPayload): any => ({ + ...obj, + ...(obj.invocationInputs && { + invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item)), + }), +}); + +/** + * @internal + */ +export const AgentCollaboratorOutputPayloadFilterSensitiveLog = (obj: AgentCollaboratorOutputPayload): any => ({ + ...obj, + ...(obj.text && { text: SENSITIVE_STRING }), + ...(obj.returnControlPayload && { returnControlPayload: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const AgentCollaboratorInvocationOutputFilterSensitiveLog = (obj: AgentCollaboratorInvocationOutput): any => ({ + ...obj, + ...(obj.output && { output: AgentCollaboratorOutputPayloadFilterSensitiveLog(obj.output) }), +}); + /** * @internal */ @@ -8119,6 +8690,30 @@ export const InvokeFlowResponseFilterSensitiveLog = (obj: InvokeFlowResponse): a ...(obj.responseStream && { responseStream: "STREAMING_CONTENT" }), }); +/** + * @internal + */ +export const ContentBlockFilterSensitiveLog = (obj: ContentBlock): any => { + if (obj.text !== undefined) return { text: obj.text }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const MessageFilterSensitiveLog = (obj: Message): any => ({ + ...obj, + ...(obj.content && { content: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const ConversationHistoryFilterSensitiveLog = (obj: ConversationHistory): any => ({ + ...obj, + ...(obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }), +}); + /** * @internal */ @@ -8205,23 +8800,6 @@ export const VectorSearchRerankingConfigurationFilterSensitiveLog = (obj: Vector }), }); -/** - * @internal - */ -export const ApiResultFilterSensitiveLog = (obj: ApiResult): any => ({ - ...obj, - ...(obj.apiPath && { apiPath: SENSITIVE_STRING }), -}); - -/** - * @internal - */ -export const InvocationResultMemberFilterSensitiveLog = (obj: InvocationResultMember): any => { - if (obj.apiResult !== undefined) return { apiResult: ApiResultFilterSensitiveLog(obj.apiResult) }; - if (obj.functionResult !== undefined) return { functionResult: obj.functionResult }; - if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; -}; - /** * @internal */ @@ -8307,34 +8885,6 @@ export const FilePartFilterSensitiveLog = (obj: FilePart): any => ({ ...(obj.files && { files: SENSITIVE_STRING }), }); -/** - * @internal - */ -export const ApiInvocationInputFilterSensitiveLog = (obj: ApiInvocationInput): any => ({ - ...obj, - ...(obj.apiPath && { apiPath: SENSITIVE_STRING }), -}); - -/** - * @internal - */ -export const InvocationInputMemberFilterSensitiveLog = (obj: InvocationInputMember): any => { - if (obj.apiInvocationInput !== undefined) - return { apiInvocationInput: ApiInvocationInputFilterSensitiveLog(obj.apiInvocationInput) }; - if (obj.functionInvocationInput !== undefined) return { functionInvocationInput: obj.functionInvocationInput }; - if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; -}; - -/** - * @internal - */ -export const ReturnControlPayloadFilterSensitiveLog = (obj: ReturnControlPayload): any => ({ - ...obj, - ...(obj.invocationInputs && { - invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item)), - }), -}); - /** * @internal */ @@ -8476,6 +9026,11 @@ export const InvocationInputFilterSensitiveLog = (obj: InvocationInput): any => ...(obj.knowledgeBaseLookupInput && { knowledgeBaseLookupInput: KnowledgeBaseLookupInputFilterSensitiveLog(obj.knowledgeBaseLookupInput), }), + ...(obj.agentCollaboratorInvocationInput && { + agentCollaboratorInvocationInput: AgentCollaboratorInvocationInputFilterSensitiveLog( + obj.agentCollaboratorInvocationInput + ), + }), }); /** @@ -8551,6 +9106,11 @@ export const ObservationFilterSensitiveLog = (obj: Observation): any => ({ ...(obj.actionGroupInvocationOutput && { actionGroupInvocationOutput: ActionGroupInvocationOutputFilterSensitiveLog(obj.actionGroupInvocationOutput), }), + ...(obj.agentCollaboratorInvocationOutput && { + agentCollaboratorInvocationOutput: AgentCollaboratorInvocationOutputFilterSensitiveLog( + obj.agentCollaboratorInvocationOutput + ), + }), ...(obj.knowledgeBaseLookupOutput && { knowledgeBaseLookupOutput: KnowledgeBaseLookupOutputFilterSensitiveLog(obj.knowledgeBaseLookupOutput), }), @@ -8634,6 +9194,28 @@ export const PreProcessingTraceFilterSensitiveLog = (obj: PreProcessingTrace): a if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; }; +/** + * @internal + */ +export const RoutingClassifierModelInvocationOutputFilterSensitiveLog = ( + obj: RoutingClassifierModelInvocationOutput +): any => ({ + ...obj, + ...(obj.rawResponse && { rawResponse: SENSITIVE_STRING }), + ...(obj.metadata && { metadata: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const RoutingClassifierTraceFilterSensitiveLog = (obj: RoutingClassifierTrace): any => { + if (obj.invocationInput !== undefined) return { invocationInput: SENSITIVE_STRING }; + if (obj.observation !== undefined) return { observation: SENSITIVE_STRING }; + if (obj.modelInvocationInput !== undefined) return { modelInvocationInput: SENSITIVE_STRING }; + if (obj.modelInvocationOutput !== undefined) return { modelInvocationOutput: SENSITIVE_STRING }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + /** * @internal */ @@ -8642,6 +9224,7 @@ export const TraceFilterSensitiveLog = (obj: Trace): any => { if (obj.preProcessingTrace !== undefined) return { preProcessingTrace: SENSITIVE_STRING }; if (obj.orchestrationTrace !== undefined) return { orchestrationTrace: SENSITIVE_STRING }; if (obj.postProcessingTrace !== undefined) return { postProcessingTrace: SENSITIVE_STRING }; + if (obj.routingClassifierTrace !== undefined) return { routingClassifierTrace: SENSITIVE_STRING }; if (obj.failureTrace !== undefined) return { failureTrace: SENSITIVE_STRING }; if (obj.customOrchestrationTrace !== undefined) return { customOrchestrationTrace: SENSITIVE_STRING }; if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; @@ -8653,6 +9236,8 @@ export const TraceFilterSensitiveLog = (obj: Trace): any => { export const TracePartFilterSensitiveLog = (obj: TracePart): any => ({ ...obj, ...(obj.trace && { trace: SENSITIVE_STRING }), + ...(obj.callerChain && { callerChain: obj.callerChain.map((item) => item) }), + ...(obj.collaboratorName && { collaboratorName: SENSITIVE_STRING }), }); /** @@ -9233,6 +9818,9 @@ export const SessionStateFilterSensitiveLog = (obj: SessionState): any => ({ KnowledgeBaseConfigurationFilterSensitiveLog(item) ), }), + ...(obj.conversationHistory && { + conversationHistory: ConversationHistoryFilterSensitiveLog(obj.conversationHistory), + }), }); /** diff --git a/clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts b/clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts index 86fc7db38bab..fbaf463eee6b 100644 --- a/clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts +++ b/clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts @@ -16,6 +16,7 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, + isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, @@ -54,6 +55,7 @@ import { AccessDeniedException, ActionGroupExecutor, AgentActionGroup, + AgentCollaboratorInvocationOutput, AnalyzePromptEvent, ApiResult, APISchema, @@ -66,7 +68,9 @@ import { Citation, CitationEvent, ConflictException, + ContentBlock, ContentBody, + ConversationHistory, DependencyFailedException, ExternalSource, ExternalSourcesGenerationConfiguration, @@ -120,6 +124,7 @@ import { KnowledgeBaseVectorSearchConfiguration, Memory, MemorySessionSummary, + Message, MetadataAttributeSchema, MetadataConfigurationForReranking, ModelInvocationInput, @@ -154,6 +159,7 @@ import { RetrieveAndGenerateStreamResponseOutput, RetrievedReference, ReturnControlPayload, + RoutingClassifierTrace, S3Identifier, S3ObjectDoc, S3ObjectFile, @@ -222,9 +228,10 @@ export const se_InvokeAgentCommand = async ( context: __SerdeContext ): Promise<__HttpRequest> => { const b = rb(input, context); - const headers: any = { + const headers: any = map({}, isSerializableHeaderValue, { "content-type": "application/json", - }; + [_xasa]: input[_sA]!, + }); b.bp("/agents/{agentId}/agentAliases/{agentAliasId}/sessions/{sessionId}/text"); b.p("agentId", () => input.agentId!, "{agentId}", false); b.p("agentAliasId", () => input.agentAliasId!, "{agentAliasId}", false); @@ -1484,8 +1491,14 @@ const se_ByteContentFile = (input: ByteContentFile, context: __SerdeContext): an }); }; +// se_ContentBlock omitted. + +// se_ContentBlocks omitted. + // se_ContentBody omitted. +// se_ConversationHistory omitted. + /** * serializeAws_restJson1ExternalSource */ @@ -1777,6 +1790,10 @@ const se_KnowledgeBaseVectorSearchConfiguration = ( }); }; +// se_Message omitted. + +// se_Messages omitted. + // se_MetadataAttributeSchema omitted. // se_MetadataAttributeSchemaList omitted. @@ -1957,6 +1974,7 @@ const se_RetrieveAndGenerateConfiguration = (input: RetrieveAndGenerateConfigura */ const se_SessionState = (input: SessionState, context: __SerdeContext): any => { return take(input, { + conversationHistory: _json, files: (_) => se_InputFiles(_, context), invocationId: [], knowledgeBaseConfigurations: (_) => se_KnowledgeBaseConfigurations(_, context), @@ -2035,6 +2053,26 @@ const se_Document = (input: __DocumentType, context: __SerdeContext): any => { // de_ActionGroupInvocationOutput omitted. +// de_AgentCollaboratorInputPayload omitted. + +// de_AgentCollaboratorInvocationInput omitted. + +/** + * deserializeAws_restJson1AgentCollaboratorInvocationOutput + */ +const de_AgentCollaboratorInvocationOutput = ( + output: any, + context: __SerdeContext +): AgentCollaboratorInvocationOutput => { + return take(output, { + agentCollaboratorAliasArn: __expectString, + agentCollaboratorName: __expectString, + output: _json, + }) as any; +}; + +// de_AgentCollaboratorOutputPayload omitted. + // de_AnalyzePromptEvent omitted. // de_ApiContentMap omitted. @@ -2047,6 +2085,8 @@ const se_Document = (input: __DocumentType, context: __SerdeContext): any => { // de_ApiRequestBody omitted. +// de_ApiResult omitted. + /** * deserializeAws_restJson1Attribution */ @@ -2056,6 +2096,10 @@ const de_Attribution = (output: any, context: __SerdeContext): Attribution => { }) as any; }; +// de_Caller omitted. + +// de_CallerChain omitted. + /** * deserializeAws_restJson1Citation */ @@ -2091,6 +2135,8 @@ const de_Citations = (output: any, context: __SerdeContext): Citation[] => { // de_CodeInterpreterInvocationOutput omitted. +// de_ContentBody omitted. + // de_ContentMap omitted. // de_CustomOrchestrationTrace omitted. @@ -2282,6 +2328,8 @@ const de_FlowTraceNodeOutputFields = (output: any, context: __SerdeContext): Flo // de_FunctionParameters omitted. +// de_FunctionResult omitted. + // de_GeneratedResponsePart omitted. // de_GuardrailAssessment omitted. @@ -2374,6 +2422,8 @@ const de_InlineAgentTracePart = (output: any, context: __SerdeContext): InlineAg // de_InvocationInputs omitted. +// de_InvocationResultMember omitted. + // de_KnowledgeBaseLookupInput omitted. /** @@ -2453,6 +2503,7 @@ const de_MemorySessionSummary = (output: any, context: __SerdeContext): MemorySe */ const de_ModelInvocationInput = (output: any, context: __SerdeContext): ModelInvocationInput => { return take(output, { + foundationModel: __expectString, inferenceConfiguration: (_: any) => de_InferenceConfiguration(_, context), overrideLambda: __expectString, parserMode: __expectString, @@ -2469,6 +2520,7 @@ const de_ModelInvocationInput = (output: any, context: __SerdeContext): ModelInv const de_Observation = (output: any, context: __SerdeContext): Observation => { return take(output, { actionGroupInvocationOutput: _json, + agentCollaboratorInvocationOutput: (_: any) => de_AgentCollaboratorInvocationOutput(_, context), codeInterpreterInvocationOutput: _json, finalResponse: _json, knowledgeBaseLookupOutput: (_: any) => de_KnowledgeBaseLookupOutput(_, context), @@ -2643,6 +2695,8 @@ const de_RerankResultsList = (output: any, context: __SerdeContext): RerankResul // de_RerankTextDocument omitted. +// de_ResponseBody omitted. + // de_RetrievalResultConfluenceLocation omitted. // de_RetrievalResultContent omitted. @@ -2706,8 +2760,41 @@ const de_RetrievedReferences = (output: any, context: __SerdeContext): Retrieved return retVal; }; +// de_ReturnControlInvocationResults omitted. + // de_ReturnControlPayload omitted. +// de_ReturnControlResults omitted. + +// de_RoutingClassifierModelInvocationOutput omitted. + +/** + * deserializeAws_restJson1RoutingClassifierTrace + */ +const de_RoutingClassifierTrace = (output: any, context: __SerdeContext): RoutingClassifierTrace => { + if (output.invocationInput != null) { + return { + invocationInput: _json(output.invocationInput), + }; + } + if (output.modelInvocationInput != null) { + return { + modelInvocationInput: de_ModelInvocationInput(output.modelInvocationInput, context), + }; + } + if (output.modelInvocationOutput != null) { + return { + modelInvocationOutput: _json(output.modelInvocationOutput), + }; + } + if (output.observation != null) { + return { + observation: de_Observation(output.observation, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + // de_Span omitted. // de_StopSequences omitted. @@ -2750,6 +2837,11 @@ const de_Trace = (output: any, context: __SerdeContext): Trace => { preProcessingTrace: de_PreProcessingTrace(__expectUnion(output.preProcessingTrace), context), }; } + if (output.routingClassifierTrace != null) { + return { + routingClassifierTrace: de_RoutingClassifierTrace(__expectUnion(output.routingClassifierTrace), context), + }; + } return { $unknown: Object.entries(output)[0] }; }; @@ -2761,6 +2853,8 @@ const de_TracePart = (output: any, context: __SerdeContext): TracePart => { agentAliasId: __expectString, agentId: __expectString, agentVersion: __expectString, + callerChain: _json, + collaboratorName: __expectString, sessionId: __expectString, trace: (_: any) => de_Trace(__expectUnion(_), context), }) as any; @@ -2792,8 +2886,10 @@ const _mI = "memoryId"; const _mIa = "maxItems"; const _mT = "memoryType"; const _nT = "nextToken"; +const _sA = "sourceArn"; const _sI = "sessionId"; const _xabact = "x-amzn-bedrock-agent-content-type"; const _xabami = "x-amz-bedrock-agent-memory-id"; const _xabasi = "x-amz-bedrock-agent-session-id"; const _xabkbsi = "x-amzn-bedrock-knowledge-base-session-id"; +const _xasa = "x-amz-source-arn"; diff --git a/codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json b/codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json index cc764ca05d51..1bc5b47aa40d 100644 --- a/codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json +++ b/codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json @@ -21,6 +21,15 @@ "smithy.api#documentation": "

\n Contains details about the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas.\n You can either include the schema directly in the payload field or you can upload it to an S3 bucket and specify the S3 bucket location in the s3 field.\n

" } }, + "com.amazonaws.bedrockagentruntime#AWSResourceARN": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:agent/[0-9a-zA-Z]{10}$" + } + }, "com.amazonaws.bedrockagentruntime#AccessDeniedException": { "type": "structure", "members": { @@ -248,6 +257,15 @@ "target": "com.amazonaws.bedrockagentruntime#AgentActionGroup" } }, + "com.amazonaws.bedrockagentruntime#AgentAliasArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:agent-alias/[0-9a-zA-Z]{10}/[0-9a-zA-Z]{10}$" + } + }, "com.amazonaws.bedrockagentruntime#AgentAliasId": { "type": "string", "traits": { @@ -257,6 +275,116 @@ "smithy.api#pattern": "^[0-9a-zA-Z]+$" } }, + "com.amazonaws.bedrockagentruntime#AgentCollaboratorInputPayload": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.bedrockagentruntime#PayloadType", + "traits": { + "smithy.api#documentation": "

The input type.

" + } + }, + "text": { + "target": "com.amazonaws.bedrockagentruntime#AgentCollaboratorPayloadString", + "traits": { + "smithy.api#documentation": "

Input text.

" + } + }, + "returnControlResults": { + "target": "com.amazonaws.bedrockagentruntime#ReturnControlResults", + "traits": { + "smithy.api#documentation": "

An action invocation result.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Input for an agent collaborator. The input can be text or an action invocation result.

" + } + }, + "com.amazonaws.bedrockagentruntime#AgentCollaboratorInvocationInput": { + "type": "structure", + "members": { + "agentCollaboratorName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The collaborator's name.

" + } + }, + "agentCollaboratorAliasArn": { + "target": "com.amazonaws.bedrockagentruntime#AgentAliasArn", + "traits": { + "smithy.api#documentation": "

The collaborator's alias ARN.

" + } + }, + "input": { + "target": "com.amazonaws.bedrockagentruntime#AgentCollaboratorInputPayload", + "traits": { + "smithy.api#documentation": "

Text or action invocation result input for the collaborator.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An agent collaborator invocation input.

" + } + }, + "com.amazonaws.bedrockagentruntime#AgentCollaboratorInvocationOutput": { + "type": "structure", + "members": { + "agentCollaboratorName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The output's agent collaborator name.

" + } + }, + "agentCollaboratorAliasArn": { + "target": "com.amazonaws.bedrockagentruntime#AgentAliasArn", + "traits": { + "smithy.api#documentation": "

The output's agent collaborator alias ARN.

" + } + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#AgentCollaboratorOutputPayload", + "traits": { + "smithy.api#documentation": "

The output's output.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Output from an agent collaborator.

" + } + }, + "com.amazonaws.bedrockagentruntime#AgentCollaboratorOutputPayload": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.bedrockagentruntime#PayloadType", + "traits": { + "smithy.api#documentation": "

The type of output.

" + } + }, + "text": { + "target": "com.amazonaws.bedrockagentruntime#AgentCollaboratorPayloadString", + "traits": { + "smithy.api#documentation": "

Text output.

" + } + }, + "returnControlPayload": { + "target": "com.amazonaws.bedrockagentruntime#ReturnControlPayload", + "traits": { + "smithy.api#documentation": "

An action invocation result.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Output from an agent collaborator. The output can be text or an action invocation result.

" + } + }, + "com.amazonaws.bedrockagentruntime#AgentCollaboratorPayloadString": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, "com.amazonaws.bedrockagentruntime#AgentId": { "type": "string", "traits": { @@ -1050,6 +1178,18 @@ "traits": { "smithy.api#documentation": "

Contains information about the API operation to invoke.

" } + }, + "agentId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The agent's ID.

" + } + }, + "collaboratorName": { + "target": "com.amazonaws.bedrockagentruntime#Name", + "traits": { + "smithy.api#documentation": "

The agent collaborator's name.

" + } } }, "traits": { @@ -1153,6 +1293,12 @@ "traits": { "smithy.api#documentation": "

Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt

" } + }, + "agentId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The agent's ID.

" + } } }, "traits": { @@ -1358,6 +1504,26 @@ "smithy.api#documentation": "

The property contains the file to chat with, along with its attributes.

" } }, + "com.amazonaws.bedrockagentruntime#Caller": { + "type": "union", + "members": { + "agentAliasArn": { + "target": "com.amazonaws.bedrockagentruntime#AgentAliasArn", + "traits": { + "smithy.api#documentation": "

The caller's agent alias ARN.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about a caller.

" + } + }, + "com.amazonaws.bedrockagentruntime#CallerChain": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrockagentruntime#Caller" + } + }, "com.amazonaws.bedrockagentruntime#Citation": { "type": "structure", "members": { @@ -1480,6 +1646,27 @@ "smithy.api#httpError": 409 } }, + "com.amazonaws.bedrockagentruntime#ContentBlock": { + "type": "union", + "members": { + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The block's text.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A content block.

", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.bedrockagentruntime#ContentBlocks": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrockagentruntime#ContentBlock" + } + }, "com.amazonaws.bedrockagentruntime#ContentBody": { "type": "structure", "members": { @@ -1509,6 +1696,37 @@ "smithy.api#pattern": "[a-z]{1,20}/.{1,20}" } }, + "com.amazonaws.bedrockagentruntime#ConversationHistory": { + "type": "structure", + "members": { + "messages": { + "target": "com.amazonaws.bedrockagentruntime#Messages", + "traits": { + "smithy.api#documentation": "

The conversation's messages.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A conversation history.

" + } + }, + "com.amazonaws.bedrockagentruntime#ConversationRole": { + "type": "enum", + "members": { + "USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "user" + } + }, + "ASSISTANT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "assistant" + } + } + } + }, "com.amazonaws.bedrockagentruntime#CreationMode": { "type": "enum", "members": { @@ -2588,6 +2806,18 @@ "traits": { "smithy.api#documentation": "

Contains information about the function to invoke,

" } + }, + "agentId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The agent's ID.

" + } + }, + "collaboratorName": { + "target": "com.amazonaws.bedrockagentruntime#Name", + "traits": { + "smithy.api#documentation": "

The collaborator's name.

" + } } }, "traits": { @@ -2659,6 +2889,12 @@ "traits": { "smithy.api#documentation": "

Controls the final response state returned to end user when API/Function execution failed. When this state is FAILURE, the request would fail with dependency failure exception. When this state is REPROMPT, the API/function response will be sent to model for re-prompt

" } + }, + "agentId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The agent's ID.

" + } } }, "traits": { @@ -4085,6 +4321,12 @@ "traits": { "smithy.api#documentation": "

Contains information about the code interpreter to be invoked.

" } + }, + "agentCollaboratorInvocationInput": { + "target": "com.amazonaws.bedrockagentruntime#AgentCollaboratorInvocationInput", + "traits": { + "smithy.api#documentation": "

The collaborator's invocation input.

" + } } }, "traits": { @@ -4170,6 +4412,12 @@ "traits": { "smithy.api#enumValue": "ACTION_GROUP_CODE_INTERPRETER" } + }, + "AGENT_COLLABORATOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AGENT_COLLABORATOR" + } } } }, @@ -4281,6 +4529,13 @@ "traits": { "smithy.api#documentation": "

\n Specifies the configurations for streaming.\n

" } + }, + "sourceArn": { + "target": "com.amazonaws.bedrockagentruntime#AWSResourceARN", + "traits": { + "smithy.api#documentation": "

The ARN of the resource making the request.

", + "smithy.api#httpHeader": "x-amz-source-arn" + } } }, "traits": { @@ -5009,6 +5264,34 @@ } } }, + "com.amazonaws.bedrockagentruntime#Message": { + "type": "structure", + "members": { + "role": { + "target": "com.amazonaws.bedrockagentruntime#ConversationRole", + "traits": { + "smithy.api#documentation": "

The message's role.

", + "smithy.api#required": {} + } + }, + "content": { + "target": "com.amazonaws.bedrockagentruntime#ContentBlocks", + "traits": { + "smithy.api#documentation": "

The message's content.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about a message.

" + } + }, + "com.amazonaws.bedrockagentruntime#Messages": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrockagentruntime#Message" + } + }, "com.amazonaws.bedrockagentruntime#Metadata": { "type": "structure", "members": { @@ -5154,6 +5437,12 @@ "traits": { "smithy.api#documentation": "

Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the promptType.

" } + }, + "foundationModel": { + "target": "com.amazonaws.bedrockagentruntime#ModelIdentifier", + "traits": { + "smithy.api#documentation": "

The identifier of a foundation model.

" + } } }, "traits": { @@ -5161,6 +5450,13 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.bedrockagentruntime#Name": { + "type": "string", + "traits": { + "smithy.api#pattern": "^([0-9a-zA-Z][_-]?){1,100}$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.bedrockagentruntime#NextToken": { "type": "string", "traits": { @@ -5263,6 +5559,12 @@ "smithy.api#documentation": "

Contains the JSON-formatted string returned by the API invoked by the action group.

" } }, + "agentCollaboratorInvocationOutput": { + "target": "com.amazonaws.bedrockagentruntime#AgentCollaboratorInvocationOutput", + "traits": { + "smithy.api#documentation": "

A collaborator's invocation output.

" + } + }, "knowledgeBaseLookupOutput": { "target": "com.amazonaws.bedrockagentruntime#KnowledgeBaseLookupOutput", "traits": { @@ -5770,6 +6072,23 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.bedrockagentruntime#PayloadType": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEXT" + } + }, + "RETURN_CONTROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETURN_CONTROL" + } + } + } + }, "com.amazonaws.bedrockagentruntime#PostProcessingModelInvocationOutput": { "type": "structure", "members": { @@ -7683,6 +8002,86 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.bedrockagentruntime#ReturnControlResults": { + "type": "structure", + "members": { + "invocationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The action's invocation ID.

" + } + }, + "returnControlInvocationResults": { + "target": "com.amazonaws.bedrockagentruntime#ReturnControlInvocationResults", + "traits": { + "smithy.api#documentation": "

The action invocation result.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An action invocation result.

" + } + }, + "com.amazonaws.bedrockagentruntime#RoutingClassifierModelInvocationOutput": { + "type": "structure", + "members": { + "traceId": { + "target": "com.amazonaws.bedrockagentruntime#TraceId", + "traits": { + "smithy.api#documentation": "

The invocation's trace ID.

" + } + }, + "rawResponse": { + "target": "com.amazonaws.bedrockagentruntime#RawResponse", + "traits": { + "smithy.api#documentation": "

The invocation's raw response.

" + } + }, + "metadata": { + "target": "com.amazonaws.bedrockagentruntime#Metadata", + "traits": { + "smithy.api#documentation": "

The invocation's metadata.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Invocation output from a routing classifier model.

", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.bedrockagentruntime#RoutingClassifierTrace": { + "type": "union", + "members": { + "invocationInput": { + "target": "com.amazonaws.bedrockagentruntime#InvocationInput", + "traits": { + "smithy.api#documentation": "

The classifier's invocation input.

" + } + }, + "observation": { + "target": "com.amazonaws.bedrockagentruntime#Observation", + "traits": { + "smithy.api#documentation": "

The classifier's observation.

" + } + }, + "modelInvocationInput": { + "target": "com.amazonaws.bedrockagentruntime#ModelInvocationInput", + "traits": { + "smithy.api#documentation": "

The classifier's model invocation input.

" + } + }, + "modelInvocationOutput": { + "target": "com.amazonaws.bedrockagentruntime#RoutingClassifierModelInvocationOutput", + "traits": { + "smithy.api#documentation": "

The classifier's model invocation output.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A trace for a routing classifier.

", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.bedrockagentruntime#S3BucketName": { "type": "string", "traits": { @@ -7850,6 +8249,12 @@ "traits": { "smithy.api#documentation": "

An array of configurations, each of which applies to a knowledge base attached to the agent.

" } + }, + "conversationHistory": { + "target": "com.amazonaws.bedrockagentruntime#ConversationHistory", + "traits": { + "smithy.api#documentation": "

The state's conversation history.

" + } } }, "traits": { @@ -8112,6 +8517,12 @@ "smithy.api#documentation": "

Details about the post-processing step, in which the agent shapes the response..

" } }, + "routingClassifierTrace": { + "target": "com.amazonaws.bedrockagentruntime#RoutingClassifierTrace", + "traits": { + "smithy.api#documentation": "

A routing classifier's trace.

" + } + }, "failureTrace": { "target": "com.amazonaws.bedrockagentruntime#FailureTrace", "traits": { @@ -8177,6 +8588,18 @@ "traits": { "smithy.api#documentation": "

The version of the agent.

" } + }, + "callerChain": { + "target": "com.amazonaws.bedrockagentruntime#CallerChain", + "traits": { + "smithy.api#documentation": "

The part's caller chain.

" + } + }, + "collaboratorName": { + "target": "com.amazonaws.bedrockagentruntime#Name", + "traits": { + "smithy.api#documentation": "

The part's collaborator name.

" + } } }, "traits": { @@ -8193,6 +8616,12 @@ "smithy.api#enumValue": "ACTION_GROUP" } }, + "AGENT_COLLABORATOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AGENT_COLLABORATOR" + } + }, "KNOWLEDGE_BASE": { "target": "smithy.api#Unit", "traits": {