feat: support individual memory deployment without agents#483
feat: support individual memory deployment without agents#483jesseturner21 merged 3 commits intoaws:mainfrom
Conversation
jesseturner21
left a comment
There was a problem hiding this comment.
lgtm a few clarifying comments
tejaskash
left a comment
There was a problem hiding this comment.
Review
Clean, well-tested feature that follows existing patterns nicely. The buildDeployedState options object refactor was overdue — good call.
Items to address
1. Empty agents now omitted from deployed state — verify consumers (moderate)
Previously buildDeployedState always included agents: {} even when empty. Now it returns undefined:
agents: Object.keys(agents).length > 0 ? agents : undefined,Any downstream code that does state.resources.agents[agentName] without optional chaining will break on memory-only deployments. The schema already has agents as .optional(), so this is schema-consistent, but worth grepping for resources.agents or resources?.agents usage across the codebase to confirm all callers handle undefined.
2. useDeployFlow now throws on empty outputs instead of warning (question)
Old behavior — log a warning, deploy succeeds with incomplete state:
logger.log('Warning: Could not retrieve stack outputs after polling', 'warn');New behavior — deploy fails entirely:
throw new Error('Could not retrieve stack outputs after polling...');This is safer for memory-only deploys (where you need memoryId/Arn), but it changes error behavior for all deployments. Is this intentional? If so, worth calling out in the PR description.
3. Missing memory output mismatch warning in actions.ts (minor)
useDeployFlow.ts logs a warning when some memories are missing from outputs:
if (memoryNames.length > 0 && Object.keys(memories).length !== memoryNames.length) {
logger.log(`Deployed-state missing outputs for ...`);
}But the CLI deploy path in actions.ts doesn't have this same check. Both paths should behave consistently.
Nits
AddScreen.tsx: TheuseMemowith empty deps[]wrapping a static array map could just be a module-level constant now thathasAgentsis gone — no functional impact though.
Merge note
No conflicts with #481 (primitive architecture). The only shared file is AddFlow.tsx and the changes are in completely different areas (import path vs prop removal). Either can merge first.
Looks good overall — just confirm items 1 and 2 above.
|
For point 2: It wouldn't actually fail the deploy, it is wrapped in a try/catch. For points 1 and 3, I'm working on addressing them. Thanks for the reivew! |
Description
Enables memory-only deployments — users can deploy memory resources without defining any agents. Adds per-memory output parsing from CloudFormation into
deployed-state.json, removes the agent-gating on the memory add flow, and updates preflight validation.Known limitation:
agentcore statusdoes not yet work for memory-only projects. That will be a fast-follow or could be taken up with issue #473Related Issue
Closes #482
Documentation PR
N/A
Type of Change
Testing
npm run test:unitandnpm run test:integnpm run typechecknpm run lintdeployed-state.jsoncontainsmemoryIdandmemoryArnChecklist
Depends on CDK companion PR: aws/agentcore-l3-cdk-constructs#62
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.