Skip to content

feat: enable memory in agentcore dev#801

Merged
Hweinstock merged 1 commit intoaws:mainfrom
avi-alpert:aalpert/memory-dev
Apr 9, 2026
Merged

feat: enable memory in agentcore dev#801
Hweinstock merged 1 commit intoaws:mainfrom
avi-alpert:aalpert/memory-dev

Conversation

@avi-alpert
Copy link
Copy Markdown
Contributor

@avi-alpert avi-alpert commented Apr 9, 2026

Description

Enables memory support in agentcore dev by injecting deployed memory IDs as environment variables into the local dev server process. Previously, the dev server showed a blanket warning that memory was unavailable locally. Now, if memories have been deployed via agentcore deploy, their IDs are read from deployed state and passed as MEMORY_<NAME>_ID env vars — allowing agents to use memory during local development.

Changes:

  • Add memory-env.ts module that reads deployed state and generates MEMORY_*_ID env vars from all deployment targets
  • Merge memory env vars into the dev server environment (alongside gateway env vars), with .env.local overrides taking precedence
  • Replace the blanket "memory not available locally" warning with a smarter check that only warns when configured memories haven't been deployed yet
  • Update warning copy to guide users: "run agentcore deploy and restart dev"
  • Add unit tests for getMemoryEnvVars covering deployed memories, multiple targets, missing state, and edge cases

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Manual testing was done with a Strands agent only. Other agent frameworks have not been tested.

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
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • 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.

@github-actions github-actions bot added the size/m PR size: M label Apr 9, 2026
@avi-alpert avi-alpert marked this pull request as ready for review April 9, 2026 18:34
@avi-alpert avi-alpert requested review from a team and padmak30 April 9, 2026 18:34
@Hweinstock Hweinstock merged commit 04c3785 into aws:main Apr 9, 2026
25 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.

4 participants