Skip to content

feat: add streamDeliveryResources schema, CLI flags, and validation for memory record streaming#531

Merged
Hweinstock merged 3 commits intoaws:mainfrom
Hweinstock:feature/stream-delivery-resources
Apr 8, 2026
Merged

feat: add streamDeliveryResources schema, CLI flags, and validation for memory record streaming#531
Hweinstock merged 3 commits intoaws:mainfrom
Hweinstock:feature/stream-delivery-resources

Conversation

@Hweinstock
Copy link
Copy Markdown
Contributor

@Hweinstock Hweinstock commented Mar 10, 2026

NOTE: Do not merge, dependent on unreleased CDK changes.

Description

Problem

Customers have no way to receive real-time notifications when memory records change, forcing them to poll APIs to detect new data.

Solution

Added streamDeliveryResources support to agentcore add memory, allowing customers to configure push-based delivery of memory record events to a target (e.g. Kinesis Data Stream).

  • CLI flags: --data-stream-arn, --stream-content-level, --delivery-type
  • Advanced input: --stream-delivery-resources for inline JSON.
  • Docs: added Memory Record Streaming section to docs/memory.md

Depends on a corresponding CDK construct change.

Related Issue

Closes #528

Documentation PR

N/A

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

  • agentcore add memory with --data-stream-arn and --stream-content-level flat flags — config written correctly to agentcore.json

  • agentcore add memory with --stream-delivery-resources inline JSON — config written correctly

  • agentcore deploy — stack deployed successfully and created memories with streams.

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 (NO)

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/l PR size: L label Mar 10, 2026
@Hweinstock Hweinstock changed the title feat(memory): add streamDeliveryResources support for memory record streaming feat: add streamDeliveryResources support for memory record streaming to Kinesis Mar 10, 2026
@Hweinstock Hweinstock force-pushed the feature/stream-delivery-resources branch from d1bb32b to bfede65 Compare March 10, 2026 21:06
@github-actions github-actions bot added size/l PR size: L and removed size/l PR size: L labels Mar 10, 2026
@Hweinstock Hweinstock force-pushed the feature/stream-delivery-resources branch from bfede65 to 001b33b Compare March 10, 2026 21:15
@github-actions github-actions bot added size/m PR size: M and removed size/l PR size: L labels Mar 10, 2026
@Hweinstock Hweinstock force-pushed the feature/stream-delivery-resources branch from 001b33b to 12741cd Compare March 10, 2026 21:18
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 10, 2026
@Hweinstock Hweinstock changed the title feat: add streamDeliveryResources support for memory record streaming to Kinesis feat: add streamDeliveryResources schema, CLI flags, and validation for memory record streaming Mar 10, 2026
- Replace unsafe `as MemoryStrategyType` casts with Zod parse
- Include deliveryType in streamDeliveryResources conflict check
- Reject deliveryType without dataStreamArn
- Validate streamDeliveryResources JSON eagerly in validator
- Include Zod error details in parseStreamDeliveryResources
- Extract DEFAULT_DELIVERY_TYPE constant
- Tighten createMemory strategies param type
@Hweinstock Hweinstock force-pushed the feature/stream-delivery-resources branch from 12741cd to 8202106 Compare April 6, 2026 20:24
@github-actions github-actions bot removed the size/m PR size: M label Apr 6, 2026
@github-actions github-actions bot added the size/l PR size: L label Apr 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

Package Tarball

aws-agentcore-0.6.0.tgz

How to install

npm install https://github.com/aws/agentcore-cli/releases/download/pr-531-tarball/aws-agentcore-0.6.0.tgz

CUSTOM is not a valid MemoryStrategyType. The previous test relied on
an unsafe `as` cast to pass an invalid strategy through. Now that we
use Zod parse, invalid strategies are correctly rejected.
@github-actions github-actions bot added size/l PR size: L and removed size/l PR size: L labels Apr 6, 2026
@Hweinstock Hweinstock marked this pull request as ready for review April 6, 2026 22:19
@Hweinstock Hweinstock requested a review from a team April 6, 2026 22:19
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.

looks good!

@Hweinstock Hweinstock merged commit a8a1f79 into aws:main Apr 8, 2026
21 checks passed
@Hweinstock Hweinstock deleted the feature/stream-delivery-resources branch April 8, 2026 12:30
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.

feat: add support for memory record streaming

2 participants