CfnAgentProps

class aws_cdk.aws_bedrock.CfnAgentProps(*, agent_name, action_groups=None, agent_resource_role_arn=None, auto_prepare=None, customer_encryption_key_arn=None, description=None, foundation_model=None, idle_session_ttl_in_seconds=None, instruction=None, knowledge_bases=None, prompt_override_configuration=None, skip_resource_in_use_check_on_delete=None, tags=None, test_alias_tags=None)

Bases: object

Properties for defining a CfnAgent.

Parameters:
  • agent_name (str) – The name of the agent.

  • action_groups (Union[IResolvable, Sequence[Union[IResolvable, AgentActionGroupProperty, Dict[str, Any]]], None]) – The action groups that belong to an agent.

  • agent_resource_role_arn (Optional[str]) – The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.

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

  • customer_encryption_key_arn (Optional[str]) – The Amazon Resource Name (ARN) of the AWS KMS key that encrypts the agent.

  • description (Optional[str]) – The description of the agent.

  • foundation_model (Optional[str]) – The foundation model used for orchestration by the agent.

  • idle_session_ttl_in_seconds (Union[int, float, None]) – The number of seconds for which Amazon Bedrock keeps information about a user’s conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.

  • instruction (Optional[str]) – Instructions that tell the agent what it should do and how it should interact with users.

  • knowledge_bases (Union[IResolvable, Sequence[Union[IResolvable, AgentKnowledgeBaseProperty, Dict[str, Any]]], None]) – The knowledge bases associated with the agent.

  • prompt_override_configuration (Union[IResolvable, PromptOverrideConfigurationProperty, Dict[str, Any], None]) – Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see Advanced prompts .

  • 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

  • tags (Optional[Mapping[str, str]]) – Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. - Tag naming limits and requirements - Tagging best practices

  • test_alias_tags (Union[IResolvable, Mapping[str, str], None]) –

    Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. - Tag naming limits and requirements - Tagging best practices

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.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 import aws_bedrock as bedrock

cfn_agent_props = bedrock.CfnAgentProps(
    agent_name="agentName",

    # the properties below are optional
    action_groups=[bedrock.CfnAgent.AgentActionGroupProperty(
        action_group_name="actionGroupName",

        # the properties below are optional
        action_group_executor=bedrock.CfnAgent.ActionGroupExecutorProperty(
            custom_control="customControl",
            lambda_="lambda"
        ),
        action_group_state="actionGroupState",
        api_schema=bedrock.CfnAgent.APISchemaProperty(
            payload="payload",
            s3=bedrock.CfnAgent.S3IdentifierProperty(
                s3_bucket_name="s3BucketName",
                s3_object_key="s3ObjectKey"
            )
        ),
        description="description",
        function_schema=bedrock.CfnAgent.FunctionSchemaProperty(
            functions=[bedrock.CfnAgent.FunctionProperty(
                name="name",

                # the properties below are optional
                description="description",
                parameters={
                    "parameters_key": bedrock.CfnAgent.ParameterDetailProperty(
                        type="type",

                        # the properties below are optional
                        description="description",
                        required=False
                    )
                }
            )]
        ),
        parent_action_group_signature="parentActionGroupSignature",
        skip_resource_in_use_check_on_delete=False
    )],
    agent_resource_role_arn="agentResourceRoleArn",
    auto_prepare=False,
    customer_encryption_key_arn="customerEncryptionKeyArn",
    description="description",
    foundation_model="foundationModel",
    idle_session_ttl_in_seconds=123,
    instruction="instruction",
    knowledge_bases=[bedrock.CfnAgent.AgentKnowledgeBaseProperty(
        description="description",
        knowledge_base_id="knowledgeBaseId",

        # the properties below are optional
        knowledge_base_state="knowledgeBaseState"
    )],
    prompt_override_configuration=bedrock.CfnAgent.PromptOverrideConfigurationProperty(
        prompt_configurations=[bedrock.CfnAgent.PromptConfigurationProperty(
            base_prompt_template="basePromptTemplate",
            inference_configuration=bedrock.CfnAgent.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"
        )],

        # the properties below are optional
        override_lambda="overrideLambda"
    ),
    skip_resource_in_use_check_on_delete=False,
    tags={
        "tags_key": "tags"
    },
    test_alias_tags={
        "test_alias_tags_key": "testAliasTags"
    }
)

Attributes

action_groups

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

agent_name

The name of the agent.

See:

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

agent_resource_role_arn

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

auto_prepare

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

customer_encryption_key_arn

The Amazon Resource Name (ARN) of the AWS KMS key that encrypts the agent.

See:

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

description

The description of the agent.

See:

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

foundation_model

The foundation model used for orchestration by the agent.

See:

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

idle_session_ttl_in_seconds

The number of seconds for which Amazon Bedrock keeps information about a user’s conversation with the agent.

A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.

See:

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

instruction

Instructions that tell the agent what it should do and how it should interact with users.

See:

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

knowledge_bases

The knowledge bases associated with the agent.

See:

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

prompt_override_configuration

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

For more information, see Advanced prompts .

See:

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

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-resource-bedrock-agent.html#cfn-bedrock-agent-skipresourceinusecheckondelete

tags

.

See:

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

Type:

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources

test_alias_tags

.

See:

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

Type:

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources