Skip to content

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

Open
notgitika wants to merge 1 commit into
refactorfrom
feat/memory-read-only-cli
Open

feat(memory): add read-only memory commands#1836
notgitika wants to merge 1 commit 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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.94%. Comparing base (b57ed51) to head (930b10d).

Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #1836      +/-   ##
============================================
+ Coverage     94.89%   94.94%   +0.04%     
============================================
  Files           151      155       +4     
  Lines          7421     7493      +72     
============================================
+ Hits           7042     7114      +72     
  Misses          379      379              

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

description: "get an AgentCore Memory",
flags: [
flag("id", "the ID of the Memory", z.string().optional()),
flag("view", "response view", z.enum(MEMORY_VIEWS).default("full")),

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.

does providing a default at this level make still make it possible to open the TUI with no flags? Would the default cause the check in

export function withTuiOnEmptyFlagsAndArgs(core: Core, io: AppIO): Middleware {
to fail?

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.

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.

3 participants