class EvaluationLevel
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.BedrockAgentCore.EvaluationLevel |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrockagentcore#EvaluationLevel |
Java | software.amazon.awscdk.services.bedrockagentcore.EvaluationLevel |
Python | aws_cdk.aws_bedrockagentcore.EvaluationLevel |
TypeScript (source) | aws-cdk-lib » aws_bedrockagentcore » EvaluationLevel |
The level at which a custom evaluator assesses agent performance.
Determines what granularity of data the evaluator operates on.
Example
// Create a custom LLM-as-a-Judge evaluator
const evaluator = new agentcore.Evaluator(this, 'MyEvaluator', {
evaluatorName: 'my_custom_evaluator',
level: agentcore.EvaluationLevel.SESSION,
evaluatorConfig: agentcore.EvaluatorConfig.llmAsAJudge({
instructions: 'Evaluate whether the agent response is helpful and accurate.',
modelId: 'us.anthropic.claude-sonnet-4-6',
ratingScale: agentcore.EvaluatorRatingScale.categorical([
{ label: 'Good', definition: 'The response is helpful and accurate.' },
{ label: 'Bad', definition: 'The response is not helpful or contains errors.' },
]),
}),
});
// Use the custom evaluator in an online evaluation configuration
new agentcore.OnlineEvaluationConfig(this, 'MyEvaluation', {
onlineEvaluationConfigName: 'my_evaluation',
evaluators: [
agentcore.EvaluatorSelector.builtin(agentcore.BuiltinEvaluator.HELPFULNESS),
agentcore.EvaluatorSelector.custom(evaluator),
],
dataSource: agentcore.DataSourceConfig.fromCloudWatchLogs({
logGroupNames: ['/aws/bedrock-agentcore/my-agent'],
serviceNames: ['my-agent.default'],
}),
});
Initializer
new EvaluationLevel(value: string)
Parameters
- value
string— - The evaluation level string.
Properties
| Name | Type | Description |
|---|---|---|
| value | string | The string value of the evaluation level. |
| static SESSION | Evaluation | Evaluates an entire agent session (multiple traces across a conversation). |
| static TOOL_CALL | Evaluation | Evaluates individual tool call invocations within a trace. |
| static TRACE | Evaluation | Evaluates a complete agent trace (a single request-response cycle). |
value
Type:
string
The string value of the evaluation level.
static SESSION
Type:
Evaluation
Evaluates an entire agent session (multiple traces across a conversation).
static TOOL_CALL
Type:
Evaluation
Evaluates individual tool call invocations within a trace.
static TRACE
Type:
Evaluation
Evaluates a complete agent trace (a single request-response cycle).

.NET
Go
Java
Python
TypeScript (