aws / aws/bedrock-agentcore-starter-toolkit

"AgentCore BatchEvaluationRunner fails on custom runtime agents: 'no spans to evaluate' despite correct tracer scope and span attributes"

Open
#535 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
508
Forks
155
Avg merge
8h 50m
Merged PRs (30d)
4

Description

I have a custom RAG agent deployed on AgentCore Runtime that retrieves from Bedrock Knowledge Base and generates responses using Bedrock Converse API. The agent has observability enabled and successfully produces
traces in CloudWatch.

Agent setup:
- Custom Python handler using BedrockAgentCoreApp
- Retrieves from Knowledge Base
- Generates answers via bedrock-runtime.converse()
- Observability enabled with traces in aws/spans log group

Problem:
When running BatchEvaluationRunner with Builtin.Correctness and Builtin.GoalSuccessRate evaluators, all sessions fail with:

error.message: "Provided input has no spans to evaluate. Please ensure that spans provided in the request are valid and have model/tool/agent invocation details for the provided scope"

The evaluators find the traces but report "no spans to evaluate" despite having all required attributes.

Question:

Do built-in AgentCore evaluators only support Bedrock Agents Classic, or should they work with custom AgentCore runtime agents that implement RAG with Knowledge Base + Bedrock LLM? In addition, it is stated in prerequisites that only Strands Agents or LangGraph with opentelemetry-instrumentation-langchain or openinference-instrumentation-langchain are supported. So if i am producing simple OpenTelemetry (OTEL) traces, agentcore evaluations do not work?

Contributor guide

Open the contributing guide

Research direction

Start with the BatchEvaluationRunner path and the Builtin.Correctness and Builtin.GoalSuccessRate evaluators named in the issue. Compare the span scope and invocation attributes they require with the custom OTEL traces described; done means establishing whether custom AgentCore runtime traces are supported and documenting the required instrumentation or the resulting limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
ai, observability-sre, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.