aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
976 lines • 625 kB
TypeScript
import * as cdk from "../../core/lib";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
import { AgentAliasReference, AgentReference, ApplicationInferenceProfileReference, AutomatedReasoningPolicyReference, AutomatedReasoningPolicyVersionReference, BlueprintReference, DataAutomationLibraryReference, DataAutomationProjectReference, DataSourceReference, EnforcedGuardrailConfigurationReference, FlowAliasReference, FlowReference, FlowVersionReference, GuardrailReference, GuardrailVersionReference, IAgentAliasRef, IAgentRef, IApplicationInferenceProfileRef, IAutomatedReasoningPolicyRef, IAutomatedReasoningPolicyVersionRef, IBlueprintRef, IDataAutomationLibraryRef, IDataAutomationProjectRef, IDataSourceRef, IEnforcedGuardrailConfigurationRef, IFlowAliasRef, IFlowRef, IFlowVersionRef, IGuardrailRef, IGuardrailVersionRef, IIntelligentPromptRouterRef, IKnowledgeBaseRef, IntelligentPromptRouterReference, IPromptRef, IPromptVersionRef, IResourcePolicyRef, KnowledgeBaseReference, PromptReference, PromptVersionReference, ResourcePolicyReference } from "../../interfaces/generated/aws-bedrock-interfaces.generated";
/**
* 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, IAgentRef, 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;
/**
* Checks whether the given object is a CfnAgent
*/
static isCfnAgent(x: any): x is CfnAgent;
/**
* Creates a new IAgentRef from an ARN
*/
static fromAgentArn(scope: constructs.Construct, id: string, arn: string): IAgentRef;
/**
* Creates a new IAgentRef from a agentId
*/
static fromAgentId(scope: constructs.Construct, id: string, agentId: string): IAgentRef;
static arnForAgent(resource: IAgentRef): string;
/**
* The action groups that belong to an agent.
*/
private _actionGroups?;
/**
* The agent's collaboration settings.
*/
private _agentCollaboration?;
/**
* List of Agent Collaborators.
*/
private _agentCollaborators?;
/**
* The name of the agent.
*/
private _agentName;
/**
* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
*/
private _agentResourceRoleArn?;
/**
* Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent.
*/
private _autoPrepare?;
/**
* Tag Manager which manages the tags for this resource
*/
readonly cdkTagManager: cdk.TagManager;
/**
* The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.
*/
private _customerEncryptionKeyArn?;
/**
* Contains custom orchestration configurations for the agent.
*/
private _customOrchestration?;
/**
* The description of the agent.
*/
private _description?;
/**
* The foundation model used for orchestration by the agent.
*/
private _foundationModel?;
/**
* Details about the guardrail associated with the agent.
*/
private _guardrailConfiguration?;
/**
* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
*/
private _idleSessionTtlInSeconds?;
/**
* Instructions that tell the agent what it should do and how it should interact with users.
*/
private _instruction?;
/**
* The knowledge bases associated with the agent.
*/
private _knowledgeBases?;
/**
* Contains memory configuration for the agent.
*/
private _memoryConfiguration?;
/**
* Specifies the orchestration strategy for the agent.
*/
private _orchestrationType?;
/**
* Contains configurations to override prompt templates in different parts of an agent sequence.
*/
private _promptOverrideConfiguration?;
/**
* Specifies whether to delete the resource even if it's in use.
*/
private _skipResourceInUseCheckOnDelete?;
/**
* Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
*/
private _tags?;
/**
* Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
*/
private _testAliasTags?;
/**
* Create a new `AWS::Bedrock::Agent`.
*
* @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);
get agentRef(): AgentReference;
/**
* The action groups that belong to an agent.
*/
get actionGroups(): Array<CfnAgent.AgentActionGroupProperty | cdk.IResolvable> | cdk.IResolvable | undefined;
/**
* The action groups that belong to an agent.
*/
set actionGroups(value: Array<CfnAgent.AgentActionGroupProperty | cdk.IResolvable> | cdk.IResolvable | undefined);
/**
* The agent's collaboration settings.
*/
get agentCollaboration(): string | undefined;
/**
* The agent's collaboration settings.
*/
set agentCollaboration(value: string | undefined);
/**
* List of Agent Collaborators.
*/
get agentCollaborators(): Array<CfnAgent.AgentCollaboratorProperty | cdk.IResolvable> | cdk.IResolvable | undefined;
/**
* List of Agent Collaborators.
*/
set agentCollaborators(value: Array<CfnAgent.AgentCollaboratorProperty | cdk.IResolvable> | cdk.IResolvable | undefined);
/**
* The name of the agent.
*/
get agentName(): string;
/**
* The name of the agent.
*/
set agentName(value: string);
/**
* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
*/
get agentResourceRoleArn(): string | undefined;
/**
* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
*/
set agentResourceRoleArn(value: string | undefined);
/**
* Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent.
*/
get autoPrepare(): boolean | cdk.IResolvable | undefined;
/**
* Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent.
*/
set autoPrepare(value: boolean | cdk.IResolvable | undefined);
/**
* The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.
*/
get customerEncryptionKeyArn(): string | undefined;
/**
* The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.
*/
set customerEncryptionKeyArn(value: string | undefined);
/**
* Contains custom orchestration configurations for the agent.
*/
get customOrchestration(): CfnAgent.CustomOrchestrationProperty | cdk.IResolvable | undefined;
/**
* Contains custom orchestration configurations for the agent.
*/
set customOrchestration(value: CfnAgent.CustomOrchestrationProperty | cdk.IResolvable | undefined);
/**
* The description of the agent.
*/
get description(): string | undefined;
/**
* The description of the agent.
*/
set description(value: string | undefined);
/**
* The foundation model used for orchestration by the agent.
*/
get foundationModel(): string | undefined;
/**
* The foundation model used for orchestration by the agent.
*/
set foundationModel(value: string | undefined);
/**
* Details about the guardrail associated with the agent.
*/
get guardrailConfiguration(): CfnAgent.GuardrailConfigurationProperty | cdk.IResolvable | undefined;
/**
* Details about the guardrail associated with the agent.
*/
set guardrailConfiguration(value: CfnAgent.GuardrailConfigurationProperty | cdk.IResolvable | undefined);
/**
* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
*/
get idleSessionTtlInSeconds(): number | undefined;
/**
* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
*/
set idleSessionTtlInSeconds(value: number | undefined);
/**
* Instructions that tell the agent what it should do and how it should interact with users.
*/
get instruction(): string | undefined;
/**
* Instructions that tell the agent what it should do and how it should interact with users.
*/
set instruction(value: string | undefined);
/**
* The knowledge bases associated with the agent.
*/
get knowledgeBases(): Array<CfnAgent.AgentKnowledgeBaseProperty | cdk.IResolvable> | cdk.IResolvable | undefined;
/**
* The knowledge bases associated with the agent.
*/
set knowledgeBases(value: Array<CfnAgent.AgentKnowledgeBaseProperty | cdk.IResolvable> | cdk.IResolvable | undefined);
/**
* Contains memory configuration for the agent.
*/
get memoryConfiguration(): cdk.IResolvable | CfnAgent.MemoryConfigurationProperty | undefined;
/**
* Contains memory configuration for the agent.
*/
set memoryConfiguration(value: cdk.IResolvable | CfnAgent.MemoryConfigurationProperty | undefined);
/**
* Specifies the orchestration strategy for the agent.
*/
get orchestrationType(): string | undefined;
/**
* Specifies the orchestration strategy for the agent.
*/
set orchestrationType(value: string | undefined);
/**
* Contains configurations to override prompt templates in different parts of an agent sequence.
*/
get promptOverrideConfiguration(): cdk.IResolvable | CfnAgent.PromptOverrideConfigurationProperty | undefined;
/**
* Contains configurations to override prompt templates in different parts of an agent sequence.
*/
set promptOverrideConfiguration(value: cdk.IResolvable | CfnAgent.PromptOverrideConfigurationProperty | undefined);
/**
* Specifies whether to delete the resource even if it's in use.
*/
get skipResourceInUseCheckOnDelete(): boolean | cdk.IResolvable | undefined;
/**
* Specifies whether to delete the resource even if it's in use.
*/
set skipResourceInUseCheckOnDelete(value: boolean | cdk.IResolvable | undefined);
/**
* Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
*/
get tags(): Record<string, string> | undefined;
/**
* Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
*/
set tags(value: Record<string, string> | undefined);
/**
* Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
*/
get testAliasTags(): cdk.IResolvable | Record<string, string> | undefined;
/**
* Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
*/
set testAliasTags(value: cdk.IResolvable | Record<string, string> | undefined);
/**
* The Amazon Resource Name (ARN) of the agent.
*
* @cloudformationAttribute AgentArn
*/
get attrAgentArn(): string;
/**
* The unique identifier of the agent.
*
* @cloudformationAttribute AgentId
*/
get 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
*/
get attrAgentStatus(): string;
/**
* The version of the agent.
*
* @cloudformationAttribute AgentVersion
*/
get attrAgentVersion(): string;
/**
* The time at which the agent was created.
*
* @cloudformationAttribute CreatedAt
*/
get attrCreatedAt(): string;
/**
* Contains reasons that the agent-related API that you invoked failed.
*
* @cloudformationAttribute FailureReasons
*/
get attrFailureReasons(): Array<string>;
/**
* The time at which the agent was last prepared.
*
* @cloudformationAttribute PreparedAt
*/
get attrPreparedAt(): string;
/**
* Contains recommended actions to take for the agent-related API that you invoked to succeed.
*
* @cloudformationAttribute RecommendedActions
*/
get attrRecommendedActions(): Array<string>;
/**
* The time at which the agent was last updated.
*
* @cloudformationAttribute UpdatedAt
*/
get attrUpdatedAt(): string;
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;
}
/**
* Contains details of the custom orchestration configured for the agent.
*
* @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;
}
/**
* The structure of the executor invoking the actions in 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 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-