Skip to content

feat(memory): add interactive TUI browser for exploring memory content#451

Merged
jariy17 merged 1 commit intoaws:mainfrom
IanKonlog:feature/memory-browse
Feb 13, 2026
Merged

feat(memory): add interactive TUI browser for exploring memory content#451
jariy17 merged 1 commit intoaws:mainfrom
IanKonlog:feature/memory-browse

Conversation

@IanKonlog
Copy link
Copy Markdown
Contributor

@IanKonlog IanKonlog commented Feb 5, 2026

Add a new 'agentcore memory browse' command that provides an interactive terminal UI for exploring AgentCore Memory content.

Features:

  • Navigate through actors, sessions, events (STM) and namespaces, records (LTM)
  • Keyboard navigation: ↑↓ navigate, Enter select, b back, h home, v verbose, m more, q quit
  • Glass UI design with Rich tables and cyan highlighting
  • Proper API pagination for all list operations (actors, sessions, events, records)
  • Breadcrumb display showing current navigation path
  • Cursor preservation when navigating back

Also includes:

  • Pagination support for list_actors and list_sessions APIs
  • Tests to maintain 88% coverage threshold

Description

Brief description of changes

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Testing

  • Unit tests pass locally
  • Integration tests pass (if applicable)
  • Test coverage remains above 80%
  • Manual testing completed

Checklist

  • My code follows the project's style guidelines (ruff/pre-commit)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Security Checklist

  • No hardcoded secrets or credentials
  • No new security warnings from bandit
  • Dependencies are from trusted sources
  • No sensitive data logged

Breaking Changes

List any breaking changes and migration instructions:

N/A

Additional Notes

Screen.Recording.2026-02-11.at.5.04.39.PM.mov

Comment thread src/bedrock_agentcore_starter_toolkit/cli/memory/browser.py
Comment thread src/bedrock_agentcore_starter_toolkit/cli/memory/browser.py
Comment thread src/bedrock_agentcore_starter_toolkit/operations/memory/manager.py Outdated
@theumbrella1
Copy link
Copy Markdown
Contributor

nit: add test coverage on actual TUI interactions with keyboard bindings (do we have integ tests to update?)

@theumbrella1
Copy link
Copy Markdown
Contributor

When looking at the memory events, I wonder if we can combine the conversational content in one entry, so that user doesn't have to go into each individual entry and view only one event at a time? (events would be grouped by actor id and session id, and all the events would be consolidated into one json)

@jariy17
Copy link
Copy Markdown
Contributor

jariy17 commented Feb 10, 2026

I'm going to merge this PR. This creates list events objects like so

[
    {
      "eventId": "0000001770674253605#92ad3147",
      "eventTimestamp": "2026-02-09T16:57:33",
      "payload": [
        {"conversational": {"role": "ASSISTANT", "content": {"text": "Three."}}},
        {"conversational": {"role": "USER", "content": {"text": "Say four."}}},
        {"conversational": {"role": "ASSISTANT", "content": {"text": "Four."}}}
      ]
    },
    {
      "eventId": "0000001770674246605#f110dd58",
      "eventTimestamp": "2026-02-09T16:57:26",
      "payload": [
        {"conversational": {"role": "USER", "content": {"text": "Say one."}}},
        {"conversational": {"role": "ASSISTANT", "content": {"text": "One."}}},
        {"conversational": {"role": "USER", "content": {"text": "Say two."}}},
        {"conversational": {"role": "ASSISTANT", "content": {"text": "Two."}}},
        {"conversational": {"role": "USER", "content": {"text": "Say three."}}}
      ]
    }
  ]

Can this PR handle it?

@IanKonlog
Copy link
Copy Markdown
Contributor Author

When looking at the memory events, I wonder if we can combine the conversational content in one entry, so that user doesn't have to go into each individual entry and view only one event at a time? (events would be grouped by actor id and session id, and all the events would be consolidated into one json)

I am assuming this is the change referenced

[
    {
      "eventId": "0000001770674253605#92ad3147",
      "eventTimestamp": "2026-02-09T16:57:33",
      "payload": [
        {"conversational": {"role": "ASSISTANT", "content": {"text": "Three."}}},
        {"conversational": {"role": "USER", "content": {"text": "Say four."}}},
        {"conversational": {"role": "ASSISTANT", "content": {"text": "Four."}}}
      ]
    },
    {
      "eventId": "0000001770674246605#f110dd58",
      "eventTimestamp": "2026-02-09T16:57:26",
      "payload": [
        {"conversational": {"role": "USER", "content": {"text": "Say one."}}},
        {"conversational": {"role": "ASSISTANT", "content": {"text": "One."}}},
        {"conversational": {"role": "USER", "content": {"text": "Say two."}}},
        {"conversational": {"role": "ASSISTANT", "content": {"text": "Two."}}},
        {"conversational": {"role": "USER", "content": {"text": "Say three."}}}
      ]
    }
  ]

It can be incorporated

@jariy17
Copy link
Copy Markdown
Contributor

jariy17 commented Feb 10, 2026

UX: Unclear error message in _resolve_memory_config() (commands.py:102-108)

The error hint:

2. --agent AGENT_NAME (requires config with memory)

should clarify that when --agent is not provided, it defaults to the default_agent set in .bedrock_agentcore.yaml. Something like:

2. --agent AGENT_NAME (defaults to default_agent in .bedrock_agentcore.yaml)

Also, the error doesn't distinguish between "no YAML found" vs "YAML found but memory_id is not set." If the user is in a directory with a valid config but hasn't run agentcore launch yet, this message is confusing — it tells them to do what they already did.

@jariy17
Copy link
Copy Markdown
Contributor

jariy17 commented Feb 10, 2026

UX: Home page navigation is confusing (browser.py:234-246)

The starting page shows:

[a] Actors (STM)
[n] Namespaces (LTM)

This isn't discoverable — you have to know to press a or n. Meanwhile the bottom control bar shows [↑↓] navigate [Enter] select, but there's nothing to navigate or select on this screen. The up/down/enter keys do nothing on the home view.

These should be selectable list items instead, so the user can arrow-key to "Actors (STM)" or "Namespaces (LTM)" and press Enter — consistent with how every other view in the browser works.

Comment thread src/bedrock_agentcore_starter_toolkit/cli/memory/browser.py Outdated
Comment thread src/bedrock_agentcore_starter_toolkit/cli/memory/browser.py Outdated
Comment thread src/bedrock_agentcore_starter_toolkit/cli/memory/browser.py Outdated
Comment thread src/bedrock_agentcore_starter_toolkit/cli/memory/browser.py Outdated
Comment thread src/bedrock_agentcore_starter_toolkit/cli/memory/commands.py Outdated
Comment thread src/bedrock_agentcore_starter_toolkit/operations/memory/manager.py
Comment thread src/bedrock_agentcore_starter_toolkit/operations/memory/manager.py Outdated
Comment thread src/bedrock_agentcore_starter_toolkit/operations/memory/manager.py
Comment thread src/bedrock_agentcore_starter_toolkit/operations/memory/manager.py Outdated
Comment thread tests/client/test_memory.py Outdated
Add a new 'agentcore memory browse' command that provides an interactive
terminal UI for exploring AgentCore Memory content.

Features:
- Navigate through actors, sessions, events (STM) and namespaces, records (LTM)
- Keyboard navigation: ↑↓ navigate, Enter select, b back, h home, v verbose, m more, q quit
- Glass UI design with Rich tables and cyan highlighting
- Proper API pagination for all list operations (actors, sessions, events, records)
- Breadcrumb display showing current navigation path
- Cursor preservation when navigating back

Also includes:
- Pagination support for list_actors and list_sessions APIs
- Tests to maintain 88% coverage threshold
@jariy17 jariy17 merged commit 10bb727 into aws:main Feb 13, 2026
2 of 3 checks passed
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.

4 participants