Skip to content

feat(memory): add read-only memory commands - #1836

Merged
tejaskash merged 5 commits into
refactorfrom
feat/memory-read-only-cli
Jul 30, 2026
Merged

feat(memory): add read-only memory commands#1836
tejaskash merged 5 commits into
refactorfrom
feat/memory-read-only-cli

Conversation

@notgitika

@notgitika notgitika commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This PR adds the first Memory surface to the refactored CLI with Read-only commands.

Users can fetch a Memory with agentcore memory get --id <memoryId> and list Memories with service-side pagination through --max-results and --next-token. get also supports the full and without_decryption response views.

The commands are backed by a feature-scoped core MemoryClient using the AWS SDK. This also wires Memory into the root command tree and test client, adds fixture-backed command coverage, and updates the REAMDE.

Out of scope: data plane operations, memory mutations, TUI.

Next PR would be: dedicated TUI flows

Ran the bun CI checks and bun build successfully.

Manually tested all these commands E2E on my account and they were all successful and working as expected

@github-actions github-actions Bot added agentcore-harness-reviewing AgentCore Harness review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Jul 27, 2026
@codecov-commenter

codecov-commenter commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.64%. Comparing base (034ad39) to head (cf2f5d5).

Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #1836      +/-   ##
============================================
+ Coverage     95.60%   95.64%   +0.03%     
============================================
  Files           181      185       +4     
  Lines          8834     8909      +75     
============================================
+ Hits           8446     8521      +75     
  Misses          388      388              

☔ 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.

@notgitika
notgitika marked this pull request as ready for review July 27, 2026 19:06
@notgitika

Copy link
Copy Markdown
Contributor Author

AI review failing because of a bug. Fix: #1823

@Hweinstock Hweinstock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one question on TUI behavior, otherwise lgtm.

Comment thread src/handlers/memory/get/index.tsx Outdated
name: "list",
description: "list AgentCore Memories",
flags: [
flag("next-token", "pagination token returned by a previous request", z.string().optional()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OOS here, but curious to others thoughts. Do we think its worth defining a shared flag for stuff like this? We already have the same definitions for runtime, harness, and now memory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, I’d prefer to keep that refactor out of this PR and follow up separately so it will be a follow-up once this is merged

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe we can raise as a parking lot. I do think there's an advantage to making them explicit so I'm curious to hear others' thoughts.

@notgitika
notgitika force-pushed the feat/memory-read-only-cli branch from 92d38f6 to 346e476 Compare July 29, 2026 01:26
…only-cli

# Conflicts:
#	README.md
#	src/handlers/index.tsx
#	src/handlers/root.test.tsx
#	src/testing/TestCoreClient.tsx
@notgitika

Copy link
Copy Markdown
Contributor Author

Follow up PR: shared flags

Comment thread src/handlers/memory/get/index.tsx Outdated
Comment thread src/handlers/memory/memory.test.tsx Outdated
- get: throw InputValidationError (modeled exception) instead of a raw
  TypeError when the required --id flag is omitted, matching current
  consensus error handling.
- fixtures: replace the synthetic Memory fixtures (which RECORD=1 could
  not regenerate, since the IDs did not exist and recording overwrote the
  successes with not-found errors) with responses recorded against two
  persistent fixture Memories in the e2e-test account, matching Runtime
  and Identity. Assert an opaque list nextToken rather than a hand-authored
  value.
Hweinstock
Hweinstock previously approved these changes Jul 29, 2026

@Hweinstock Hweinstock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice!

aidandaly24
aidandaly24 previously approved these changes Jul 29, 2026
@notgitika
notgitika dismissed stale reviews from aidandaly24 and Hweinstock via cf2f5d5 July 29, 2026 22:30
@notgitika
notgitika requested a review from aidandaly24 July 30, 2026 15:27
@tejaskash
tejaskash merged commit ff00267 into refactor Jul 30, 2026
8 checks passed
@tejaskash
tejaskash deleted the feat/memory-read-only-cli branch July 30, 2026 16:42
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.

5 participants