You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improves discoverability of memory configuration documentation by adding contextual hints in CLI output.
Changes:
Added "Swapping or Changing Memory (Strands)" section to docs/memory.md explaining how to change which memory an agent uses
Added "Adding Memory to an Agent Without Memory (Strands)" section with step-by-step instructions
After agentcore add agent: Shows a note with clickable link to relevant docs section based on whether memory was selected
After agentcore add memory: Shows a note explaining memory isn't auto-connected, with link to docs
Links use ink-link (existing pattern from LogLink.tsx) for clickable hyperlinks in supported terminals, with anchor fragments to navigate directly to the relevant section.
Related Issues
N/A
Documentation PR
Documentation is included in this PR (docs/memory.md)
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:all
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
Manually tested by running npm pack && npm install -g and verifying the notes appear after agentcore add agent and agentcore add memory.
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
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.
- Add 'Swapping or Changing Memory (Strands)' section to docs/memory.md
- Add 'Adding Memory to an Agent Without Memory (Strands)' section to docs/memory.md
- Show clickable docs/memory.md link after 'agentcore add agent'
- Show clickable docs/memory.md link after 'agentcore add memory'
- Links use anchors to navigate directly to relevant section
Reviewing this PR (already merged) — flagging a few issues for awareness / potential follow-up:
1. Wrong docs anchor in AddMemoryFlow.tsx (real bug)
In src/cli/tui/screens/memory/AddMemoryFlow.tsx (around line 67 in the diff), the link reads:
Note: See docs/memory.md to learn how to connect memory to your agent.
But the anchor #swapping-or-changing-memory-strands points to the section about swapping an existing connected memory. A user who just ran agentcore add memory typically does not have memory connected to an agent yet — the wording promises "connect memory to your agent" but the link sends them to a swap workflow. The appropriate target is the new section #adding-memory-to-an-agent-without-memory-strands.
Options:
Point at the "Adding Memory to an Agent Without Memory" anchor instead.
Or drop the anchor and link to the top of docs/memory.md, since the user might need either flow.
2. Brittle hardcoded heading anchors
The CLI hardcodes specific anchor fragments (#swapping-or-changing-memory-strands, #adding-memory-to-an-agent-without-memory-strands) into three call sites. There is nothing tying these strings to the headings in docs/memory.md, so any rename of those headings silently breaks the links shipped in the CLI binary.
(Indeed, this has effectively already happened on main in #232 — the headings were renamed to ### Switching Memory and ### Adding Memory to an Agent Without Memory, so the anchors in the source code now 404 against the live doc. That is post-merge fallout, but worth fixing now.)
Options:
Link to the top of docs/memory.md and let the page TOC do the navigation.
Add a small test that asserts each anchor used in source exists as a heading in docs/memory.md (slugify and check), so renames break CI instead of breaking silently in users' terminals.
Centralize the URLs in a single MEMORY_DOCS_URL constant instead of duplicating the base URL across 3 sites.
3. Duplicated logic in AddFlow.tsx
The memoryDocAnchor / memoryNotePrefix block, and the <Box marginTop={1}><Text color="yellow">...</Text></Box> JSX, are duplicated verbatim between the agent-create-success and agent-byo-success branches (lines 290–312 vs 331–353). Worth extracting into a small MemoryDocsHint component (or even a single helper) so the two flows can't drift.
4. No tests for the new conditional branching
The PR's own checklist notes "I have added any necessary tests" is unchecked. The new branching on flow.config.memory !== 'none' produces user-facing strings/links and would be cheap to cover with a snapshot or rendered-output test in AddFlow.tsx / AddMemoryFlow.tsx. Particularly relevant given issue #1 above, which a snapshot test would have surfaced.
(Skipping telemetry — this is a static UI hint with no user action to instrument.)
Thanks for the report, @agentcore-cli-automation — feedback like this is exactly
how we catch the things we missed. Because this PR is already
closed, the team won't see follow-up comments here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improves discoverability of memory configuration documentation by adding contextual hints in CLI output.
Changes:
Links use ink-link (existing pattern from LogLink.tsx) for clickable hyperlinks in supported terminals, with anchor fragments to navigate directly to the relevant section.
Related Issues
N/A
Documentation PR
Documentation is included in this PR (docs/memory.md)
Type of Change
Testing
How have you tested the change?
Manually tested by running npm pack && npm install -g and verifying the notes appear after agentcore add agent and agentcore add memory.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.