feat(eval): add eval evaluator CLI commands (CRUD + LLaJ/code-based)#1822
Open
jariy17 wants to merge 3 commits into
Open
feat(eval): add eval evaluator CLI commands (CRUD + LLaJ/code-based)#1822jariy17 wants to merge 3 commits into
jariy17 wants to merge 3 commits into
Conversation
Add the imperative `agentcore eval evaluator` command surface: llm-as-a-judge create/update, code-based create/update, and type-agnostic get/list/delete. CLI-only for now; the TUI follows later. - New CoreEvalClient (consumer-owned interface) + EvalClient impl over the Bedrock AgentCore control plane. Update paths do get-then-merge since UpdateEvaluator replaces the whole evaluatorConfig union. - Rating scale accepts a preset (--rating-scale) or raw JSON (--rating-scale-json). - Source-aware field values: inline, file://<path>, or - for stdin. - --timeout has no CLI default; the service applies its own. - list --type filters the returned page client-side (the API paginates only): Builtin | code-based | llm-as-a-judge. - delete requires --yes (headless-safe confirmation). Tests: handler behavior via TestCoreClient, EvalClient get-then-merge unit tests, and source resolver tests.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## refactor #1822 +/- ##
============================================
- Coverage 94.84% 94.45% -0.40%
============================================
Files 143 153 +10
Lines 7120 7589 +469
============================================
+ Hits 6753 7168 +415
- Misses 367 421 +54 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
added 2 commits
July 23, 2026 22:19
A single --rating-scale flag now takes either a preset id or a source-aware custom RatingScale (JSON inline, file://<path>, or -). A value matching a known preset id expands to that preset; anything else is parsed as a RatingScale JSON value.
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
Adds the imperative
agentcore eval evaluatorcommand surface (CLI only). Covers LLM-as-a-Judge and code-based evaluator create/update plus type-agnostic get/list/delete, following the DevX Evaluations/Optimization refactor doc and the existingidentityhandler conventions.Command structure
Flags
eval evaluator llm-as-a-judge create--name--levelSESSION | TRACE | TOOL_CALL--model--instructionsfile://<path>, or-(stdin)--rating-scale1-5-quality | 1-3-simple | pass-fail | good-neutral-bad--rating-scale-jsonRatingScaleJSON (source-aware). Mutually exclusive with--rating-scale; exactly one required--kms-key-arn--tags--client-tokeneval evaluator llm-as-a-judge update--id--instructions--model--rating-scale/--rating-scale-json--kms-key-arn--client-tokenFields left unset are preserved:
UpdateEvaluatorreplaces the wholeevaluatorConfigunion, so the client does get-then-merge over the current definition.eval evaluator code-based create--name--levelSESSION | TRACE | TOOL_CALL--lambda-arn--timeout--kms-key-arn--tags--client-tokeneval evaluator code-based update--id--lambda-arn--timeout--kms-key-arn--client-tokeneval evaluator get--ideval evaluator list--next-token--max-results--typeBuiltin | code-based | llm-as-a-judge. The ListEvaluators API paginates only, so the filter is page-localeval evaluator delete--id--yesNotes / decisions
--instructions,--rating-scale-json,--tags): inline,file://<path>, or-for stdin, following the AWS CLIfile://convention. One flag reads stdin per command.--timeouthas no CLI default; the service default applies when omitted.CoreEvalClientis declared next to the handlers (src/handlers/eval/types.tsx) and implemented insrc/core/eval.tsx.Testing
bun test— full suite green (356 tests).bun run typecheck,bun run lint:check,bun run format:check— clean.bun run build+ bundle smoke (node dist/index.js eval evaluator --help) — works.TestCoreClient,EvalClientget-then-merge unit tests, and source-resolver tests.TUI flows for these commands will come in a later PR.