Skip to content

fix(evaluator): include user_message placeholder for TOOL_CALL evaluators - #2064

Merged
aidandaly24 merged 1 commit into
mainfrom
fix/tool-call-user-message-placeholder
Aug 21, 2026
Merged

fix(evaluator): include user_message placeholder for TOOL_CALL evaluators#2064
aidandaly24 merged 1 commit into
mainfrom
fix/tool-call-user-message-placeholder

Conversation

@jariy17

@jariy17 jariy17 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What

Add the user_message skill placeholder to the Tool-level (TOOL_CALL) prompt-template allowlist so the agentcore add evaluator wizard and the instruction-validation hint surface it.

Why

AgentCore Evaluations supports user_message as a Tool-level skill placeholder — "the user request in the turn that triggered the skill invocation" (see prompt templates docs). LEVEL_PLACEHOLDERS.TOOL_CALL omitted 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 — validateInstructionPlaceholders only 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: add user_message
  • PLACEHOLDER_DESCRIPTIONS: add its description
  • Test: assert TOOL_CALL exposes user_message

Testing

  • vitest run on the evaluator types test — 27/27 pass
  • Verified live in the TUI: agentcore add → Evaluator → LLM-as-a-Judge → Tool Call → Prompt now lists {user_message}

…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
@jariy17
jariy17 requested a review from a team August 21, 2026 16:37
@github-actions github-actions Bot added the size/xs PR size: XS label Aug 21, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 21, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 21, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.27.1.tgz

How to install

gh 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

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 40.82% 15346 / 37594
🔵 Statements 40.07% 16361 / 40822
🔵 Functions 34.98% 2625 / 7504
🔵 Branches 34.06% 10221 / 30005
Generated in workflow #4380 for commit 3079478 by the Vitest Coverage Report Action

@aidandaly24
aidandaly24 merged commit c4d178c into main Aug 21, 2026
37 checks passed
@aidandaly24
aidandaly24 deleted the fix/tool-call-user-message-placeholder branch August 21, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants