Skip to content

feat: support individual memory deployment without agents#483

Merged
jesseturner21 merged 3 commits intoaws:mainfrom
notgitika:feat/individual-memory-deployment
Mar 5, 2026
Merged

feat: support individual memory deployment without agents#483
jesseturner21 merged 3 commits intoaws:mainfrom
notgitika:feat/individual-memory-deployment

Conversation

@notgitika
Copy link
Copy Markdown
Contributor

@notgitika notgitika commented Mar 3, 2026

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 status does not yet work for memory-only projects. That will be a fast-follow or could be taken up with issue #473

Related Issue

Closes #482

Documentation PR

N/A

Type of Change

  • New feature

Testing

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • Manually deployed a memory-only project and verified it deployed in CfN stack, resource existed in AC Memory, deployed-state.json contains memoryId and memoryArn

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

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.

@notgitika notgitika requested a review from a team March 3, 2026 01:15
@github-actions github-actions bot added the size/m PR size: M label Mar 3, 2026
@notgitika notgitika changed the title feat: support deploying memories independently without agents feat: support individual memory deployment without agents Mar 3, 2026
jesseturner21
jesseturner21 previously approved these changes Mar 4, 2026
Copy link
Copy Markdown
Contributor

@jesseturner21 jesseturner21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm a few clarifying comments

@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 4, 2026
Copy link
Copy Markdown
Contributor

@tejaskash tejaskash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: The useMemo with empty deps [] wrapping a static array map could just be a module-level constant now that hasAgents is 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.

@notgitika
Copy link
Copy Markdown
Contributor Author

@tejaskash

For point 2: It wouldn't actually fail the deploy, it is wrapped in a try/catch.
So the deploy still reports success, we just warn that the state couldn't be recorded

For points 1 and 3, I'm working on addressing them. Thanks for the reivew!

@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 4, 2026
Copy link
Copy Markdown
Contributor

@tejaskash tejaskash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@jesseturner21 jesseturner21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweeet

@jesseturner21 jesseturner21 merged commit a75112e into aws:main Mar 5, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support deploying memories independently without agents

3 participants