feat: add support for LTM metadata#1281
Open
nborges-aws wants to merge 2 commits into
Open
Conversation
Contributor
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-1281-tarball/aws-agentcore-0.14.0.tgz |
Contributor
Coverage Report
|
agentcore-cli-automation
suggested changes
May 16, 2026
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
Nice feature with a tight scope and good unit-test coverage on the parser/validator. A few things to address before merging:
- The TUI re-hydrates indexed-key state by calling
setStateduring render — should be auseEffectto avoid Strict-Mode warnings and double-render surprises. - The TUI key-name validation duplicates the regex/length rules that already live in
indexed-key-parser.ts. Reuse the shared constants so they can't drift. add.memorytelemetry doesn't capture anything about indexed keys. Persrc/cli/telemetry/README.mdnew features should be instrumented (e.g.indexed_key_count/has_indexed_keys).
There's also a minor UX papercut on Esc-back from the key-type sub-step (the previously-typed key name is silently lost) — non-blocking but worth tightening up while you're in here.
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.
Description
Adds support for AgentCore Memory's indexed metadata keys to the CLI. Indexed keys are declared at the memory level and enable filtering LTM records on retrieval. Each key has a name and a value type (STRING, STRINGLIST, NUMBER). There is a 10 key max per memory.
Schema:
IndexedKeyTypeSchemaenum andIndexedKeySchemainagentcore-project.tsMemorySchemagains optional indexedKeys field with 10 key max, enforced uniqueness, and a superRefine that rejects indexedKeys when no strategies are present.Non-interactive CLI:
--indexed-key <key:TYPE>flag onagentcore add memory. Accumulates into a list, parsed by a sharedparseIndexedKeyArghelper inindexed-key-parser.tsInteractive TUI:
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.