AI Cloud Architect

Build custom code-based evaluators in Amazon Bedrock AgentCore

AWSHow-to by Bharathi Srinivasan, Hardik Vasa and Shoaib JavedAWS Artificial Intelligence Blog

In this post, you will implement four Lambda-based custom code evaluators for a financial market-intelligence agent, register each with AgentCore, and run them in on-demand and online modes. You will also see how to combine custom code-based evaluators with built-in evaluators and how to call other AWS services for grounded fact-checking, PII detection, and real-time alerting.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

AgentCore now lets you run your own Lambda functions as evaluators, scoring agent traces, tool calls or sessions deterministically, in both on-demand and online modes.

Who it is for

Teams running agents on Amazon Bedrock AgentCore that need deterministic checks for prices, schemas, workflow order or PII.

Key points

  • Up to 10 evaluators can be referenced per on-demand call or online configuration, mixing code-based and built-in types.
  • Evaluators run at TRACE, TOOL_CALL or SESSION level, registered separately per level.
  • Online sampling ranges from 0.01 to 100 percent; the post says the sample setup costs under $5 at default rates.
  • The sample uses Amazon Comprehend DetectPiiEntities; a regex variant is included for environments without Comprehend.

The same at other vendors

Timeline

Posts about Amazon Bedrock AgentCore Evaluations, oldest first.

  1. New featureAmazon CloudWatch GenAI observability now supports Amazon AgentCore Evaluations · AWS · Announcement
  2. Blog postEvaluating AI agents: Real-world lessons from building agentic systems at Amazon · AWS · Blog post
  3. Generally availableAmazon Bedrock AgentCore Evaluations is now generally available · AWS · AnnouncementAlso published by AWS Artificial Intelligence Blog
  4. This postBuild custom code-based evaluators in Amazon Bedrock AgentCore
  5. Blog postEvaluate any agent framework with Amazon Bedrock AgentCore Evaluations · AWS · Blog post
  6. Blog postMonitoring production agent lifecycle with AWS DevOps Agent and AgentCore Evaluations · AWS · Blog post
  7. How-toEvaluating multi-agent systems for explainability and helpfulness with Amazon Bedrock AgentCore · AWS · How-to
  8. Blog postBuilding trust in AI agents: A production-ready evaluation framework with Amazon Bedrock AgentCore · AWS · Blog post
  9. How-toUse decision models with Amazon Bedrock AgentCore Evaluations · AWS · How-to
Show all 10 posts
  1. New featureAmazon CloudWatch GenAI observability now supports Amazon AgentCore Evaluations · AWS · Announcement
  2. Blog postEvaluating AI agents: Real-world lessons from building agentic systems at Amazon · AWS · Blog post
  3. Generally availableAmazon Bedrock AgentCore Evaluations is now generally available · AWS · AnnouncementAlso published by AWS Artificial Intelligence Blog
  4. This postBuild custom code-based evaluators in Amazon Bedrock AgentCore
  5. Blog postEvaluate any agent framework with Amazon Bedrock AgentCore Evaluations · AWS · Blog post
  6. Blog postMonitoring production agent lifecycle with AWS DevOps Agent and AgentCore Evaluations · AWS · Blog post
  7. How-toEvaluating multi-agent systems for explainability and helpfulness with Amazon Bedrock AgentCore · AWS · How-to
  8. Blog postBuilding trust in AI agents: A production-ready evaluation framework with Amazon Bedrock AgentCore · AWS · Blog post
  9. How-toUse decision models with Amazon Bedrock AgentCore Evaluations · AWS · How-to
  10. How-toThe agent evaluation playbook: Built-in, DeepEval, and AutoEval on Amazon Bedrock AgentCore Evaluations · AWS · How-to

Go deeper