CfnAgentPropsMixin
- class aws_cdk.mixins_preview.aws_bedrock.mixins.CfnAgentPropsMixin(props, *, strategy=None)
Bases:
MixinSpecifies 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 .
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 .
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:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
APISchemaProperty
- class CfnAgentPropsMixin.APISchemaProperty(*, payload=None, s3=None)
Bases:
objectContains 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:
- 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.
- s3
Contains details about the S3 object containing the OpenAPI schema for the action group.
ActionGroupExecutorProperty
- class CfnAgentPropsMixin.ActionGroupExecutorProperty(*, custom_control=None, lambda_=None)
Bases:
objectContains 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 theInvokeInlineAgentresponse, specifyRETURN_CONTROL.lambda – The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
- See:
- 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
InvokeInlineAgentresponse, specifyRETURN_CONTROL.
- lambda_
The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
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:
objectContains 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 asAMAZON.UserInput, the agent can request the user for additional information when trying to complete a task. Thedescription,apiSchema, andactionGroupExecutorfields 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 isfalse. Default: - false
- See:
- 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.
- action_group_name
The name of the action group.
- action_group_state
Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.
- 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 .
- description
A description of the action group.
- function_schema
Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.
- 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. Thedescription,apiSchema, andactionGroupExecutorfields 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
Specifies whether to delete the resource even if it’s in use.
By default, this value is
false.
AgentCollaboratorProperty
- class CfnAgentPropsMixin.AgentCollaboratorProperty(*, agent_descriptor=None, collaboration_instruction=None, collaborator_name=None, relay_conversation_history=None)
Bases:
objectAn 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:
- 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.
- collaboration_instruction
The collaborator’s instructions.
- collaborator_name
The collaborator’s collaborator name.
- relay_conversation_history
The collaborator’s relay conversation history.
AgentDescriptorProperty
- class CfnAgentPropsMixin.AgentDescriptorProperty(*, alias_arn=None)
Bases:
objectAn agent descriptor.
- Parameters:
alias_arn (
Optional[str]) – The agent’s alias ARN.- See:
- 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
AgentKnowledgeBaseProperty
- class CfnAgentPropsMixin.AgentKnowledgeBaseProperty(*, description=None, knowledge_base_id=None, knowledge_base_state=None)
Bases:
objectContains 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:
- 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.
- knowledge_base_id
The unique identifier of the association between the agent and the knowledge base.
- knowledge_base_state
Specifies whether to use the knowledge base or not when sending an InvokeAgent request.
CustomOrchestrationProperty
- class CfnAgentPropsMixin.CustomOrchestrationProperty(*, executor=None)
Bases:
objectContains 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:
- 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.
FunctionProperty
- class CfnAgentPropsMixin.FunctionProperty(*, description=None, name=None, parameters=None, require_confirmation=None)
Bases:
objectDefines 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:
- 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.
- name
A name for the function.
- parameters
The parameters that the agent elicits from the user to fulfill the function.
- require_confirmation
Contains information if user confirmation is required to invoke the function.
FunctionSchemaProperty
- class CfnAgentPropsMixin.FunctionSchemaProperty(*, functions=None)
Bases:
objectContains 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:
- 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.
GuardrailConfigurationProperty
- class CfnAgentPropsMixin.GuardrailConfigurationProperty(*, guardrail_identifier=None, guardrail_version=None)
Bases:
objectConfiguration 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:
- 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.
- guardrail_version
The version of the guardrail.
InferenceConfigurationProperty
- class CfnAgentPropsMixin.InferenceConfigurationProperty(*, maximum_length=None, stop_sequences=None, temperature=None, top_k=None, top_p=None)
Bases:
objectBase 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
additionalModelRequestFieldsrequest field in the call toConverseorConverseStream. 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 fortopKis the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you settopKto 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:
- 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.
- stop_sequences
A list of stop sequences.
A stop sequence is a sequence of characters that causes the model to stop generating the response.
- 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 .
- 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
topKis the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you settopKto 50, the model selects the next token from among the top 50 most likely choices.
- 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 .
MemoryConfigurationProperty
- class CfnAgentPropsMixin.MemoryConfigurationProperty(*, enabled_memory_types=None, session_summary_configuration=None, storage_days=None)
Bases:
objectDetails 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:
- 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.
- session_summary_configuration
Contains the configuration for SESSION_SUMMARY memory type enabled for the agent.
- storage_days
The number of days the agent is configured to retain the conversational context.
OrchestrationExecutorProperty
- class CfnAgentPropsMixin.OrchestrationExecutorProperty(*, lambda_=None)
Bases:
objectThe 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:
- 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.
ParameterDetailProperty
- class CfnAgentPropsMixin.ParameterDetailProperty(*, description=None, required=None, type=None)
Bases:
objectContains 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:
- 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.
- required
Whether the parameter is required for the agent to complete the function for action group invocation.
- type
The data type of the parameter.
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:
objectContains 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,additionalModelRequestFieldscontains additional inference parameters, beyond the base set of inference parameters in theinferenceConfigurationfield. 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 thepromptType. If you set the field asOVERRIDDEN, theoverrideLambdafield 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 thispromptType. Set this value toOVERRIDDENto use the prompt that you provide in thebasePromptTemplate. If you leave it asDEFAULT, 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 thepromptType. If you set this value toDISABLED, the agent skips that step. The default state for eachpromptTypeis as follows. -PRE_PROCESSING–ENABLED-ORCHESTRATION–ENABLED-KNOWLEDGE_BASE_RESPONSE_GENERATION–ENABLED-POST_PROCESSING–DISABLEDprompt_type (
Optional[str]) – The step in the agent sequence that this prompt configuration applies to.
- See:
- 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,
additionalModelRequestFieldscontains additional inference parameters, beyond the base set of inference parameters in theinferenceConfigurationfield.For more information, see Inference request parameters and response fields for foundation models .
- 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 .
- foundation_model
The agent’s foundation model.
- 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 .
- 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, theoverrideLambdafield in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.
- prompt_creation_mode
Specifies whether to override the default prompt template for this
promptType.Set this value to
OVERRIDDENto use the prompt that you provide in thebasePromptTemplate. If you leave it asDEFAULT, the agent uses a default prompt template.
- 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 eachpromptTypeis as follows.PRE_PROCESSING–ENABLEDORCHESTRATION–ENABLEDKNOWLEDGE_BASE_RESPONSE_GENERATION–ENABLEDPOST_PROCESSING–DISABLED
- prompt_type
The step in the agent sequence that this prompt configuration applies to.
PromptOverrideConfigurationProperty
- class CfnAgentPropsMixin.PromptOverrideConfigurationProperty(*, override_lambda=None, prompt_configurations=None)
Bases:
objectContains 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 thepromptConfigurationsmust contain aparserModevalue that is set toOVERRIDDEN. 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:
- 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
promptConfigurationsmust contain aparserModevalue that is set toOVERRIDDEN. For more information, see Parser Lambda function in Amazon Bedrock Agents .
- prompt_configurations
Contains configurations to override a prompt template in one part of an agent sequence.
For more information, see Advanced prompts .
S3IdentifierProperty
- class CfnAgentPropsMixin.S3IdentifierProperty(*, s3_bucket_name=None, s3_object_key=None)
Bases:
objectThe 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:
- 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.
- s3_object_key
The S3 object key for the S3 resource.
SessionSummaryConfigurationProperty
- class CfnAgentPropsMixin.SessionSummaryConfigurationProperty(*, max_recent_sessions=None)
Bases:
objectConfiguration 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:
- 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.