CfnAgentPropsMixin

class aws_cdk.mixins_preview.aws_bedrock.mixins.CfnAgentPropsMixin(props, *, strategy=None)

Bases: Mixin

Specifies an agent as a resource in a top-level template. Minimally, you must specify the following properties:.

For more information about using agents in Amazon Bedrock , see Agents for Amazon Bedrock .

See the Properties section below for descriptions of both the required and optional properties.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html

CloudformationResource:

AWS::Bedrock::Agent

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any

cfn_agent_props_mixin = bedrock_mixins.CfnAgentPropsMixin(bedrock_mixins.CfnAgentMixinProps(
    action_groups=[bedrock_mixins.CfnAgentPropsMixin.AgentActionGroupProperty(
        action_group_executor=bedrock_mixins.CfnAgentPropsMixin.ActionGroupExecutorProperty(
            custom_control="customControl",
            lambda_="lambda"
        ),
        action_group_name="actionGroupName",
        action_group_state="actionGroupState",
        api_schema=bedrock_mixins.CfnAgentPropsMixin.APISchemaProperty(
            payload="payload",
            s3=bedrock_mixins.CfnAgentPropsMixin.S3IdentifierProperty(
                s3_bucket_name="s3BucketName",
                s3_object_key="s3ObjectKey"
            )
        ),
        description="description",
        function_schema=bedrock_mixins.CfnAgentPropsMixin.FunctionSchemaProperty(
            functions=[bedrock_mixins.CfnAgentPropsMixin.FunctionProperty(
                description="description",
                name="name",
                parameters={
                    "parameters_key": bedrock_mixins.CfnAgentPropsMixin.ParameterDetailProperty(
                        description="description",
                        required=False,
                        type="type"
                    )
                },
                require_confirmation="requireConfirmation"
            )]
        ),
        parent_action_group_signature="parentActionGroupSignature",
        skip_resource_in_use_check_on_delete=False
    )],
    agent_collaboration="agentCollaboration",
    agent_collaborators=[bedrock_mixins.CfnAgentPropsMixin.AgentCollaboratorProperty(
        agent_descriptor=bedrock_mixins.CfnAgentPropsMixin.AgentDescriptorProperty(
            alias_arn="aliasArn"
        ),
        collaboration_instruction="collaborationInstruction",
        collaborator_name="collaboratorName",
        relay_conversation_history="relayConversationHistory"
    )],
    agent_name="agentName",
    agent_resource_role_arn="agentResourceRoleArn",
    auto_prepare=False,
    customer_encryption_key_arn="customerEncryptionKeyArn",
    custom_orchestration=bedrock_mixins.CfnAgentPropsMixin.CustomOrchestrationProperty(
        executor=bedrock_mixins.CfnAgentPropsMixin.OrchestrationExecutorProperty(
            lambda_="lambda"
        )
    ),
    description="description",
    foundation_model="foundationModel",
    guardrail_configuration=bedrock_mixins.CfnAgentPropsMixin.GuardrailConfigurationProperty(
        guardrail_identifier="guardrailIdentifier",
        guardrail_version="guardrailVersion"
    ),
    idle_session_ttl_in_seconds=123,
    instruction="instruction",
    knowledge_bases=[bedrock_mixins.CfnAgentPropsMixin.AgentKnowledgeBaseProperty(
        description="description",
        knowledge_base_id="knowledgeBaseId",
        knowledge_base_state="knowledgeBaseState"
    )],
    memory_configuration=bedrock_mixins.CfnAgentPropsMixin.MemoryConfigurationProperty(
        enabled_memory_types=["enabledMemoryTypes"],
        session_summary_configuration=bedrock_mixins.CfnAgentPropsMixin.SessionSummaryConfigurationProperty(
            max_recent_sessions=123
        ),
        storage_days=123
    ),
    orchestration_type="orchestrationType",
    prompt_override_configuration=bedrock_mixins.CfnAgentPropsMixin.PromptOverrideConfigurationProperty(
        override_lambda="overrideLambda",
        prompt_configurations=[bedrock_mixins.CfnAgentPropsMixin.PromptConfigurationProperty(
            additional_model_request_fields=additional_model_request_fields,
            base_prompt_template="basePromptTemplate",
            foundation_model="foundationModel",
            inference_configuration=bedrock_mixins.CfnAgentPropsMixin.InferenceConfigurationProperty(
                maximum_length=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_k=123,
                top_p=123
            ),
            parser_mode="parserMode",
            prompt_creation_mode="promptCreationMode",
            prompt_state="promptState",
            prompt_type="promptType"
        )]
    ),
    skip_resource_in_use_check_on_delete=False,
    tags={
        "tags_key": "tags"
    },
    test_alias_tags={
        "test_alias_tags_key": "testAliasTags"
    }
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Bedrock::Agent.

Parameters:
  • props (Union[CfnAgentMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['actionGroups', 'agentCollaboration', 'agentCollaborators', 'agentName', 'agentResourceRoleArn', 'autoPrepare', 'customerEncryptionKeyArn', 'customOrchestration', 'description', 'foundationModel', 'guardrailConfiguration', 'idleSessionTtlInSeconds', 'instruction', 'knowledgeBases', 'memoryConfiguration', 'orchestrationType', 'promptOverrideConfiguration', 'skipResourceInUseCheckOnDelete', 'tags', 'testAliasTags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

APISchemaProperty

class CfnAgentPropsMixin.APISchemaProperty(*, payload=None, s3=None)

Bases: object

Contains details about the OpenAPI schema for the action group.

For more information, see Action group OpenAPI schemas . 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.

Parameters:
  • payload (Optional[str]) – The JSON or YAML-formatted payload defining the OpenAPI schema for the action group.

  • s3 (Union[IResolvable, S3IdentifierProperty, Dict[str, Any], None]) – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

a_pISchema_property = bedrock_mixins.CfnAgentPropsMixin.APISchemaProperty(
    payload="payload",
    s3=bedrock_mixins.CfnAgentPropsMixin.S3IdentifierProperty(
        s3_bucket_name="s3BucketName",
        s3_object_key="s3ObjectKey"
    )
)

Attributes

payload

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

s3

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

ActionGroupExecutorProperty

class CfnAgentPropsMixin.ActionGroupExecutorProperty(*, custom_control=None, lambda_=None)

Bases: object

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.

Parameters:
  • custom_control (Optional[str]) – To return the action group invocation results directly in the InvokeInlineAgent response, specify RETURN_CONTROL .

  • lambda – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

action_group_executor_property = bedrock_mixins.CfnAgentPropsMixin.ActionGroupExecutorProperty(
    custom_control="customControl",
    lambda_="lambda"
)

Attributes

custom_control

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

lambda_

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

AgentActionGroupProperty

class CfnAgentPropsMixin.AgentActionGroupProperty(*, action_group_executor=None, action_group_name=None, action_group_state=None, api_schema=None, description=None, function_schema=None, parent_action_group_signature=None, skip_resource_in_use_check_on_delete=None)

Bases: object

Contains details of the inline agent’s action group.

Parameters:
  • action_group_executor (Union[IResolvable, ActionGroupExecutorProperty, Dict[str, Any], None]) – 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.

  • action_group_name (Optional[str]) – The name of the action group.

  • action_group_state (Optional[str]) – Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.

  • api_schema (Union[IResolvable, APISchemaProperty, Dict[str, Any], None]) –

    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 .

  • description (Optional[str]) – A description of the action group.

  • function_schema (Union[IResolvable, FunctionSchemaProperty, Dict[str, Any], None]) – Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.

  • parent_action_group_signature (Optional[str]) – 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 reprompting the user for more information.

  • skip_resource_in_use_check_on_delete (Union[bool, IResolvable, None]) – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

agent_action_group_property = bedrock_mixins.CfnAgentPropsMixin.AgentActionGroupProperty(
    action_group_executor=bedrock_mixins.CfnAgentPropsMixin.ActionGroupExecutorProperty(
        custom_control="customControl",
        lambda_="lambda"
    ),
    action_group_name="actionGroupName",
    action_group_state="actionGroupState",
    api_schema=bedrock_mixins.CfnAgentPropsMixin.APISchemaProperty(
        payload="payload",
        s3=bedrock_mixins.CfnAgentPropsMixin.S3IdentifierProperty(
            s3_bucket_name="s3BucketName",
            s3_object_key="s3ObjectKey"
        )
    ),
    description="description",
    function_schema=bedrock_mixins.CfnAgentPropsMixin.FunctionSchemaProperty(
        functions=[bedrock_mixins.CfnAgentPropsMixin.FunctionProperty(
            description="description",
            name="name",
            parameters={
                "parameters_key": bedrock_mixins.CfnAgentPropsMixin.ParameterDetailProperty(
                    description="description",
                    required=False,
                    type="type"
                )
            },
            require_confirmation="requireConfirmation"
        )]
    ),
    parent_action_group_signature="parentActionGroupSignature",
    skip_resource_in_use_check_on_delete=False
)

Attributes

action_group_executor

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

action_group_name

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

action_group_state

Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-actiongroupstate

api_schema

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html#cfn-bedrock-agent-agentactiongroup-apischema

description

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

function_schema

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

parent_action_group_signature

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 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

skip_resource_in_use_check_on_delete

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

AgentCollaboratorProperty

class CfnAgentPropsMixin.AgentCollaboratorProperty(*, agent_descriptor=None, collaboration_instruction=None, collaborator_name=None, relay_conversation_history=None)

Bases: object

An agent collaborator.

Parameters:
  • agent_descriptor (Union[IResolvable, AgentDescriptorProperty, Dict[str, Any], None]) – The collaborator’s agent descriptor.

  • collaboration_instruction (Optional[str]) – The collaborator’s instructions.

  • collaborator_name (Optional[str]) – The collaborator’s collaborator name.

  • relay_conversation_history (Optional[str]) – The collaborator’s relay conversation history.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentcollaborator.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

agent_collaborator_property = bedrock_mixins.CfnAgentPropsMixin.AgentCollaboratorProperty(
    agent_descriptor=bedrock_mixins.CfnAgentPropsMixin.AgentDescriptorProperty(
        alias_arn="aliasArn"
    ),
    collaboration_instruction="collaborationInstruction",
    collaborator_name="collaboratorName",
    relay_conversation_history="relayConversationHistory"
)

Attributes

agent_descriptor

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

collaboration_instruction

The collaborator’s instructions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentcollaborator.html#cfn-bedrock-agent-agentcollaborator-collaborationinstruction

collaborator_name

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

relay_conversation_history

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

AgentDescriptorProperty

class CfnAgentPropsMixin.AgentDescriptorProperty(*, alias_arn=None)

Bases: object

An agent descriptor.

Parameters:

alias_arn (Optional[str]) – The agent’s alias ARN.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentdescriptor.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

agent_descriptor_property = bedrock_mixins.CfnAgentPropsMixin.AgentDescriptorProperty(
    alias_arn="aliasArn"
)

Attributes

alias_arn

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

AgentKnowledgeBaseProperty

class CfnAgentPropsMixin.AgentKnowledgeBaseProperty(*, description=None, knowledge_base_id=None, knowledge_base_state=None)

Bases: object

Contains details about a knowledge base that is associated with an agent.

Parameters:
  • description (Optional[str]) – The description of the association between the agent and the knowledge base.

  • knowledge_base_id (Optional[str]) – The unique identifier of the association between the agent and the knowledge base.

  • knowledge_base_state (Optional[str]) –

    Specifies whether to use the knowledge base or not when sending an InvokeAgent request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentknowledgebase.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

agent_knowledge_base_property = bedrock_mixins.CfnAgentPropsMixin.AgentKnowledgeBaseProperty(
    description="description",
    knowledge_base_id="knowledgeBaseId",
    knowledge_base_state="knowledgeBaseState"
)

Attributes

description

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

knowledge_base_id

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

knowledge_base_state

Specifies whether to use the knowledge base or not when sending an InvokeAgent request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentknowledgebase.html#cfn-bedrock-agent-agentknowledgebase-knowledgebasestate

CustomOrchestrationProperty

class CfnAgentPropsMixin.CustomOrchestrationProperty(*, executor=None)

Bases: object

Contains details of the custom orchestration configured for the agent.

Parameters:

executor (Union[IResolvable, OrchestrationExecutorProperty, Dict[str, Any], None]) – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

custom_orchestration_property = bedrock_mixins.CfnAgentPropsMixin.CustomOrchestrationProperty(
    executor=bedrock_mixins.CfnAgentPropsMixin.OrchestrationExecutorProperty(
        lambda_="lambda"
    )
)

Attributes

executor

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

FunctionProperty

class CfnAgentPropsMixin.FunctionProperty(*, description=None, name=None, parameters=None, require_confirmation=None)

Bases: object

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:

Parameters:
  • description (Optional[str]) – A description of the function and its purpose.

  • name (Optional[str]) – A name for the function.

  • parameters (Union[IResolvable, Mapping[str, Union[IResolvable, ParameterDetailProperty, Dict[str, Any]]], None]) – The parameters that the agent elicits from the user to fulfill the function.

  • require_confirmation (Optional[str]) – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

function_property = bedrock_mixins.CfnAgentPropsMixin.FunctionProperty(
    description="description",
    name="name",
    parameters={
        "parameters_key": bedrock_mixins.CfnAgentPropsMixin.ParameterDetailProperty(
            description="description",
            required=False,
            type="type"
        )
    },
    require_confirmation="requireConfirmation"
)

Attributes

description

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

name

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

parameters

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

require_confirmation

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

FunctionSchemaProperty

class CfnAgentPropsMixin.FunctionSchemaProperty(*, functions=None)

Bases: object

Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.

Parameters:

functions (Union[IResolvable, Sequence[Union[IResolvable, FunctionProperty, Dict[str, Any]]], None]) – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

function_schema_property = bedrock_mixins.CfnAgentPropsMixin.FunctionSchemaProperty(
    functions=[bedrock_mixins.CfnAgentPropsMixin.FunctionProperty(
        description="description",
        name="name",
        parameters={
            "parameters_key": bedrock_mixins.CfnAgentPropsMixin.ParameterDetailProperty(
                description="description",
                required=False,
                type="type"
            )
        },
        require_confirmation="requireConfirmation"
    )]
)

Attributes

functions

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

GuardrailConfigurationProperty

class CfnAgentPropsMixin.GuardrailConfigurationProperty(*, guardrail_identifier=None, guardrail_version=None)

Bases: object

Configuration information for a guardrail that you use with the Converse operation.

Parameters:
  • guardrail_identifier (Optional[str]) – The identifier for the guardrail.

  • guardrail_version (Optional[str]) – The version of the guardrail.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-guardrailconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

guardrail_configuration_property = bedrock_mixins.CfnAgentPropsMixin.GuardrailConfigurationProperty(
    guardrail_identifier="guardrailIdentifier",
    guardrail_version="guardrailVersion"
)

Attributes

guardrail_identifier

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

guardrail_version

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

InferenceConfigurationProperty

class CfnAgentPropsMixin.InferenceConfigurationProperty(*, maximum_length=None, stop_sequences=None, temperature=None, top_k=None, top_p=None)

Bases: object

Base inference parameters to pass to a model in a call to Converse or ConverseStream . For more information, see Inference parameters for foundation models .

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 .

Parameters:
  • maximum_length (Union[int, float, None]) – The maximum number of tokens allowed in the generated response.

  • stop_sequences (Optional[Sequence[str]]) – A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response.

  • temperature (Union[int, float, None]) –

    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 .

  • top_k (Union[int, float, None]) – 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.

  • top_p (Union[int, float, None]) –

    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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

inference_configuration_property = bedrock_mixins.CfnAgentPropsMixin.InferenceConfigurationProperty(
    maximum_length=123,
    stop_sequences=["stopSequences"],
    temperature=123,
    top_k=123,
    top_p=123
)

Attributes

maximum_length

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

stop_sequences

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

temperature

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-temperature

top_k

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

top_p

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html#cfn-bedrock-agent-inferenceconfiguration-topp

MemoryConfigurationProperty

class CfnAgentPropsMixin.MemoryConfigurationProperty(*, enabled_memory_types=None, session_summary_configuration=None, storage_days=None)

Bases: object

Details of the memory configuration.

Parameters:
  • enabled_memory_types (Optional[Sequence[str]]) – The type of memory that is stored.

  • session_summary_configuration (Union[IResolvable, SessionSummaryConfigurationProperty, Dict[str, Any], None]) – Contains the configuration for SESSION_SUMMARY memory type enabled for the agent.

  • storage_days (Union[int, float, None]) – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

memory_configuration_property = bedrock_mixins.CfnAgentPropsMixin.MemoryConfigurationProperty(
    enabled_memory_types=["enabledMemoryTypes"],
    session_summary_configuration=bedrock_mixins.CfnAgentPropsMixin.SessionSummaryConfigurationProperty(
        max_recent_sessions=123
    ),
    storage_days=123
)

Attributes

enabled_memory_types

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

session_summary_configuration

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

storage_days

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

OrchestrationExecutorProperty

class CfnAgentPropsMixin.OrchestrationExecutorProperty(*, lambda_=None)

Bases: object

The structure of the executor invoking the actions in custom orchestration.

Parameters:

lambda – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

orchestration_executor_property = bedrock_mixins.CfnAgentPropsMixin.OrchestrationExecutorProperty(
    lambda_="lambda"
)

Attributes

lambda_

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

ParameterDetailProperty

class CfnAgentPropsMixin.ParameterDetailProperty(*, description=None, required=None, type=None)

Bases: object

Contains details about a parameter in a function for an action group.

Parameters:
  • description (Optional[str]) – A description of the parameter. Helps the foundation model determine how to elicit the parameters from the user.

  • required (Union[bool, IResolvable, None]) – Whether the parameter is required for the agent to complete the function for action group invocation.

  • type (Optional[str]) – The data type of the parameter.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-parameterdetail.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

parameter_detail_property = bedrock_mixins.CfnAgentPropsMixin.ParameterDetailProperty(
    description="description",
    required=False,
    type="type"
)

Attributes

description

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

required

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

type

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

PromptConfigurationProperty

class CfnAgentPropsMixin.PromptConfigurationProperty(*, additional_model_request_fields=None, base_prompt_template=None, foundation_model=None, inference_configuration=None, parser_mode=None, prompt_creation_mode=None, prompt_state=None, prompt_type=None)

Bases: object

Contains configurations to override a prompt template in one part of an agent sequence.

For more information, see Advanced prompts .

Parameters:
  • additional_model_request_fields (Any) – 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 .

  • base_prompt_template (Optional[str]) – 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 . For more information, see Configure the prompt templates .

  • foundation_model (Optional[str]) – The agent’s foundation model.

  • inference_configuration (Union[IResolvable, InferenceConfigurationProperty, Dict[str, Any], None]) –

    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 .

  • parser_mode (Optional[str]) – 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 must be specified with the ARN of a Lambda function.

  • prompt_creation_mode (Optional[str]) – 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.

  • prompt_state (Optional[str]) – 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_PROCESSINGENABLED - ORCHESTRATIONENABLED - KNOWLEDGE_BASE_RESPONSE_GENERATIONENABLED - POST_PROCESSINGDISABLED

  • prompt_type (Optional[str]) – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any

prompt_configuration_property = bedrock_mixins.CfnAgentPropsMixin.PromptConfigurationProperty(
    additional_model_request_fields=additional_model_request_fields,
    base_prompt_template="basePromptTemplate",
    foundation_model="foundationModel",
    inference_configuration=bedrock_mixins.CfnAgentPropsMixin.InferenceConfigurationProperty(
        maximum_length=123,
        stop_sequences=["stopSequences"],
        temperature=123,
        top_k=123,
        top_p=123
    ),
    parser_mode="parserMode",
    prompt_creation_mode="promptCreationMode",
    prompt_state="promptState",
    prompt_type="promptType"
)

Attributes

additional_model_request_fields

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-additionalmodelrequestfields

base_prompt_template

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 . For more information, see Configure the prompt templates .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-baseprompttemplate

foundation_model

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

inference_configuration

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-inferenceconfiguration

parser_mode

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 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

prompt_creation_mode

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

prompt_state

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_PROCESSINGENABLED

  • ORCHESTRATIONENABLED

  • KNOWLEDGE_BASE_RESPONSE_GENERATIONENABLED

  • POST_PROCESSINGDISABLED

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html#cfn-bedrock-agent-promptconfiguration-promptstate

prompt_type

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

PromptOverrideConfigurationProperty

class CfnAgentPropsMixin.PromptOverrideConfigurationProperty(*, override_lambda=None, prompt_configurations=None)

Bases: object

Contains configurations to override prompts in different parts of an agent sequence.

For more information, see Advanced prompts .

Parameters:
  • override_lambda (Optional[str]) – 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 .

  • prompt_configurations (Union[IResolvable, Sequence[Union[IResolvable, PromptConfigurationProperty, Dict[str, Any]]], None]) –

    Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptoverrideconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any

prompt_override_configuration_property = bedrock_mixins.CfnAgentPropsMixin.PromptOverrideConfigurationProperty(
    override_lambda="overrideLambda",
    prompt_configurations=[bedrock_mixins.CfnAgentPropsMixin.PromptConfigurationProperty(
        additional_model_request_fields=additional_model_request_fields,
        base_prompt_template="basePromptTemplate",
        foundation_model="foundationModel",
        inference_configuration=bedrock_mixins.CfnAgentPropsMixin.InferenceConfigurationProperty(
            maximum_length=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_k=123,
            top_p=123
        ),
        parser_mode="parserMode",
        prompt_creation_mode="promptCreationMode",
        prompt_state="promptState",
        prompt_type="promptType"
    )]
)

Attributes

override_lambda

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptoverrideconfiguration.html#cfn-bedrock-agent-promptoverrideconfiguration-overridelambda

prompt_configurations

Contains configurations to override a prompt template in one part of an agent sequence.

For more information, see Advanced prompts .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptoverrideconfiguration.html#cfn-bedrock-agent-promptoverrideconfiguration-promptconfigurations

S3IdentifierProperty

class CfnAgentPropsMixin.S3IdentifierProperty(*, s3_bucket_name=None, s3_object_key=None)

Bases: object

The identifier information for an Amazon S3 bucket.

Parameters:
  • s3_bucket_name (Optional[str]) – The name of the S3 bucket.

  • s3_object_key (Optional[str]) – The S3 object key for the S3 resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-s3identifier.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

s3_identifier_property = bedrock_mixins.CfnAgentPropsMixin.S3IdentifierProperty(
    s3_bucket_name="s3BucketName",
    s3_object_key="s3ObjectKey"
)

Attributes

s3_bucket_name

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

s3_object_key

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

SessionSummaryConfigurationProperty

class CfnAgentPropsMixin.SessionSummaryConfigurationProperty(*, max_recent_sessions=None)

Bases: object

Configuration for SESSION_SUMMARY memory type enabled for the agent.

Parameters:

max_recent_sessions (Union[int, float, None]) – 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

session_summary_configuration_property = bedrock_mixins.CfnAgentPropsMixin.SessionSummaryConfigurationProperty(
    max_recent_sessions=123
)

Attributes

max_recent_sessions

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