fix(evaluator): include user_message placeholder for TOOL_CALL evaluators - #2064
Merged
Merged
Conversation
…tors The Tool-level (TOOL_CALL) prompt-template allowlist omitted the user_message skill placeholder that AgentCore Evaluations supports, so the add-evaluator wizard and the validation error text never surfaced it. Add it to LEVEL_PLACEHOLDERS.TOOL_CALL and PLACEHOLDER_DESCRIPTIONS, and assert it in the placeholder test. Ref: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/prompt-templates-builtin.html
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
Package TarballHow to installgh release download pr-2064-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.27.1.tgz |
Contributor
Coverage Report
|
aidandaly24
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add the
user_messageskill placeholder to the Tool-level (TOOL_CALL) prompt-template allowlist so theagentcore addevaluator wizard and the instruction-validation hint surface it.Why
AgentCore Evaluations supports
user_messageas a Tool-level skill placeholder — "the user request in the turn that triggered the skill invocation" (see prompt templates docs).LEVEL_PLACEHOLDERS.TOOL_CALLomitted it, so it never appeared in the wizard's "Available placeholders" list or the validation error text.Note: this is a discoverability fix, not a functional unblock —
validateInstructionPlaceholdersonly requires one recognized placeholder and passes instructions through verbatim, so users could already type{user_message}manually alongside e.g.{tool_turn}.Changes
LEVEL_PLACEHOLDERS.TOOL_CALL: adduser_messagePLACEHOLDER_DESCRIPTIONS: add its descriptionTOOL_CALLexposesuser_messageTesting
vitest runon the evaluator types test — 27/27 passagentcore add→ Evaluator → LLM-as-a-Judge → Tool Call → Prompt now lists{user_message}