import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an AWS Bedrock AgentCore Evaluator. An evaluator scores how an agent performs. You can configure it in one of two ways: an LLM-as-a-Judge evaluator that uses a model to score agent behavior against your instructions and a rating scale, or a code-based evaluator that runs a Lambda function you provide. * * ## Example Usage * * ### LLM-as-a-Judge with Numerical Rating Scale * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.AgentcoreEvaluator("example", { * evaluatorConfig: { * llmAsAJudge: { * ratingScale: { * numericals: [ * { * definition: "Not helpful at all.", * value: 1, * label: "1", * }, * { * definition: "Extremely helpful.", * value: 5, * label: "5", * }, * ], * }, * modelConfig: { * bedrockEvaluatorModelConfig: { * inferenceConfig: { * maxTokens: 1024, * temperature: 0, * topP: 1, * }, * modelId: "us.amazon.nova-2-lite-v1:0", * }, * }, * instructions: "Given the {context} and the {assistant_turn}, compare against {expected_response} and rate from 1 to 5.", * }, * }, * evaluatorName: "helpfulness_evaluator", * description: "Rates assistant helpfulness from 1 to 5", * level: "TRACE", * }); * ``` * * ### LLM-as-a-Judge with Categorical Rating Scale * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.AgentcoreEvaluator("example", { * evaluatorConfig: { * llmAsAJudge: { * ratingScale: { * categoricals: [ * { * definition: "Friendly, helpful tone.", * label: "POSITIVE", * }, * { * definition: "Neutral or terse tone.", * label: "NEUTRAL", * }, * { * definition: "Unhelpful or dismissive tone.", * label: "NEGATIVE", * }, * ], * }, * modelConfig: { * bedrockEvaluatorModelConfig: { * modelId: "us.amazon.nova-2-lite-v1:0", * }, * }, * instructions: "Classify the tone of the {assistant_turn} given the {context}.", * }, * }, * evaluatorName: "tone_evaluator", * level: "SESSION", * }); * ``` * * ### Code-based Evaluator (Lambda) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.bedrock.AgentcoreEvaluator("example", { * evaluatorConfig: { * codeBased: { * lambdaConfig: { * lambdaArn: exampleAwsLambdaFunction.arn, * lambdaTimeoutInSeconds: 60, * }, * }, * }, * evaluatorName: "lambda_evaluator", * level: "TOOL_CALL", * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `evaluatorId` (String) Unique identifier of the evaluator. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Bedrock AgentCore Evaluator using the evaluator ID. For example: * * ```sh * $ pulumi import aws:bedrock/agentcoreEvaluator:AgentcoreEvaluator example helpfulness_evaluator-abc1234567 * ``` */ export declare class AgentcoreEvaluator extends pulumi.CustomResource { /** * Get an existing AgentcoreEvaluator resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AgentcoreEvaluatorState, opts?: pulumi.CustomResourceOptions): AgentcoreEvaluator; /** * Returns true if the given object is an instance of AgentcoreEvaluator. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AgentcoreEvaluator; /** * Timestamp when the evaluator was created. */ readonly createdAt: pulumi.Output; /** * Description of the evaluator. Length 1–200. */ readonly description: pulumi.Output; /** * ARN of the evaluator. */ readonly evaluatorArn: pulumi.Output; /** * Configuration that defines how the evaluator assesses agent performance. See `evaluatorConfig` below. */ readonly evaluatorConfig: pulumi.Output; /** * Unique identifier of the evaluator. */ readonly evaluatorId: pulumi.Output; /** * Name of the evaluator. Must match the pattern `^[a-zA-Z][a-zA-Z0-9_]{0,47}$`. */ readonly evaluatorName: pulumi.Output; /** * ARN of a customer-managed KMS key used to encrypt the evaluator's sensitive data. Only symmetric encryption keys are supported. */ readonly kmsKeyArn: pulumi.Output; /** * Evaluation level that determines the scope of evaluation. Valid values: `TOOL_CALL`, `TRACE`, `SESSION`. * * The following arguments are optional: */ readonly level: pulumi.Output; /** * Whether the evaluator is locked because it is in use by an active online evaluation. */ readonly lockedForModification: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Current status of the evaluator. */ readonly status: pulumi.Output; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; readonly timeouts: pulumi.Output; /** * Create a AgentcoreEvaluator resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AgentcoreEvaluatorArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AgentcoreEvaluator resources. */ export interface AgentcoreEvaluatorState { /** * Timestamp when the evaluator was created. */ createdAt?: pulumi.Input; /** * Description of the evaluator. Length 1–200. */ description?: pulumi.Input; /** * ARN of the evaluator. */ evaluatorArn?: pulumi.Input; /** * Configuration that defines how the evaluator assesses agent performance. See `evaluatorConfig` below. */ evaluatorConfig?: pulumi.Input; /** * Unique identifier of the evaluator. */ evaluatorId?: pulumi.Input; /** * Name of the evaluator. Must match the pattern `^[a-zA-Z][a-zA-Z0-9_]{0,47}$`. */ evaluatorName?: pulumi.Input; /** * ARN of a customer-managed KMS key used to encrypt the evaluator's sensitive data. Only symmetric encryption keys are supported. */ kmsKeyArn?: pulumi.Input; /** * Evaluation level that determines the scope of evaluation. Valid values: `TOOL_CALL`, `TRACE`, `SESSION`. * * The following arguments are optional: */ level?: pulumi.Input; /** * Whether the evaluator is locked because it is in use by an active online evaluation. */ lockedForModification?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Current status of the evaluator. */ status?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a AgentcoreEvaluator resource. */ export interface AgentcoreEvaluatorArgs { /** * Description of the evaluator. Length 1–200. */ description?: pulumi.Input; /** * Configuration that defines how the evaluator assesses agent performance. See `evaluatorConfig` below. */ evaluatorConfig: pulumi.Input; /** * Name of the evaluator. Must match the pattern `^[a-zA-Z][a-zA-Z0-9_]{0,47}$`. */ evaluatorName: pulumi.Input; /** * ARN of a customer-managed KMS key used to encrypt the evaluator's sensitive data. Only symmetric encryption keys are supported. */ kmsKeyArn?: pulumi.Input; /** * Evaluation level that determines the scope of evaluation. Valid values: `TOOL_CALL`, `TRACE`, `SESSION`. * * The following arguments are optional: */ level: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; } //# sourceMappingURL=agentcoreEvaluator.d.ts.map