class EvaluationLevel
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.EvaluationLevel |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#EvaluationLevel |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.EvaluationLevel |
Python | aws_cdk.aws_bedrock_agentcore_alpha.EvaluationLevel |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป 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.EvaluatorReference.builtin(agentcore.BuiltinEvaluator.HELPFULNESS),
agentcore.EvaluatorReference.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 (