BedrockAgentCoreClient.evaluate
rboto-bedrock-agentcore==0.4.0 · Service index · Types
Model summary (excerpt): Performs on-demand evaluation of agent traces using a specified evaluator. This synchronous API accepts traces in OpenTelemetry format and returns immediate scoring results with detailed explanations.
Install and imports
from rboto import BedrockAgentCoreClient
from collections.abc import Sequence
from rboto_bedrock_agentcore.types import (
EvaluateOutput,
EvaluationInput,
EvaluationReferenceInput,
EvaluationTarget,
)
Signature
async def evaluate(
*,
evaluator_id: str,
evaluation_input: EvaluationInput,
evaluation_target: EvaluationTarget | None = None,
evaluation_reference_inputs: Sequence[EvaluationReferenceInput] | None = None,
) -> EvaluateOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
evaluator_id |
Yes | The unique identifier of the evaluator to use for scoring. Can be a built-in evaluator (e.g., Builtin.Helpfulness , Builtin.Correctness ) or a custom evaluator Id created through the control plane API. |
evaluation_input |
Yes | The input data containing agent session spans to be evaluated. Includes a list of spans in OpenTelemetry format from supported frameworks like Strands (AgentCore Runtime) or LangGraph with OpenInference instrumentation. |
evaluation_target |
No | The specific trace or span IDs to evaluate within the provided input. Allows targeting evaluation at different levels: individual tool calls, single request-response interactions (traces), or entire conversation sessions. |
evaluation_reference_inputs |
No | Ground truth data to compare against agent responses during evaluation. Allows to provide expected responses, assertions, and expected tool trajectories at different evaluation levels. Session-level reference inputs apply to the entire conversation, while trace-level reference inputs target specific request-response interactions identified by trace ID. |
Output
EvaluateOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
evaluation_results |
list[EvaluationResultContentOutput] |
Always present | EvaluationResultContentOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
EvaluateOutput, EvaluationInput, EvaluationReferenceInput, EvaluationTarget
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_bedrock_agentcore.exceptions:
AccessDeniedError, ConflictError, DuplicateIdError, InternalServerError, ResourceNotFoundError, ServiceQuotaExceededError, ThrottlingError, UnauthorizedError, ValidationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.