UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

966 lines 421 kB
import * as cdk from "../../core"; import * as constructs from "constructs"; import * as cfn_parse from "../../core/lib/helpers-internal"; /** * Specifies an agent as a resource in a top-level template. Minimally, you must specify the following properties:. * * - AgentName – Specify a name for the agent. * - AgentResourceRoleArn – Specify the Amazon Resource Name (ARN) of the service role with permissions to invoke API operations on the agent. For more information, see [Create a service role for Agents for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-permissions.html) . * - FoundationModel – Specify the model ID of a foundation model to use when invoking the agent. For more information, see [Supported regions and models for Agents for Amazon Bedrock](https://docs.aws.amazon.com//bedrock/latest/userguide/agents-supported.html) . * * For more information about using agents in Amazon Bedrock , see [Agents for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/agents.html) . * * See the *Properties* section below for descriptions of both the required and optional properties. * * @cloudformationResource AWS::Bedrock::Agent * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html */ export declare class CfnAgent extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggableV2 { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnAgent from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnAgent; /** * The Amazon Resource Name (ARN) of the agent. * * @cloudformationAttribute AgentArn */ readonly attrAgentArn: string; /** * The unique identifier of the agent. * * @cloudformationAttribute AgentId */ readonly attrAgentId: string; /** * The status of the agent and whether it is ready for use. The following statuses are possible: * * - CREATING – The agent is being created. * - PREPARING – The agent is being prepared. * - PREPARED – The agent is prepared and ready to be invoked. * - NOT_PREPARED – The agent has been created but not yet prepared. * - FAILED – The agent API operation failed. * - UPDATING – The agent is being updated. * - DELETING – The agent is being deleted. * * @cloudformationAttribute AgentStatus */ readonly attrAgentStatus: string; /** * The version of the agent. * * @cloudformationAttribute AgentVersion */ readonly attrAgentVersion: string; /** * The time at which the agent was created. * * @cloudformationAttribute CreatedAt */ readonly attrCreatedAt: string; /** * Contains reasons that the agent-related API that you invoked failed. * * @cloudformationAttribute FailureReasons */ readonly attrFailureReasons: Array<string>; /** * The time at which the agent was last prepared. * * @cloudformationAttribute PreparedAt */ readonly attrPreparedAt: string; /** * Contains recommended actions to take for the agent-related API that you invoked to succeed. * * @cloudformationAttribute RecommendedActions */ readonly attrRecommendedActions: Array<string>; /** * The time at which the agent was last updated. * * @cloudformationAttribute UpdatedAt */ readonly attrUpdatedAt: string; /** * The action groups that belong to an agent. */ actionGroups?: Array<CfnAgent.AgentActionGroupProperty | cdk.IResolvable> | cdk.IResolvable; /** * The agent's collaboration settings. */ agentCollaboration?: string; /** * List of Agent Collaborators. */ agentCollaborators?: Array<CfnAgent.AgentCollaboratorProperty | cdk.IResolvable> | cdk.IResolvable; /** * The name of the agent. */ agentName: string; /** * The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. */ agentResourceRoleArn?: string; /** * Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent. */ autoPrepare?: boolean | cdk.IResolvable; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * The Amazon Resource Name (ARN) of the AWS KMS key that encrypts the agent. */ customerEncryptionKeyArn?: string; /** * Contains custom orchestration configurations for the agent. */ customOrchestration?: CfnAgent.CustomOrchestrationProperty | cdk.IResolvable; /** * The description of the agent. */ description?: string; /** * The foundation model used for orchestration by the agent. */ foundationModel?: string; /** * Details about the guardrail associated with the agent. */ guardrailConfiguration?: CfnAgent.GuardrailConfigurationProperty | cdk.IResolvable; /** * The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. */ idleSessionTtlInSeconds?: number; /** * Instructions that tell the agent what it should do and how it should interact with users. */ instruction?: string; /** * The knowledge bases associated with the agent. */ knowledgeBases?: Array<CfnAgent.AgentKnowledgeBaseProperty | cdk.IResolvable> | cdk.IResolvable; /** * Contains memory configuration for the agent. */ memoryConfiguration?: cdk.IResolvable | CfnAgent.MemoryConfigurationProperty; /** * Specifies the orchestration strategy for the agent. */ orchestrationType?: string; /** * Contains configurations to override prompt templates in different parts of an agent sequence. */ promptOverrideConfiguration?: cdk.IResolvable | CfnAgent.PromptOverrideConfigurationProperty; /** * Specifies whether to delete the resource even if it's in use. */ skipResourceInUseCheckOnDelete?: boolean | cdk.IResolvable; /** * Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. */ tags?: Record<string, string>; /** * Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. */ testAliasTags?: cdk.IResolvable | Record<string, string>; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnAgentProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnAgent { /** * Contains details of the inline agent's action group. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html */ interface AgentActionGroupProperty { /** * The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-actiongroupexecutor */ readonly actionGroupExecutor?: CfnAgent.ActionGroupExecutorProperty | cdk.IResolvable; /** * The name of the action group. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-actiongroupname */ readonly actionGroupName: string; /** * Specifies whether the action group is available for the agent to invoke or not when sending an [InvokeAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html) request. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-actiongroupstate */ readonly actionGroupState?: string; /** * Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema. * * For more information, see [Action group OpenAPI schemas](https://docs.aws.amazon.com//bedrock/latest/userguide/agents-api-schema.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-apischema */ readonly apiSchema?: CfnAgent.APISchemaProperty | cdk.IResolvable; /** * A description of the action group. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-description */ readonly description?: string; /** * Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-functionschema */ readonly functionSchema?: CfnAgent.FunctionSchemaProperty | cdk.IResolvable; /** * If this field is set as `AMAZON.UserInput` , the agent can request the user for additional information when trying to complete a task. The `description` , `apiSchema` , and `actionGroupExecutor` fields must be blank for this action group. * * During orchestration, if the agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an [Observation](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html) reprompting the user for more information. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-parentactiongroupsignature */ readonly parentActionGroupSignature?: string; /** * Specifies whether to delete the resource even if it's in use. * * By default, this value is `false` . * * @default - false * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-skipresourceinusecheckondelete */ readonly skipResourceInUseCheckOnDelete?: boolean | cdk.IResolvable; } /** * Contains details about the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-actiongroupexecutor.html */ interface ActionGroupExecutorProperty { /** * To return the action group invocation results directly in the `InvokeInlineAgent` response, specify `RETURN_CONTROL` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-actiongroupexecutor.html#cfn-bedrock-agent-actiongroupexecutor-customcontrol */ readonly customControl?: string; /** * The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-actiongroupexecutor.html#cfn-bedrock-agent-actiongroupexecutor-lambda */ readonly lambda?: string; } /** * Contains details about the OpenAPI schema for the action group. * * For more information, see [Action group OpenAPI schemas](https://docs.aws.amazon.com//bedrock/latest/userguide/agents-api-schema.html) . 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. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-apischema.html */ interface APISchemaProperty { /** * The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-apischema.html#cfn-bedrock-agent-apischema-payload */ readonly payload?: string; /** * Contains details about the S3 object containing the OpenAPI schema for the action group. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-apischema.html#cfn-bedrock-agent-apischema-s3 */ readonly s3?: cdk.IResolvable | CfnAgent.S3IdentifierProperty; } /** * The identifier information for an Amazon S3 bucket. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-s3identifier.html */ interface S3IdentifierProperty { /** * The name of the S3 bucket. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-s3identifier.html#cfn-bedrock-agent-s3identifier-s3bucketname */ readonly s3BucketName?: string; /** * The S3 object key for the S3 resource. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-s3identifier.html#cfn-bedrock-agent-s3identifier-s3objectkey */ readonly s3ObjectKey?: string; } /** * Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-functionschema.html */ interface FunctionSchemaProperty { /** * A list of functions that each define an action in the action group. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-functionschema.html#cfn-bedrock-agent-functionschema-functions */ readonly functions: Array<CfnAgent.FunctionProperty | cdk.IResolvable> | cdk.IResolvable; } /** * Defines parameters that the agent needs to invoke from the user to complete the function. * * Corresponds to an action in an action group. * * This data type is used in the following API operations: * * - [CreateAgentActionGroup request](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html#API_agent_CreateAgentActionGroup_RequestSyntax) * - [CreateAgentActionGroup response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html#API_agent_CreateAgentActionGroup_ResponseSyntax) * - [UpdateAgentActionGroup request](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html#API_agent_UpdateAgentActionGroup_RequestSyntax) * - [UpdateAgentActionGroup response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html#API_agent_UpdateAgentActionGroup_ResponseSyntax) * - [GetAgentActionGroup response](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetAgentActionGroup.html#API_agent_GetAgentActionGroup_ResponseSyntax) * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-function.html */ interface FunctionProperty { /** * A description of the function and its purpose. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-function.html#cfn-bedrock-agent-function-description */ readonly description?: string; /** * A name for the function. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-function.html#cfn-bedrock-agent-function-name */ readonly name: string; /** * The parameters that the agent elicits from the user to fulfill the function. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-function.html#cfn-bedrock-agent-function-parameters */ readonly parameters?: cdk.IResolvable | Record<string, cdk.IResolvable | CfnAgent.ParameterDetailProperty>; /** * Contains information if user confirmation is required to invoke the function. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-function.html#cfn-bedrock-agent-function-requireconfirmation */ readonly requireConfirmation?: string; } /** * Contains details about a parameter in a function for an action group. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-parameterdetail.html */ interface ParameterDetailProperty { /** * A description of the parameter. * * Helps the foundation model determine how to elicit the parameters from the user. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-parameterdetail.html#cfn-bedrock-agent-parameterdetail-description */ readonly description?: string; /** * Whether the parameter is required for the agent to complete the function for action group invocation. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-parameterdetail.html#cfn-bedrock-agent-parameterdetail-required */ readonly required?: boolean | cdk.IResolvable; /** * The data type of the parameter. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-parameterdetail.html#cfn-bedrock-agent-parameterdetail-type */ readonly type: string; } /** * Details of custom orchestration. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-customorchestration.html */ interface CustomOrchestrationProperty { /** * The structure of the executor invoking the actions in custom orchestration. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-customorchestration.html#cfn-bedrock-agent-customorchestration-executor */ readonly executor?: cdk.IResolvable | CfnAgent.OrchestrationExecutorProperty; } /** * Contains details about the Lambda function containing the orchestration logic carried out upon invoking the custom orchestration. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-orchestrationexecutor.html */ interface OrchestrationExecutorProperty { /** * The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-orchestrationexecutor.html#cfn-bedrock-agent-orchestrationexecutor-lambda */ readonly lambda: string; } /** * Configuration information for a guardrail that you use with the [Converse](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) operation. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-guardrailconfiguration.html */ interface GuardrailConfigurationProperty { /** * The identifier for the guardrail. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-guardrailconfiguration.html#cfn-bedrock-agent-guardrailconfiguration-guardrailidentifier */ readonly guardrailIdentifier?: string; /** * The version of the guardrail. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-guardrailconfiguration.html#cfn-bedrock-agent-guardrailconfiguration-guardrailversion */ readonly guardrailVersion?: string; } /** * Details of the memory configuration. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-memoryconfiguration.html */ interface MemoryConfigurationProperty { /** * The type of memory that is stored. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-memoryconfiguration.html#cfn-bedrock-agent-memoryconfiguration-enabledmemorytypes */ readonly enabledMemoryTypes?: Array<string>; /** * Contains the configuration for SESSION_SUMMARY memory type enabled for the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-memoryconfiguration.html#cfn-bedrock-agent-memoryconfiguration-sessionsummaryconfiguration */ readonly sessionSummaryConfiguration?: cdk.IResolvable | CfnAgent.SessionSummaryConfigurationProperty; /** * The number of days the agent is configured to retain the conversational context. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-memoryconfiguration.html#cfn-bedrock-agent-memoryconfiguration-storagedays */ readonly storageDays?: number; } /** * Configuration for SESSION_SUMMARY memory type enabled for the agent. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-sessionsummaryconfiguration.html */ interface SessionSummaryConfigurationProperty { /** * Maximum number of recent session summaries to include in the agent's prompt context. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-sessionsummaryconfiguration.html#cfn-bedrock-agent-sessionsummaryconfiguration-maxrecentsessions */ readonly maxRecentSessions?: number; } /** * Contains details about a knowledge base that is associated with an agent. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentknowledgebase.html */ interface AgentKnowledgeBaseProperty { /** * The description of the association between the agent and the knowledge base. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentknowledgebase.html#cfn-bedrock-agent-agentknowledgebase-description */ readonly description: string; /** * The unique identifier of the association between the agent and the knowledge base. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentknowledgebase.html#cfn-bedrock-agent-agentknowledgebase-knowledgebaseid */ readonly knowledgeBaseId: string; /** * Specifies whether to use the knowledge base or not when sending an [InvokeAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html) request. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentknowledgebase.html#cfn-bedrock-agent-agentknowledgebase-knowledgebasestate */ readonly knowledgeBaseState?: string; } /** * An agent collaborator. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentcollaborator.html */ interface AgentCollaboratorProperty { /** * The collaborator's agent descriptor. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentcollaborator.html#cfn-bedrock-agent-agentcollaborator-agentdescriptor */ readonly agentDescriptor: CfnAgent.AgentDescriptorProperty | cdk.IResolvable; /** * The collaborator's instructions. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentcollaborator.html#cfn-bedrock-agent-agentcollaborator-collaborationinstruction */ readonly collaborationInstruction: string; /** * The collaborator's collaborator name. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentcollaborator.html#cfn-bedrock-agent-agentcollaborator-collaboratorname */ readonly collaboratorName: string; /** * The collaborator's relay conversation history. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentcollaborator.html#cfn-bedrock-agent-agentcollaborator-relayconversationhistory */ readonly relayConversationHistory?: string; } /** * An agent descriptor. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentdescriptor.html */ interface AgentDescriptorProperty { /** * The agent's alias ARN. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentdescriptor.html#cfn-bedrock-agent-agentdescriptor-aliasarn */ readonly aliasArn?: string; } /** * Contains configurations to override prompts in different parts of an agent sequence. * * For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptoverrideconfiguration.html */ interface PromptOverrideConfigurationProperty { /** * The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. * * If you specify this field, at least one of the `promptConfigurations` must contain a `parserMode` value that is set to `OVERRIDDEN` . For more information, see [Parser Lambda function in Amazon Bedrock Agents](https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptoverrideconfiguration.html#cfn-bedrock-agent-promptoverrideconfiguration-overridelambda */ readonly overrideLambda?: string; /** * Contains configurations to override a prompt template in one part of an agent sequence. * * For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptoverrideconfiguration.html#cfn-bedrock-agent-promptoverrideconfiguration-promptconfigurations */ readonly promptConfigurations: Array<cdk.IResolvable | CfnAgent.PromptConfigurationProperty> | cdk.IResolvable; } /** * Contains configurations to override a prompt template in one part of an agent sequence. * * For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html */ interface PromptConfigurationProperty { /** * If the Converse or ConverseStream operations support the model, `additionalModelRequestFields` contains additional inference parameters, beyond the base set of inference parameters in the `inferenceConfiguration` field. * * For more information, see [Inference request parameters and response fields for foundation models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-additionalmodelrequestfields */ readonly additionalModelRequestFields?: any | cdk.IResolvable; /** * Defines the prompt template with which to replace the default prompt template. * * You can use placeholder variables in the base prompt template to customize the prompt. For more information, see [Prompt template placeholder variables](https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html) . For more information, see [Configure the prompt templates](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts-configure.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-baseprompttemplate */ readonly basePromptTemplate?: string; /** * The agent's foundation model. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-foundationmodel */ readonly foundationModel?: string; /** * Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the `promptType` . * * For more information, see [Inference parameters for foundation models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-inferenceconfiguration */ readonly inferenceConfiguration?: CfnAgent.InferenceConfigurationProperty | cdk.IResolvable; /** * 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` . * * If you set the field as `OVERRIDDEN` , the `overrideLambda` field in the [PromptOverrideConfiguration](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html) must be specified with the ARN of a Lambda function. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-parsermode */ readonly parserMode?: string; /** * Specifies whether to override the default prompt template for this `promptType` . * * Set this value to `OVERRIDDEN` to use the prompt that you provide in the `basePromptTemplate` . If you leave it as `DEFAULT` , the agent uses a default prompt template. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-promptcreationmode */ readonly promptCreationMode?: string; /** * Specifies whether to allow the inline agent to carry out the step specified in the `promptType` . * * If you set this value to `DISABLED` , the agent skips that step. The default state for each `promptType` is as follows. * * - `PRE_PROCESSING` – `ENABLED` * - `ORCHESTRATION` – `ENABLED` * - `KNOWLEDGE_BASE_RESPONSE_GENERATION` – `ENABLED` * - `POST_PROCESSING` – `DISABLED` * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-promptstate */ readonly promptState?: string; /** * The step in the agent sequence that this prompt configuration applies to. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-prompttype */ readonly promptType?: string; } /** * Base inference parameters to pass to a model in a call to [Converse](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or [ConverseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) . For more information, see [Inference parameters for foundation models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html) . * * If you need to pass additional parameters that the model supports, use the `additionalModelRequestFields` request field in the call to `Converse` or `ConverseStream` . For more information, see [Model parameters](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html) . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html */ interface InferenceConfigurationProperty { /** * The maximum number of tokens allowed in the generated response. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-maximumlength */ readonly maximumLength?: number; /** * A list of stop sequences. * * A stop sequence is a sequence of characters that causes the model to stop generating the response. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-stopsequences */ readonly stopSequences?: Array<string>; /** * The likelihood of the model selecting higher-probability options while generating a response. * * A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options. * * The default value is the default value for the model that you are using. For more information, see [Inference parameters for foundation models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-temperature */ readonly temperature?: number; /** * While generating a response, the model determines the probability of the following token at each point of generation. * * The value that you set for `topK` is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set `topK` to 50, the model selects the next token from among the top 50 most likely choices. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-topk */ readonly topK?: number; /** * The percentage of most-likely candidates that the model considers for the next token. * * For example, if you choose a value of 0.8 for `topP` , the model selects from the top 80% of the probability distribution of tokens that could be next in the sequence. * * The default value is the default value for the model that you are using. For more information, see [Inference parameters for foundation models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-topp */ readonly topP?: number; } } /** * Properties for defining a `CfnAgent` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html */ export interface CfnAgentProps { /** * The action groups that belong to an agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-actiongroups */ readonly actionGroups?: Array<CfnAgent.AgentActionGroupProperty | cdk.IResolvable> | cdk.IResolvable; /** * The agent's collaboration settings. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-agentcollaboration */ readonly agentCollaboration?: string; /** * List of Agent Collaborators. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-agentcollaborators */ readonly agentCollaborators?: Array<CfnAgent.AgentCollaboratorProperty | cdk.IResolvable> | cdk.IResolvable; /** * The name of the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-agentname */ readonly agentName: string; /** * The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-agentresourcerolearn */ readonly agentResourceRoleArn?: string; /** * Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent. * * The `DRAFT` version can be continually iterated upon during internal development. By default, this value is `false` . * * @default - false * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-autoprepare */ readonly autoPrepare?: boolean | cdk.IResolvable; /** * The Amazon Resource Name (ARN) of the AWS KMS key that encrypts the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-customerencryptionkeyarn */ readonly customerEncryptionKeyArn?: string; /** * Contains custom orchestration configurations for the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-customorchestration */ readonly customOrchestration?: CfnAgent.CustomOrchestrationProperty | cdk.IResolvable; /** * The description of the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-description */ readonly description?: string; /** * The foundation model used for orchestration by the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-foundationmodel */ readonly foundationModel?: string; /** * Details about the guardrail associated with the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-guardrailconfiguration */ readonly guardrailConfiguration?: CfnAgent.GuardrailConfigurationProperty | cdk.IResolvable; /** * The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. * * A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-idlesessionttlinseconds */ readonly idleSessionTtlInSeconds?: number; /** * Instructions that tell the agent what it should do and how it should interact with users. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-instruction */ readonly instruction?: string; /** * The knowledge bases associated with the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-knowledgebases */ readonly knowledgeBases?: Array<CfnAgent.AgentKnowledgeBaseProperty | cdk.IResolvable> | cdk.IResolvable; /** * Contains memory configuration for the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-memoryconfiguration */ readonly memoryConfiguration?: cdk.IResolvable | CfnAgent.MemoryConfigurationProperty; /** * Specifies the orchestration strategy for the agent. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-orchestrationtype */ readonly orchestrationType?: string; /** * Contains configurations to override prompt templates in different parts of an agent sequence. * * For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-promptoverrideconfiguration */ readonly promptOverrideConfiguration?: cdk.IResolvable | CfnAgent.PromptOverrideConfigurationProperty; /** * Specifies whether to delete the resource even if it's in use. * * By default, this value is `false` . * * @default - false * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-skipresourceinusecheckondelete */ readonly skipResourceInUseCheckOnDelete?: boolean | cdk.IResolvable; /** * Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. * * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions) * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices) * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-tags */ readonly tags?: Record<string, string>; /** * Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. * * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions) * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices) * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html#cfn-bedrock-agent-testaliastags */ readonly testAliasTags?: cdk.IResolvable | Record<string, string>; } /** * Specifies an agent alias as a resource in a top-level template. Minimally, you must specify the following properties:. * * - AgentAliasName – Specify a name for the alias. * * For more information about creating aliases for an agent in Amazon Bedrock , see [Deploy an Amazon Bedrock agent](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-deploy.html) . * * See the *Properties* section below for descriptions of both the required and optional properties. * * @cloudformationResource AWS::Bedrock::AgentAlias * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agentalias.html */ export declare class CfnAgentAlias extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggableV2 { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnAgentAlias from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnAgentAlias; /** * The Amazon Resource Name (ARN) of the alias of the agent. * * @cloudformationAttribute AgentAliasArn */ readonly attrAgentAliasArn: string; /** * Contains details about the history of the alias. * * @cloudformationAttribute AgentAliasHistoryEvents */ readonly attrAgentAliasHistoryEvents: cdk.IResolvable; /** * The unique identifier of the alias of the agent. * * @cloudformationAttribute AgentAliasId */ readonly attrAgentAliasId: string; /** * The status of the alias of the agent and whether it is ready for use. The following statuses are possible: * * - CREATING – The agent alias is being created. * - PREPARED – The agent alias is finished being created or updated and is ready to be invoked. * - FAILED – The agent alias API operation failed. * - UPDATING – The agent alias is being updated. * - DELETING – The agent alias is being deleted. * - DISSOCIATED - The agent alias has no version associated with it. * * @cloudformationAttribute AgentAliasStatus */ readonly attrAgentAliasStatus: string; /** * The time at which the alias of the agent was created. * * @cloudformationAttribute CreatedAt */ readonly attrCreatedAt: string; /** * The time at which the alias was last updated. * * @cloudformationAttribute UpdatedAt */ readonly attrUpdatedAt: string; /** * The name of the alias of the agent. */ agentAliasName: string; /** * The unique identifier of the agent. */ agentId: string; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * The description of the alias of