Skip to content

feat: add EPISODIC memory strategy support#651

Open
tejaskash wants to merge 10 commits intomainfrom
episodic-memory-strategy
Open

feat: add EPISODIC memory strategy support#651
tejaskash wants to merge 10 commits intomainfrom
episodic-memory-strategy

Conversation

@tejaskash
Copy link
Contributor

@tejaskash tejaskash commented Mar 25, 2026

Summary

  • Adds EPISODIC as a new memory strategy type across the CLI: schema, primitives, TUI, templates, and docs
  • EPISODIC strategy requires reflectionNamespaces (service requirement); enforced via Zod schema refinement
  • Default namespaces and reflectionNamespaces are auto-populated for EPISODIC when creating memories via TUI or CLI flags
  • longAndShortTerm memory preset now includes all 4 strategies (SEMANTIC, SUMMARIZATION, USER_PREFERENCE, EPISODIC)

Depends on CDK PR: https://github.com/aws/agentcore-l3-cdk-constructs/pull/108

TUI Walkthrough

1. Select "Add" from the main menu

Help Screen

2. Choose "Memory" resource

Add Resource

3. Enter memory name

Memory Name

4. Strategy picker now shows EPISODIC

Strategies Picker

5. All 4 strategies selected including EPISODIC

All Strategies Selected

6. Review screen confirms EPISODIC

Confirm Screen

7. Memory created successfully

Success Screen

8. Resulting agentcore.json

EPISODIC strategy is persisted with both namespaces and reflectionNamespaces:

{
  "type": "EPISODIC",
  "namespaces": ["/episodes/{actorId}/{sessionId}"],
  "reflectionNamespaces": ["/reflections/{actorId}"]
}

Test plan

  • Unit tests: Zod refinement tests (accepts/rejects EPISODIC with/without reflectionNamespaces)
  • Unit tests: create command verifies EPISODIC in longAndShortTerm preset
  • Integration tests: add memory --strategies EPISODIC verifies reflectionNamespaces in config
  • Integration tests: create-memory longAndShortTerm verifies all 4 strategies
  • TUI integration test: full Add Memory wizard flow selecting EPISODIC
  • E2E test: strands-bedrock-memory deploys with longAndShortTerm (includes EPISODIC)
  • TUI screenshots captured showing the full EPISODIC selection flow

Hweinstock and others added 7 commits March 25, 2026 15:30
Add EPISODIC as a new memory strategy type across the CLI:
- Schema enum with default episode namespace (/strategy/{memoryStrategyId}/actor/{actorId}/)
- Default reflection namespaces for episodic (required by the service)
- reflectionNamespaces field on MemoryStrategy schema
- CLI validation, help text, and TUI descriptions
- longAndShortTerm preset now includes EPISODIC
- LLM-compacted schema and AGENTS.md docs
- Unit and integration tests
Add Zod refinement to MemoryStrategySchema that requires
reflectionNamespaces when strategy type is EPISODIC, matching the
AWS service requirement. Update docs/commands.md and docs/memory.md
to document the EPISODIC strategy and reflectionNamespaces field.
- Add strands-bedrock-memory E2E test that deploys with longAndShortTerm
  memory (includes all 4 strategies including EPISODIC)
- Extend e2e-helper to support configurable memory option
- Strengthen integ create-memory test to verify EPISODIC strategy is
  present with reflectionNamespaces in longAndShortTerm preset
- create.test.ts: verify EPISODIC with namespaces and reflectionNamespaces
  in longAndShortTerm preset
- add-remove-resources integ: verify `add memory --strategies EPISODIC`
  persists reflectionNamespaces in agentcore.json
- TUI test: drive Add Memory wizard through strategy multi-select,
  verify EPISODIC is persisted with correct config in agentcore.json
@tejaskash tejaskash requested a review from a team March 25, 2026 19:34
@github-actions github-actions bot added the size/m PR size: M label Mar 25, 2026
@github-actions github-actions bot added size/l PR size: L and removed size/m PR size: M labels Mar 25, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 45.25% 5939 / 13122
🔵 Statements 44.86% 6308 / 14061
🔵 Functions 44.53% 1108 / 2488
🔵 Branches 45.65% 3903 / 8549
Generated in workflow #1317 for commit 61aa996 by the Vitest Coverage Report Action

@github-actions github-actions bot added size/l PR size: L and removed size/l PR size: L labels Mar 25, 2026
@github-actions github-actions bot added size/l PR size: L and removed size/l PR size: L labels Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants