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

Properties for defining a CfnHarness.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-allowedtools

authorizer_configuration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-authorizerconfiguration

Type:

see

environment

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-environment

Type:

see

environment_artifact

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-environmentartifact

Type:

see

environment_variables

Environment variables to set in the harness runtime environment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-environmentvariables

execution_role_arn

The ARN of the IAM role that the harness assumes when running.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-executionrolearn

harness_name

The name of the harness.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-harnessname

max_iterations

The maximum number of iterations the agent loop can execute per invocation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-maxiterations

max_tokens

The maximum number of tokens the agent can generate per iteration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-maxtokens

memory

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-memory

Type:

see

model

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-model

Type:

see

skills

The skills available to the agent.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-skills

system_prompt

The system prompt that defines the agent’s behavior.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-systemprompt

tags

Tags to apply to the harness resource.

See:

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

timeout_seconds

The maximum duration in seconds for the agent loop execution per invocation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-timeoutseconds

tools

The tools available to the agent.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-tools

truncation

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-harness.html#cfn-bedrockagentcore-harness-truncation

Type:

see