Skip to content

feat(memory): Do not add the default memory where AgentCore Memory is not available - #2960

Closed
vvargu wants to merge 1 commit into
box-integrationfrom
box/memory-region-limit
Closed

vvargu wants to merge 1 commit into
box-integrationfrom
box/memory-region-limit

Conversation

@vvargu

@vvargu vvargu commented Nov 30, 2026

Copy link
Copy Markdown

Summary

AgentCore Memory is not available in eu-south-1, ap-southeast-5, and ap-southeast-7. Before this change, a template with memory (for example agent-python-strands-box) added its default memory in these regions, and the deploy could not provision it.

Now the CLI drops the default memory in these regions, the same as it already does in China regions.

  • agentcore create drops the default memory when the region has no Memory.
  • agentcore add runtime drops it when a deployment target is in such a region. When the project has no target yet, the CLI's resolved region is used.
  • The note names the region: AgentCore Memory is not available in eu-south-1; scaffolding without the default memory. China keeps its current message.

The rendered agent code keeps the memory module, which does nothing when no memory is configured. So a user can add a memory later with no code change.

Changes

  • src/core/partition.ts: add NO_MEMORY_REGIONS and supportsMemory(region). To support a new region, remove it from the set.
  • src/handlers/project/create/region.ts: stripCreateRegionUnavailableDefaults uses supportsMemory.
  • src/core/project/manager.tsx: move the default-memory drop out of the China-only block in addResource, and use supportsMemory for all project regions. Add memoryStrippedMessage(region).

Not in scope

An explicit agentcore add memory in these regions is not blocked. Only the automatic default is removed.

Testing

  • New tests for supportsMemory, stripCreateRegionUnavailableDefaults, and the add runtime path (target region and resolved region, and a region with Memory).
  • bun test src/core/partition.test.ts src/core/project src/handlers/project: 3543 pass, 3 fail. The 3 failures are the "the box on PATH" tests. They call the local box binary (0.3.1), which does not have the flags they need. This change does not touch that code.
  • bun run typecheck and oxlint pass.
  • Manual: AWS_REGION=eu-south-1 agentcore create --template agent-python-strands-box makes a project with no memory and prints the note. With us-east-1, the project still has agentMemory.

… not available

AgentCore Memory is not available in eu-south-1, ap-southeast-5, and
ap-southeast-7. A template with memory now drops its default memory in
these regions, the same as in China regions.

- Add NO_MEMORY_REGIONS and supportsMemory(region) to core/partition.
- agentcore create uses supportsMemory to drop the default memory.
- agentcore add runtime uses it for the target regions, or for the
  resolved region when the project has no target.
- The note names the region. China keeps its current message.
@vvargu
vvargu requested a review from a team November 30, 2026 07:14
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.87%. Comparing base (5393054) to head (3e88e21).
⚠️ Report is 129 commits behind head on box-integration.

Additional details and impacted files
@@               Coverage Diff                @@
##           box-integration    #2960   +/-   ##
================================================
  Coverage            96.87%   96.87%           
================================================
  Files                  774      774           
  Lines                68744    68769   +25     
================================================
+ Hits                 66593    66618   +25     
  Misses                2151     2151           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vvargu vvargu closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants