Generic framework support
Amazon Bedrock AgentCore Evaluations reads telemetry through two open standards: the OpenTelemetry generative AI semantic conventions and the OpenInference semantic conventions. Alongside the frameworks that have their own page in this section, the service supports any agent that emits telemetry in one of these two conventions. This is generic framework support.
Use generic framework support when you build with a framework that has no page in this section, or when you write your own instrumentation for a custom agent. Configure your instrumentation to emit the scope name, span attributes, and identifying attributes described on this page, and the service identifies your spans and extracts the values that evaluators need, using the same span classification and field extraction as the named frameworks.
Because your framework’s own data structures are not known in advance, the service extracts each value as a string rather than parsing it into a framework-specific structure. Keep prompts, responses, and tool arguments in the attributes listed in How evaluation fields are extracted, rather than wrapped in your own structure such as a nested request object or a custom message envelope, so that evaluators receive clean values.
Topics
Supported conventions
The service selects how to read each span from the span’s scope.name. Set your instrumentation’s scope name to one of the following prefixes, and the service reads the span with the matching convention:
| Convention | Scope name prefix |
|---|---|
|
OpenTelemetry |
|
|
OpenInference |
|
If a scope has a page of its own in this section, the service uses the handling described on that page instead. Generic framework support applies to every other scope that matches one of these prefixes.
Some scopes match the OpenTelemetry prefixes but are not GenAI agent frameworks. These are transport and infrastructure instrumentation, such as HTTP clients (httpx, urllib3, urllib, aiohttp_client), web frameworks (starlette, fastapi), the Model Context Protocol (MCP) instrumentation, and the AWS SDK (botocore) instrumentation, including its bedrock-agentcore and bedrock-runtime scopes. The service excludes these scopes from generic framework support so that their spans do not produce spurious agent, tool, or inference spans.
How spans are identified
The service classifies each span into one of three types using the standard identifying attribute for its convention. Set this attribute on every span you want evaluated. Its value tells the service what the span represents, and the service reads it from the span itself, regardless of where the conversation content is stored.
Example
How evaluation fields are extracted
For each classified span, the service reads the values it needs, such as the user prompt, agent response, and tool inputs and outputs. As with the named frameworks, where the conversation content sits depends on the telemetry delivery mode. With split telemetry, the content lives in the correlated event record. With unified telemetry, it stays on the span as attributes. For more information, see Telemetry setup and delivery.
The service tries several locations for each field and uses the first one that holds a value, so you can emit whichever attribute your instrumentation already sets. Each extracted value is stringified rather than parsed into a framework-specific structure.
OpenTelemetry convention
For frameworks using the OpenTelemetry convention, the service reads each field from the following locations, in order:
-
User prompt (invoke agent span): from the event record
body.input; then from thegen_ai.task.inputspan attribute. -
Agent response (invoke agent span): from the event record
body.output; then from thegen_ai.task.outputspan attribute. If neither is present, the service falls back to the first user message and last assistant message it collected from the trace’s inference spans. -
Inference messages (inference span): from the event record
body.input.messagesandbody.output.messages; then from thegen_ai.input.messagesandgen_ai.output.messagesspan attributes. -
Tool name (execute tool span): from the
gen_ai.tool.namespan attribute; then from thetraceloop.entity.namespan attribute. -
Tool arguments (execute tool span): from the
gen_ai.tool.call.argumentsspan attribute; then from the event recordbody.input; then from thetraceloop.entity.inputspan attribute. -
Tool result (execute tool span): from the
gen_ai.tool.call.resultspan attribute; then from the event recordbody.output; then from thetraceloop.entity.outputspan attribute. -
System prompt (inference span): from the
gen_ai.system_instructionsspan attribute.
OpenInference convention
For frameworks using the OpenInference convention, the service reads each field from the following locations, in order:
-
User prompt (invoke agent span): from the
input.valuespan attribute; then from the event record body input. -
Agent response (invoke agent span): from the
output.valuespan attribute; then from the event record body output. -
Inference messages (inference span): from the span’s OpenInference message attributes (for example,
llm.input_messages.*andllm.output_messages.*); then frominput.valueandoutput.value; then from the event record body. -
Tool arguments (execute tool span): from the
input.valuespan attribute; then from the event record body input. -
Tool result (execute tool span): from the
output.valuespan attribute; then from the event record body output. -
System prompt (inference span): from the inference span attributes; then from the event record body.
-
Available tools: from the inference span’s tool-definition attributes (
llm.tools.*); then parsed from the serialized request in the event record body orinput.value.
Configuration requirements
To get evaluated with generic framework support, configure your instrumentation as follows:
-
Use a recognized scope name. Emit spans under a scope name that starts with
opentelemetry.instrumentation.*oropeninference.instrumentation.*. The service reads only these prefixes with generic framework support. -
Set an identifying attribute on every span. Set
gen_ai.operation.nameortraceloop.span.kindfor the OpenTelemetry convention, oropeninference.span.kindfor the OpenInference convention. The service skips a span that carries no recognized identifying attribute. -
Put content in the documented attributes. Set the prompt, response, and tool attributes listed in How evaluation fields are extracted. If you wrap these values in your own structure, the extracted value includes that surrounding structure, because the service stringifies content rather than parsing your framework’s data model.
If you cannot set convention attributes, you can still evaluate the top-level agent turn. Set the agentcore.invocation.user_prompt and agentcore.invocation.agent_response span attributes, which the AgentCore SDK also emits. The service reads these attributes from any scope, and they cover the agent prompt and response only, not inference or tool spans.