You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds support for the new namespaceTemplates control-plane field. namespaceTemplates replaces namespaces on strategy configurations with clearer naming, as strategy namespace values have always been templates resolved at ingestion time, not literal namespaces. The old namespaces field is deprecated but remains accepted for backward compatibility.
agentcore.json schema accepts namespaceTemplates and reflectionNamespaceTemplates on strategy definitions. Old namespaces / reflectionNamespaces still validate. Specifying both the deprecated and preferred form for the same concept is rejected.
Strategy creation flows (agentcore create --memory longAndShortTerm, agentcore add memory) now write namespaceTemplates / reflectionNamespaceTemplates in the generated config.
Response parsing (getMemoryDetail) reads either field from the service and surfaces the new name to downstream code.
Import flow (agentcore import memory) writes the new field names to local config regardless of which form the service returned.
Dev web UI resources view exposes namespaceTemplates in the API, with fallback to namespaces for legacy data.
JSON schema (schemas/agentcore.schema.v1.json) regenerated from Zod to include the new fields.
Docs (docs/memory.md, docs/configuration.md) updated to show namespaceTemplates as primary with a deprecation note for the old name.
Type of Change
Bug fix
New feature
Breaking change
Documentation update
[ x ] Other (please describe): Deprecation of field and addition of replacement in CP methods
Testing
How have you tested the change?
[ x ] I ran npm run test:unit and npm run test:integ
[ x ] I ran npm run typecheck
[ x ] I ran npm run lint
If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots
Checklist
[ x ] I have read the CONTRIBUTING document
[ x ] I have added any necessary tests that prove my fix is effective or my feature works
[ x ] I have updated the documentation accordingly
[ x ] I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
[ x ] My changes generate no new warnings
Any dependent changes have been merged and published
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.
The local schema, config writers (create, add memory, import memory), and service response parser have been switched over to namespaceTemplates / reflectionNamespaceTemplates, but the CDK L3 constructs in @aws/agentcore-cdk (currently ^0.1.0-alpha.19, latest published 0.1.0-alpha.22) have not been updated. src/cdk/constructs/components/primitives/memory/AgentCoreMemory.ts in agentcore-l3-cdk-constructs still reads:
and its MemoryStrategySchema only defines namespaces / reflectionNamespaces.
The deploy flow in src/assets/cdk/bin/cdk.ts passes agentcore.json straight through to AgentCoreStack → AgentCoreApplication with no translation. After this PR:
Running agentcore create --memory longAndShortTerm followed by agentcore deploy will produce a spec whose strategy objects carry namespaceTemplates / reflectionNamespaceTemplates. The L3 construct only looks at namespaces / reflectionNamespaces, so:
Non-EPISODIC strategies silently deploy with no namespace scoping (and grantWithAccess / collectNamespacePatterns will also see no namespaces, so IAM grants lose their namespace conditions).
EPISODIC strategies will fail the service call because reflectionConfiguration is never emitted and EPISODIC requires it.
agentcore import memory now writes namespaceTemplates into local config, so re-deploying an imported memory has the same problem.
The Zod schema's deprecated-alias fallback doesn't help here because the CLI always writes the new field names, so by the time the L3 construct reads the spec, only namespaceTemplates is populated.
Possible fixes
Land the L3 construct change first and bump the pinned version. Update agentcore-l3-cdk-constructs (schema + AgentCoreMemory, including collectNamespacePatterns / grantWithAccess) to accept namespaceTemplates / reflectionNamespaceTemplates (with fallback to the deprecated names), publish a new @aws/agentcore-cdk version, bump src/assets/cdk/package.json to that version, and merge this PR on top of that. This matches the "Any dependent changes have been merged and published" checklist item, which is currently unchecked.
Keep writing the old field names in config and only translate on read. Have create/add memory/import memory continue to emit namespaces / reflectionNamespaces in agentcore.json for now, so the unchanged L3 constructs keep working. The schema can still accept namespaceTemplates as input from users, but normalize to the old name before persisting. Then flip the persisted form in a follow-up once the L3 side is updated.
Add a translation layer in the vended CDK app. In src/assets/cdk/bin/cdk.ts (or a thin adapter), normalize namespaceTemplates → namespaces on each strategy before passing spec to AgentCoreStack. This is the smallest change but leaves a hidden coupling and will need to be removed once the L3 constructs catch up.
Option 1 is cleanest; 2 or 3 are reasonable if the L3 change can't ship in lockstep.
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
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 the new
namespaceTemplatescontrol-plane field.namespaceTemplatesreplacesnamespaceson strategy configurations with clearer naming, as strategy namespace values have always been templates resolved at ingestion time, not literal namespaces. The old namespaces field is deprecated but remains accepted for backward compatibility.agentcore create --memory longAndShortTerm,agentcore add memory) now write namespaceTemplates / reflectionNamespaceTemplates in the generated config.agentcore import memory) writes the new field names to local config regardless of which form the service returned.namespaceTemplatesin the API, with fallback tonamespacesfor legacy data.namespaceTemplatesas primary with a deprecation note for the old name.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.