OnlineEvaluationConfigProps

class aws_cdk.aws_bedrock_agentcore_alpha.OnlineEvaluationConfigProps(*, online_evaluation_config_name, description=None, execution_role=None, execution_status=None, filters=None, sampling_percentage=None, session_timeout=None, data_source, evaluators, tags=None)

Bases: OnlineEvaluationBaseProps

(experimental) Properties for creating an OnlineEvaluationConfig.

Parameters:
  • online_evaluation_config_name (str) – (experimental) The name of the online evaluation configuration. Must be unique within your account. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long.

  • description (Optional[str]) – (experimental) The description of the online evaluation configuration. Default: - No description

  • execution_role (Optional[IRole]) – (experimental) The IAM role that provides permissions for the evaluation to access AWS services. If not provided, a role will be created automatically with the required permissions including cross-region Bedrock model invocation (to support cross-region inference profiles). For strict cost controls or data residency compliance, provide a custom role with region-scoped permissions. Default: - A new role will be created

  • execution_status (Optional[ExecutionStatus]) – (experimental) The execution status of the online evaluation configuration. Controls whether the evaluation actively processes agent traces. Default: ExecutionStatus.ENABLED

  • filters (Optional[Sequence[Union[FilterConfig, Dict[str, Any]]]]) – (experimental) The list of filters that determine which agent traces should be evaluated. Default: - No filters (evaluate all sampled traces)

  • sampling_percentage (Union[int, float, None]) – (experimental) The percentage of agent traces to sample for evaluation. Default: 10

  • session_timeout (Optional[Duration]) – (experimental) The duration of inactivity after which an agent session is considered complete and ready for evaluation. Must be between 1 minute and 1440 minutes (24 hours). Default: Duration.minutes(15)

  • data_source (DataSourceConfig) – (experimental) The data source configuration that specifies where to read agent traces from.

  • evaluators (Sequence[EvaluatorReference]) – (experimental) The list of evaluators to apply during online evaluation. Can include both built-in evaluators and custom evaluators.

  • tags (Optional[Mapping[str, str]]) – (experimental) Tags for the online evaluation configuration. A list of key:value pairs of tags to apply to this OnlineEvaluationConfig resource. Default: - No tags

Stability:

experimental

ExampleMetadata:

fixture=default infused

Example:

# custom_evaluator: agentcore.Evaluator


evaluation = agentcore.OnlineEvaluationConfig(self, "MixedEvaluation",
    online_evaluation_config_name="mixed_evaluation",
    evaluators=[
        # Built-in evaluators
        agentcore.EvaluatorReference.builtin(agentcore.BuiltinEvaluator.HELPFULNESS),
        agentcore.EvaluatorReference.builtin(agentcore.BuiltinEvaluator.CORRECTNESS),
        # Custom evaluator
        agentcore.EvaluatorReference.custom(custom_evaluator)
    ],
    data_source=agentcore.DataSourceConfig.from_cloud_watch_logs(
        log_group_names=["/aws/bedrock-agentcore/my-agent"],
        service_names=["my-agent.default"]
    )
)

Attributes

data_source

(experimental) The data source configuration that specifies where to read agent traces from.

Stability:

experimental

description

(experimental) The description of the online evaluation configuration.

Default:
  • No description

Stability:

experimental

MaxLength:

200

evaluators

(experimental) The list of evaluators to apply during online evaluation.

Can include both built-in evaluators and custom evaluators.

Stability:

experimental

Maximum:

10

Minimum:

1

execution_role

(experimental) The IAM role that provides permissions for the evaluation to access AWS services.

If not provided, a role will be created automatically with the required permissions including cross-region Bedrock model invocation (to support cross-region inference profiles). For strict cost controls or data residency compliance, provide a custom role with region-scoped permissions.

Default:
  • A new role will be created

Stability:

experimental

execution_status

(experimental) The execution status of the online evaluation configuration.

Controls whether the evaluation actively processes agent traces.

Default:

ExecutionStatus.ENABLED

Stability:

experimental

filters

(experimental) The list of filters that determine which agent traces should be evaluated.

Default:
  • No filters (evaluate all sampled traces)

Stability:

experimental

Maximum:

5

online_evaluation_config_name

(experimental) The name of the online evaluation configuration.

Must be unique within your account. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long.

Stability:

experimental

Pattern:

^[a-zA-Z][a-zA-Z0-9_]{0,47}$

sampling_percentage

(experimental) The percentage of agent traces to sample for evaluation.

Default:

10

Stability:

experimental

Maximum:

100

Minimum:

0.01

session_timeout

(experimental) The duration of inactivity after which an agent session is considered complete and ready for evaluation.

Must be between 1 minute and 1440 minutes (24 hours).

Default:

Duration.minutes(15)

Stability:

experimental

tags

(experimental) Tags for the online evaluation configuration.

A list of key:value pairs of tags to apply to this OnlineEvaluationConfig resource.

Default:
  • No tags

Stability:

experimental