CfnHarnessProps
- class aws_cdk.aws_bedrockagentcore.CfnHarnessProps(*, execution_role_arn, harness_name, model, allowed_tools=None, authorizer_configuration=None, environment=None, environment_artifact=None, environment_variables=None, max_iterations=None, max_tokens=None, memory=None, skills=None, system_prompt=None, tags=None, timeout_seconds=None, tools=None, truncation=None)
Bases:
objectProperties for defining a
CfnHarness.- Parameters:
execution_role_arn (
str) – The ARN of the IAM role that the harness assumes when running.harness_name (
str) – The name of the harness.model (
Union[IResolvable,HarnessModelConfigurationProperty,Dict[str,Any]])allowed_tools (
Optional[Sequence[str]]) – The tools that the agent is allowed to use.authorizer_configuration (
Union[IResolvable,AuthorizerConfigurationProperty,Dict[str,Any],None])environment (
Union[IResolvable,HarnessEnvironmentProviderProperty,Dict[str,Any],None])environment_artifact (
Union[IResolvable,HarnessEnvironmentArtifactProperty,Dict[str,Any],None])environment_variables (
Union[IResolvable,Mapping[str,str],None]) – Environment variables to set in the harness runtime environment.max_iterations (
Union[int,float,None]) – The maximum number of iterations the agent loop can execute per invocation.max_tokens (
Union[int,float,None]) – The maximum number of tokens the agent can generate per iteration.memory (
Union[IResolvable,HarnessMemoryConfigurationProperty,Dict[str,Any],None])skills (
Union[IResolvable,Sequence[Union[IResolvable,HarnessSkillProperty,Dict[str,Any]]],None]) – The skills available to the agent.system_prompt (
Union[IResolvable,Sequence[Union[IResolvable,HarnessSystemContentBlockProperty,Dict[str,Any]]],None]) – The system prompt that defines the agent’s behavior.tags (
Optional[Sequence[Union[CfnTag,Dict[str,Any]]]]) – Tags to apply to the harness resource.timeout_seconds (
Union[int,float,None]) – The maximum duration in seconds for the agent loop execution per invocation.tools (
Union[IResolvable,Sequence[Union[IResolvable,HarnessToolProperty,Dict[str,Any]]],None]) – The tools available to the agent.truncation (
Union[IResolvable,HarnessTruncationConfigurationProperty,Dict[str,Any],None])
- See:
- ExampleMetadata:
fixture=_generated
Example:
from aws_cdk import CfnTag # The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_bedrockagentcore as bedrockagentcore # aws_iam: Any # input_schema: Any # none: Any cfn_harness_props = bedrockagentcore.CfnHarnessProps( execution_role_arn="executionRoleArn", harness_name="harnessName", model=bedrockagentcore.CfnHarness.HarnessModelConfigurationProperty( bedrock_model_config=bedrockagentcore.CfnHarness.HarnessBedrockModelConfigProperty( model_id="modelId", # the properties below are optional max_tokens=123, temperature=123, top_p=123 ), gemini_model_config=bedrockagentcore.CfnHarness.HarnessGeminiModelConfigProperty( api_key_arn="apiKeyArn", model_id="modelId", # the properties below are optional max_tokens=123, temperature=123, top_k=123, top_p=123 ), open_ai_model_config=bedrockagentcore.CfnHarness.HarnessOpenAiModelConfigProperty( api_key_arn="apiKeyArn", model_id="modelId", # the properties below are optional max_tokens=123, temperature=123, top_p=123 ) ), # the properties below are optional allowed_tools=["allowedTools"], authorizer_configuration=bedrockagentcore.CfnHarness.AuthorizerConfigurationProperty( custom_jwt_authorizer=bedrockagentcore.CfnHarness.CustomJWTAuthorizerConfigurationProperty( discovery_url="discoveryUrl", # the properties below are optional allowed_audience=["allowedAudience"], allowed_clients=["allowedClients"], allowed_scopes=["allowedScopes"], custom_claims=[bedrockagentcore.CfnHarness.CustomClaimValidationTypeProperty( authorizing_claim_match_value=bedrockagentcore.CfnHarness.AuthorizingClaimMatchValueTypeProperty( claim_match_operator="claimMatchOperator", claim_match_value=bedrockagentcore.CfnHarness.ClaimMatchValueTypeProperty( match_value_string="matchValueString", match_value_string_list=["matchValueStringList"] ) ), inbound_token_claim_name="inboundTokenClaimName", inbound_token_claim_value_type="inboundTokenClaimValueType" )] ) ), environment=bedrockagentcore.CfnHarness.HarnessEnvironmentProviderProperty( agent_core_runtime_environment=bedrockagentcore.CfnHarness.HarnessAgentCoreRuntimeEnvironmentProperty( agent_runtime_arn="agentRuntimeArn", agent_runtime_id="agentRuntimeId", agent_runtime_name="agentRuntimeName", filesystem_configurations=[bedrockagentcore.CfnHarness.FilesystemConfigurationProperty( session_storage=bedrockagentcore.CfnHarness.SessionStorageConfigurationProperty( mount_path="mountPath" ) )], lifecycle_configuration=bedrockagentcore.CfnHarness.LifecycleConfigurationProperty( idle_runtime_session_timeout=123, max_lifetime=123 ), network_configuration=bedrockagentcore.CfnHarness.NetworkConfigurationProperty( network_mode="networkMode", # the properties below are optional network_mode_config=bedrockagentcore.CfnHarness.VpcConfigProperty( security_groups=["securityGroups"], subnets=["subnets"] ) ) ) ), environment_artifact=bedrockagentcore.CfnHarness.HarnessEnvironmentArtifactProperty( container_configuration=bedrockagentcore.CfnHarness.ContainerConfigurationProperty( container_uri="containerUri" ) ), environment_variables={ "environment_variables_key": "environmentVariables" }, max_iterations=123, max_tokens=123, memory=bedrockagentcore.CfnHarness.HarnessMemoryConfigurationProperty( agent_core_memory_configuration=bedrockagentcore.CfnHarness.HarnessAgentCoreMemoryConfigurationProperty( arn="arn", # the properties below are optional actor_id="actorId", messages_count=123, retrieval_config={ "retrieval_config_key": bedrockagentcore.CfnHarness.HarnessAgentCoreMemoryRetrievalConfigProperty( relevance_score=123, strategy_id="strategyId", top_k=123 ) } ) ), skills=[bedrockagentcore.CfnHarness.HarnessSkillProperty( path="path" )], system_prompt=[bedrockagentcore.CfnHarness.HarnessSystemContentBlockProperty( text="text" )], tags=[CfnTag( key="key", value="value" )], timeout_seconds=123, tools=[bedrockagentcore.CfnHarness.HarnessToolProperty( type="type", # the properties below are optional config=bedrockagentcore.CfnHarness.HarnessToolConfigurationProperty( agent_core_browser=bedrockagentcore.CfnHarness.HarnessAgentCoreBrowserConfigProperty( browser_arn="browserArn" ), agent_core_code_interpreter=bedrockagentcore.CfnHarness.HarnessAgentCoreCodeInterpreterConfigProperty( code_interpreter_arn="codeInterpreterArn" ), agent_core_gateway=bedrockagentcore.CfnHarness.HarnessAgentCoreGatewayConfigProperty( gateway_arn="gatewayArn", # the properties below are optional outbound_auth=bedrockagentcore.CfnHarness.HarnessGatewayOutboundAuthProperty( aws_iam=aws_iam, none=none, oauth=bedrockagentcore.CfnHarness.OAuthCredentialProviderProperty( provider_arn="providerArn", scopes=["scopes"], # the properties below are optional custom_parameters={ "custom_parameters_key": "customParameters" }, default_return_url="defaultReturnUrl", grant_type="grantType" ) ) ), inline_function=bedrockagentcore.CfnHarness.HarnessInlineFunctionConfigProperty( description="description", input_schema=input_schema ), remote_mcp=bedrockagentcore.CfnHarness.HarnessRemoteMcpConfigProperty( url="url", # the properties below are optional headers={ "headers_key": "headers" } ) ), name="name" )], truncation=bedrockagentcore.CfnHarness.HarnessTruncationConfigurationProperty( strategy="strategy", # the properties below are optional config=bedrockagentcore.CfnHarness.HarnessTruncationStrategyConfigurationProperty( sliding_window=bedrockagentcore.CfnHarness.HarnessSlidingWindowConfigurationProperty( messages_count=123 ), summarization=bedrockagentcore.CfnHarness.HarnessSummarizationConfigurationProperty( preserve_recent_messages=123, summarization_system_prompt="summarizationSystemPrompt", summary_ratio=123 ) ) ) )
Attributes
- allowed_tools
The tools that the agent is allowed to use.
- authorizer_configuration
-
- Type:
see
- environment
-
- Type:
see
- environment_artifact
-
- Type:
see
- environment_variables
Environment variables to set in the harness runtime environment.
- execution_role_arn
The ARN of the IAM role that the harness assumes when running.
- harness_name
The name of the harness.
- max_iterations
The maximum number of iterations the agent loop can execute per invocation.
- max_tokens
The maximum number of tokens the agent can generate per iteration.
- memory
-
- Type:
see
- model
-
- Type:
see
- skills
The skills available to the agent.
- system_prompt
The system prompt that defines the agent’s behavior.
- tags
Tags to apply to the harness resource.
- timeout_seconds
The maximum duration in seconds for the agent loop execution per invocation.
- tools
The tools available to the agent.