---
title: "POST /online-evaluation-configs/create"
method: POST
path: "/online-evaluation-configs/create"
---

# POST /online-evaluation-configs/create

`POST /online-evaluation-configs/create`

Creates an online evaluation configuration for continuous monitoring of agent performance. Online evaluation automatically samples live traffic from CloudWatch logs at specified rates and applies evaluators to assess agent quality in production.

## Request body

- object
  - `clientToken` string — A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.
  - `onlineEvaluationConfigName` string, required — The name of the online evaluation configuration. Must be unique within your account.
  - `description` string, password — The description of the online evaluation configuration that explains its monitoring purpose and scope.
  - `rule` object, required — The evaluation rule that defines sampling configuration, filtering criteria, and session detection settings for online evaluation.
    - `samplingConfig` object — The sampling configuration that determines what percentage of agent traces to evaluate.
      - `samplingPercentage` number, double, required — The percentage of agent traces to sample for evaluation, ranging from 0.01% to 100%.
    - `filters` Filter[] — The list of filters that determine which agent traces should be included in the evaluation based on trace properties.
      - `key` string, required — The key or field name to filter on within the agent trace data.
      - `operator` 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'GreaterThanOrEqual' | 'LessThanOrEqual' | 'Contains' | 'NotContains', required — The comparison operator to use for filtering.
      - `value` object, required — The value to compare against using the specified operator.
        - `stringValue` string — The string value for text-based filtering.
        - `doubleValue` number, double — The numeric value for numerical filtering and comparisons.
        - `booleanValue` boolean — The boolean value for true/false filtering conditions.
    - `sessionConfig` object — The session configuration that defines timeout settings for detecting when agent sessions are complete and ready for evaluation.
      - `sessionTimeoutMinutes` integer, required — The number of minutes of inactivity after which an agent session is considered complete and ready for evaluation. Default is 15 minutes.
  - `dataSourceConfig` object, required — The configuration that specifies where to read agent traces for online evaluation.
    - `cloudWatchLogs` object — The CloudWatch logs configuration for reading agent traces from log groups.
      - `logGroupNames` LogGroupName[], required — The list of CloudWatch log group names to monitor for agent traces.
      - `serviceNames` ServiceName[], required — The list of service names to filter traces within the specified log groups. Used to identify relevant agent sessions.
  - `evaluators` EvaluatorReference[] — The list of evaluators to apply during online evaluation. Can include both built-in evaluators and custom evaluators created with <code>CreateEvaluator</code>.
    - `evaluatorId` string — The unique identifier of the evaluator. Can reference builtin evaluators (e.g., Builtin.Helpfulness) or custom evaluators.
  - `insights` Insight[] — The list of insight types to run against agent sessions.
    - `insightId` string, required — The unique identifier of the insight to run.
  - `clusteringConfig` object — Configuration for periodic batch evaluation clustering, specifying how often clustering jobs run.
    - `frequencies` ClusteringFrequency[] — The list of frequencies at which clustering batch evaluations are triggered.
  - `evaluationExecutionRoleArn` string, required — The Amazon Resource Name (ARN) of the IAM role that grants permissions to read from CloudWatch logs, write evaluation results, and invoke Amazon Bedrock models for evaluation. If the configuration references evaluators encrypted with a customer managed KMS key, this role must also have <code>kms:Decrypt</code> permission on the KMS key. The service validates this permission at configuration creation time. For more information, see <a href="https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/evaluations-encryption.html">Encryption at rest for AgentCore Evaluations</a>.
  - `enableOnCreate` boolean, required — Whether to enable the online evaluation configuration immediately upon creation. If true, evaluation begins automatically.
  - `tags` object — A map of tag keys and values to assign to an AgentCore Online Evaluation Config. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.

## Response `202`

Success

- CreateOnlineEvaluationConfigResponse
  - `onlineEvaluationConfigArn` string, required — The Amazon Resource Name (ARN) of the created online evaluation configuration.
  - `onlineEvaluationConfigId` string, required — The unique identifier of the created online evaluation configuration.
  - `createdAt` string, date-time, required — The timestamp when the online evaluation configuration was created.
  - `outputConfig` OutputConfig — The configuration that specifies where evaluation results should be written for monitoring and analysis.
    - `cloudWatchConfig` object, required — The CloudWatch configuration for writing evaluation results to CloudWatch logs with embedded metric format.
      - `logGroupName` string, required — The name of the CloudWatch log group where evaluation results will be written. The log group will be created if it doesn't exist.
  - `status` 'ACTIVE' | 'CREATING' | 'CREATE_FAILED' | 'UPDATING' | 'UPDATE_FAILED' | 'DELETING' | 'ERROR', required — The status of the online evaluation configuration.
  - `executionStatus` 'ENABLED' | 'DISABLED', required — The execution status indicating whether the online evaluation is currently running.
  - `failureReason` string — The reason for failure if the online evaluation configuration creation or execution failed.

## Other responses

- `480` — ServiceQuotaExceededException
- `481` — ValidationException
- `482` — AccessDeniedException
- `483` — ConflictException
- `484` — ThrottlingException
- `485` — InternalServerException

---

[API](https://skmtc.net/aws/apis/bedrock-agentcore-control.md) · [All operations](https://skmtc.net/aws/apis/bedrock-agentcore-control/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock-agentcore-control/versions/0ebde766792b/schema)
